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 as a 'dead man' switch in series. This is done to prevent accidental erasure for dumping of ROM data, or when programming a device that does not require 12V to erase, such as an NVRAM.
On the software side of things, I've written a function that can detect the size of the device by comparing the first 8 bytes of the device with addresses just past common boundaries (2^n). This technique is imperfect, giving a false reading for devices that are:
Further on down the line I expect to be able to use the Zephyr computer to program EEPROMs, even for itself.
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 as a 'dead man' switch in series. This is done to prevent accidental erasure for dumping of ROM data, or when programming a device that does not require 12V to erase, such as an NVRAM.
On the software side of things, I've written a function that can detect the size of the device by comparing the first 8 bytes of the device with addresses just past common boundaries (2^n). This technique is imperfect, giving a false reading for devices that are:
- Erased or filled with a repeating pattern
- Faulty such that an address line has failed
- Or somehow contain the same 8-byte sequence as the first 8-bytes on one of these boundaries
Further on down the line I expect to be able to use the Zephyr computer to program EEPROMs, even for itself.
Comments
Post a Comment