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...

EEPROM Programmer Pt.2

I have decided to revisit my earlier plan of making an EEPROM programmer with as few I/O pins required as possible. I have decided to abandon that requirement in favor of making something functionally complete with a minimum of software development required. I'm using an Arduino Mega as the programming controller, with the sole reason being the large amount of I/O pins available. Rather than reflashing the controller every time an EEPROM needs to be rewritten to hold a new program, I've implemented a method to send the desired program over a serial connection, and program the EEPROM in 128-byte chunks. This is done via the Xmodem protocol, which allows for a pause between packets to allow time for programming 128 bytes at a time, before requesting the next packet. Due to the variant of EEPROM I have, a 12V level signal needs to be applied to the /OE pin in order to enable a full chip erase. This 12V line will be handled by an opto-coupler, and a momentary pushbutton acting ...

Introduction

This blog is intended to showcase my electronics and computer projects, as well as educating about related concepts. I currently have an ongoing project consisting of an 8-bit computer I call Zephyr (because I'm bad at coming up with names). Details as follow: CPU: Zilog Z80 rated to 10MHz (Currently running at 625KHz) Memory: 8KB of ROM, 32KB of RAM with room for expansion I/O: Serial Currently it doesn't do anything since I need to create an EEPROM programmer, which I plan to make using shift registers and a controller of some variety. I also have plans to create another 8-bit computer project called CosNaut (Again, bad at names) using an RCA 1802 'COSMAC' CPU, though anything else is not set in stone. Will post updates as necessary.