In this project we are going to build a non-volatile memory expansion board that doesn’t require batteries or a separate PROM blaster card. Everything we need will be on one simple card. Your cost to buy one of the popular PROM cards along with a separate programmer would probably be at least $150 dollars. Our project, hopefully, should cost less than $50.
The heart of the board is a Seeq Technology 8K x 8 EEPROM, a memory chip that can be both erased and written to with only 5 Vdc. Once the chip has been programmed and the power to the computer turned off, the memory is permanent – even if you remove the chip from the board. This chip is also the most expensive component on the board. In single quantity the price is $35. However, if there is enough interest in building the project we can get a good quantity discount.
Circuit Operation
Our circuit is designed to let the 8K of memory reside in the empty 8K to 16K portion of the memory map. When addressing this area, address lines A15 and A14 will be low and line 13 high. The MREQ, memory request line is also low. Line A13 is first inverted through IC1a so that when IC2 sees all its inputs low, it puts its output low. This signal has 3 jobs to do. The first is to disable the ROM in the computer to prevent memory ghosting. This we do by inverting the low output of IC2 through IC1b putting a high on the ROMCS line on the I/O bus. The second job is to enable our memory chip IC4 by putting a low on its CE chip enable pin. The third job we’ll skip untill we look at a memory write cycle. For now we’ll assume we are going to do a memory read.
So far we’ve decoded the address, enabled the memory chip and if we’re doing a read the RD line on the I/O bus should be low, it’s directly connected to IC4’s output enable pin, OE. At this point the byte at the memory location we’ve addressed is plopped out onto the I/O data lines D0 to D7 ending the read cycle. So far everything has been fairly simple, but now let’s take a look at a write cycle.
A write to the EEPROM only requires 5 volts but in order to program the chip the write pulse has to be 1 millisecond long. This is a lot longer than the Z80 write pulse which is about 10 nanoseconds. Here’s where IC3 comes into play as well as the third job required of IC2. When IC2 sees an address in the 8K to 16K area of memory its output goes low, as we saw above, the output is inverted through IC1b and is used to enable IC3 which forms part of a single shot pulse stretching circuit. When the write pulse from the I/O bus is applied to an enabled IC3, its output delivers a 1 ms. low pulse to the write enable pin of our memory chip and the byte on the I/O bus line D0 to D7 is implanted forever into the EEPROM, or untill you do another write cycle to the same address. One limitation fo the chip is that you can only do 10,000 write cycles to any one individual byte address.
One other requirement in writing to the chip is that you can only overwrite a byte that is all 1’s. This is not a problem, if you refer to Listing 1 which is a simple program to POKE data to sequential addresses you will see that a check is made by PEEKing first and if the location does not contain all 1’s we just stuff them in before we write in the data we want there. Typically it shouldn’t take more than about 80 seconds to write 8Kbytes to our memory chip. In spite of all the timing requirements and only being able to overwrite a byte thats all 1’s it’s probably a good idea to include the write protect switch shown on the diagram.
As far as applications for the EEPROM board, it can be used to store machine code programs that will run right from addresses on the board as the read time is 250 ns. and the computer sees it as RAM. It can also store BASIC programs although they can’t be run from the board, you would simply down load the block of memory containing the tokenized program to the EEPROM and up load it back to the BASIC area in RAM when you want to run it.
In the concluding portion of this project, appearing in the next newsletter, we will cover construction details, PC board layouts, where to get parts, more software for loading and some sugestions for modifications to make the board usable on the 2068 – both on the expansion bus and the cartridge dock.
Program Listing 1
10 REM ** EEPROM LOADER **
20 REM S= STARTING ADDR. OF
30 REM DATA IN RAM.
40 REM N= NUMBER OF BYTES -1.
50 REM E= EEPROM START ADDRS.
60 LET S= 16436
70 LET N= 2047
80 LET E= 8200
80 FOR I= D TO D+N
90 IF PEEK (E) = 255 THEN GOTO 130
100 POKE P, 255
110 FOR J= 1 TO 2
120 NEXT J
130 POKE P, PEEK (I)
140 NEXT I
150 PRINT "I'M LOADED, EH!"
160 STOP
