Saturday, February 21, 2015

EEPROM Programmer

For a couple of projects I want to work on in the next few months I will need to use EEPROMs. Another member at our hackerspace I have been working with on the BrainFuck microcontroller gave me a few EEPROMs and UV-erasable EPROMs. Like I posted before, I was able to program some of the EEPROMs with an MSP430 on a breadboard and now I have it soldered onto protoboard.


The UART is handled by an FT232R chip that I deadbugged. It gave me a lot of problems when I first soldered 24 gauge Ethernet wire to the pins. At first I tried to tin the pins and this led to several shorts. Because the chip was superglued to the board, there was no way to get at them to fix it. Pure acetone paint remover did not take the superglue off and neither did soaking the board in fingernail polish remover for several hours. The glue got gummy but would not come off, so I left the chip where it was and soldered female headers next to it. Then I soldered another FT232R onto a small piece of protoboard with male headers so I could plug it in to replace the other chip. You can see it on the left side of the picture with the red wirewrap wire. The old chip is partly visible just underneath. The first time I tried I accidentally shorted some of the pins together when I was soldering them, so I bent them vertically to make it easier to get at them. When I bent one down to make more room, it broke off. Unfortunately this was the Vcc pin which I couldn't do without so I had to start over with a third chip. Once I got everything soldered, it worked fine.

The local electronics store did not have any USB B connectors so I had to use a dual USB A connector. The MSP430 is running off the 3.3v provided by the FT232R, so I was afraid of programming it at 3.6v with a LaunchPad since 0.3v above Vcc is the absolute maximum rating in the datasheet. That's why I have the two programming lines running through diodes on the little protoboard above the MSP430. The third "bandaid" piece of protoboard holds two transistors for level shifting. Controlling the EEPROM WE and OE lines with the MSP430 worked fine but it turns out that TTL chips can source voltage from their inputs which would damage the MSP430. The EEPROMs I have now are not TTL but I might run across one at the hackerspace and I wanted to be safe. The ZIF socket on there also came from a hackerspace member who had found some and didn't mind sharing.

The shift registers that control the data and address lines are running at 5v. The data line going to the microcontroller from the 74HC165 shift register is switched by a PN2222A. This limits SPI speed to about 400k/s. When I find a faster transistor, I should be able to read and write much quicker. The software interface is just over a plain serial terminal. In retrospect, it would have been easier to design a custom program on the PC side but it's convenient that it can work with any operating system without special software. To transfer I use XMODEM which caused some headaches at the beginning. It turns out that TeraTerm transfers the first packet twice without being asked, which caused an overflow of my UART buffer and was hard to track down since that's not expected behavior for XMODEM. It burns about 100 bytes per second but with a faster transistor I hope to write fast enough to do page writes, which will speed things up a lot.


No comments:

Post a Comment