PIC serial EEPROM reader/programmer

This is a very simple circuit to read/write serial EEPROMs. It's designed with spare parts from my workbench - so 1uF electrolytics are used in the board layout, as well as a 500mA 5V regulator. Lots of part substitution should work here; tantalums will probably work, and a 100mA regulator should be fine. I used a PIC16F627, but there's no reason you couldn't use just about any other PIC in the family (a 627a, 628, 628a, 648a would work perfectly; as long as it has a USART and has the same pinout). Be creative.

The source code for the PIC is hosted on GitHub. The git archive also contains the EAGLE schematic and PCB layout.

Software dependencies

To build this, you'll need:

You'll probably want to change the definition 'SERIAL' in the Makefile; then 'make' will generate main.hex, and 'make install' will install that using picp.

If you just want the hex file, here ya go - version 1.2.

Interfacing with the circuit

The included script sereectl.pl can read or write from the eeprom (or verify its contents against a file). Use sereectl.pl -h to see its options.

The protocol is very simplistic (and not very streamlined). The circuit listens at 19200/8/N/1. When it's powered up, it emits a list of its available commands:

SerEE v1.2
Commands:
>rXX  read 1 byte @ address XX (2 bytes, little-endian)
      returns r1Y on success (Y is binary result byte)
>RXX  read XX (2 bytes, little-endian) bytes, starting @ addr 0
      returns a dump of all bytes
>wXXY write value Y @ address XX
      returns w1 on success
>t    DESTRUCTIVE self-test
      emits 'OK' on success or 'FAIL' on failure
     

Using another processor

To compile for a different processor, you'll want to change two lines in processor_def.inc, and two lines in Makefile. Just change the references to 16f627 to whichever processor you select.

Building one

The gerber files that I've had printed via Batch PCB are in the git repository. This is version 1.0 of the PCB, which includes a couple of components that aren't necessary; if you decide to use this gerber file (instead of generating new ones from the current schematic), just ignore the two diodes. The crystal (or resonator; I provided a ground pin in case you want to use a resonator) and its loading capacitors are optional as well. I left the crystal and caps in version 1.1 of the schematic in case someone wants to run at a higher clock speed (which you might want to do if you want faster serial; at 4MHz, you can't really push faster than 19.2kbps). If you do this, you'll need to adjust the serial startup in serial.asm.

Parts list

This is for version 1.0 or 1.1 of the PCB. If you're using a 1.0 PCB, make sure you don't install the diodes.