Skip to main content

EEPROM Programmer Pt.3

Well, this post contains both good news and bad news:

Good News part 1.

I spent the later half of yesterday wiring up the arduino to the EEPROM board proper. I then began to check basic functionality such as proper voltages, proper and state of the EEPROM control lines. Everything checked out, so I decided to test with an NVRAM that has an identical pinout. I encountered a few errors in the software in this process.
  • The controller was not allowing the device to complete a read or write cycle before moving on to the next byte, fixed by adding a 1ms delay between pulling the read or write lines low, and pulling them back up.
  • I accidentally left out a = in the test part of some if statements, so it would read as 'if(Error=1)' instead of 'if(Error==1)'. This caused the send/receive portions of the write and dump routines to fail out, thinking the Xmodem packet was being improperly received or sent.
  • The first 128 bytes of the NVRAM was being rewritten with data from the last 128-byte block, this is due to the loop not exiting out immediately after receiving an <EOT> byte, which signals that the previous packet was the last one.
After all of this work, the NVRAM could be repeatedly written to and dumped back out with no errors between the file written to it and what was received back from it.

The next round of testing dealt with the 12V erase line. Before actual testing I did a visual check and found I had arranged the circuitry improperly, such that the controller would get 12V on its I/O pin. I swapped it around to more closely match what I had designed, such that a diode would prevent backfeed to the controller. The pulse output from the optocoupler is 11.75V, still within the +/- 0.5V tolerance prescribed in the EEPROM's datasheet. Considering everything checked out, I decided to go ahead and test with the EEPROM.

This is where we reach the Bad News.

The reason I took on the task of making an EEPROM programmer, is because my last one failed, likely because of water damage through the leaking roof vent it was sitting under. The EEPROM couldn't be tested to see if it wasn't damaged as well, and so it sat for quite some time since. Initial testing did not look promising, initial dump read the device as containing all 0s, which should not be the case with an erased device, let alone one that has been programmed to contain a program. I forged forwards with the erase test, and I failed to perform a proper dump to ensure it was erased, only using my debug 'query size' option, which reported 128 bytes as expected with a device filled with all 1s.

That likely was not the case.

I tried to write to the device, and initally it managed to pass the verification check for the first two blocks, but it halted on the third, as it had encountered an error. I canceled and re-dumped the ROM data. The first 256 bytes indeed write succesfully, but everything after was either 0s or a byte of random data mixed in. This leads me to believe the EEPROM is irreparably damaged.

Good News part 2.

As a last ditch effort, I decided to dump out the data in the NVRAM I was testing with, and see if it could still retain data without power, so it could be used instead. The internal battery of the NVRAM is now more than 20 years old and I had no idea if it could still hold data. As it turns out, it can. What was written to it the previous night matched up perfectly with what I dumped out from it, so I still have memory to use until I can get a new EEPROM (making sure to get one with the ability to be rewritten on a per-byte basis without 12V).

For now I consider this project 100% done, allowing me to move on to writing software for my Z80 computer.

Comments

Popular posts from this blog

HP-125 Floppy Drive Emulation

A 'back burner' project I have in mind is to repair an old HP-125 computer I picked up at a thrift shop quite a while ago. This computer has no onboard storage drives, instead coming paired with an HP-82901M floppy drive unit , which communicates over HPIB/GPIB/IEEE-488 (whatever you want to call it). These drives are either pure unobtanium, or are downright bankrupting, so I need to find a way to emulate it. My requirements are as follows: Standalone operation, not requiring another computer to emulate Low cost parts, or using mostly parts I have on hand (Optional) Multiple uses, I don't want this to be a one-trick pony While I've learned how the GPIB protocol works, I have no idea what the command set is that either the HP-125 and/or HP-82901M speaks. I've found mention of the HP-82901M using the Amigo command set, as introduced with the HP-300 "Amigo", on this page about emulating an Amigo-compatible drive with a modern PC . That project requir

Disk Selection

So I've started work on the BIOS-ROM for the Z80-based Zephyr computer in preparation for use with BP-DOS, and I needed to decide between SCSI or IDE for a storage disk. The SCSI disk I have would be ideal on the hardware level, since both commands and data are 8-bit (with hardware generated/checked parity), plus it would make for a nice auditory experience being a full-height 5.25" disk. However, an issue arose when reading through the commands section of the SCSI standard, there are several different bus phases, and the flow path can be quite confusing at times. I'm sure given time it could be done, but I'm interested in getting the Zephyr computer running in a reasonable time frame. Instead, I have opted for using one or two IDE disks, for simplicity of the bus and command-set. Data transfers are done on 16-bit words, so a data read/write takes two input/output cycles from the CPU, and the ordering of which byte of the word will vary between reads and writes. On

EEPROM Programmer

So, I'll be needing an EEPROM programmer in order to actually provide some startup software for my Z80 computer. I intend to make one using a set of shift registers, and a couple optoisolators, so that I can use any microcontroller with 8 I/O pins (7 output, 1 input), assigned as follows: Input: 1 = Data Read Output: 1 = Address/Data Write 2 = Shift 3 = ~WE 4 = ~CE 5 = ~OE 6 = ERASE/VPP (EEPROM/EPROM) 7 = Read Data The design will be as such that any microcontroller that uses either 3.3V, or 5V I/O can safely operate it. An interesting design requirement involves needing to have either 3.3/5V or 12V sent to the ~OE pin of an EEPROM, as the 5V signal is used to read from it, but the 12V is required in order to erase it. A possible solution will be to use a diode to prevent the 12V signal from feeding back to the microcontroller, and an optoisolator to gate the 12V to the same pin during an erase cycle. To obtain the 5V and 12V power rails, I will use a simple regulat