Skip to content

A EEPROM Programmer for my z80 stuff. Supported EEPROMS: 28C64, 28C256

License

Notifications You must be signed in to change notification settings

jkreucher/eeprom-programmer

Repository files navigation

Simple EEPROM Programmer

Copyright 2021 Jannik Kreucher

PCB

Table of Contents

Project

I created this programmer for my personal Z80 project. Since commerical programmers are fairly expensive I created my own simple programmer. It is nothing fancy and just supports a single family of EEPROMs. It does not have support for a higher programming voltage and is limited for +5V EEPROMs.

This simple programmer supports following EEPROMs:

Dependencies

To compile the code you need to have following tools installed:

  • avr-gcc (with avr-libs)
  • avrdude
  • uisp

The programmer flash tool uses Python3 and pySerial:

  • python3
  • python3-serial

The Makefile contains a command to install everything needed:

cd code
sudo make tools

Make

First compile the ATmega code. Execute following in the project root folder:

cd code
make

Now flash the compiled code to the programmer. Connect the ISP-Programmer and execute:

make fuses
make upload

I am using a USBasp Programmer. Note: Notch on ISP-Programmer must be facing the ATmega8 chip (U1) while flashing firmware.

Flash EEPROM

Note: Firmware needs to be flashed beforehand !

To flash your binary file to the EEPROM inserted type:

cd code
chmod +x eeprom.py
./eeprom.py -e -o -p /dev/ttyACM0 -b 115200 -w <binaryfile.bin>

For more information:

./eeprom.py -h

Schematic

Schematic

Micro Processor

The micro processor used in this project is the popular ATmega8 (U1), a cheaper version of the ATmega328 used in the Arduino Uno. It handles everything: the serial communication, address bus and the data bus. U2 (MCP2221) handles the USB to UART conversion so no external ftdi cable is needed. The supply voltage is conveniantly given by the USB port also. Because data bus of the EEPROM is bidirectional it is directly connected to the processor. The micro processor needs to handle setting the bus as input or output. See eeprom.c for everything I/O related. The UART is handled in uart.c. And the communication protocol is defined in parser.c and in main.c.

Shift Registers

The shift registers (U3, U4) are utilized to expand the IO of the processor. Just 3 bits are needed to set the address bus to the target address. Since the address bus is only one way no data needs to be read from the address bus thus making shift registers the obvious choice for this situation. See eeprom.c: addrbus_set() for how the data is latched.

EEPROM

The EEPROM uses a parallel interface for communication. The address bus (A0-A14) is a parallel input which sets the memory location to read or write. The control lines ~WE and ~OE (active low) tell the EEPROM to read or write from/to the memory. The data is read from or sent out the parallel data bus (D0-D7) depending on the state of the control lines. Some EEPROMs have Write-Protect enabled. A algorithm (see datasheet) is implemented to deactivate write protection. See eeprom.c: eeprom_disable_protect() for how this works.

PCB

Note: The pcb is designed so that the top layer represents jumpers. The vias are large enough to stick a wire through.

For the schematic and pcb layout I used KiCad, a very awsome open source EDA. The clearances and spaces are designed for diy home etching so nothing really fancy. See eeprom_programmer_bom.pdf for the bill of materials. At the moment the whole project would cost you around 26€ plus a weekend of time.

PCB

Enclosure

The very simple, easy and fast to print enclosure consists of two parts which sandwhich the pcb. Needed are just 4x M3,5x12mm wood screws to assemble the enclosure.

Enclosure

License

MIT Jannik Kreucher

About

A EEPROM Programmer for my z80 stuff. Supported EEPROMS: 28C64, 28C256

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published