Saturday, 9 March 2013

EEPROM programmer circuit

The circuit is relatively simple once the block diagram has been devised. For the serial port, a USB lead meant for interfacing to the RS232 port on a mobile phone was used instead of something more conventional like a MAX232 level shifter. Something like this from ebay would also work.

On the ATMEGA8, the whole of PORTB is used for the data bus, whilst the rest of the IO (counter control and EEPROM control lines) uses PORTD.  Because this application is not really time critical (other then the UART baud rate), the internal RC oscillator is used instead of an external crystal.

The 16bit address bus counter is implemented using a pair of 74HC590s (PDF) - each one is a 8 bit counter, and they can easily be cascaded to make counters of any width.

The rest of the circuit, below, is made up of components to hang everything together: some LEDs to indicate the status of the I/O lines, a reset button for the ATMEGA8, and the ISP programmer port for the MCU.


You can download this image in postscript format.

This circuit was implemented first on breadboard:


Top to bottom:
  • The serial input comes in on the screw terminals
  • The ATMEGA8. along with a reset button (buried under wires)
  • The ISP programmer header
  • Two 74HC590s, along with LEDs indicating the reset and clock signals
  • There are some extra LEDs here, one for each address line
  • Three LEDs, one each for Output Enable, Write Enable and Chip Enable
  • The 28C256 EEPROM (the big IC at the bottom)
The circuit was tested as it was laid out, and thus is somewhat spaced out, to the point that a total of 3 lead "hops" is required to get from PORTD on the ATMEGA8 to the data bus pins on the EEPROM.  This is because at one point LEDs were used to indicate the state of the data bus.  If I could be bothered the circuit could probably be made to fit on a single breadboard "slab".

Next up is, of course, the software required to drive the programmer...

2 comments: