Bookmark and Share
EEPROM Programmer

Leave comment

I have done a number of projects that use embedded microcontrollers, with the control software stored in EEPROM chips. This device allows me to upload the code (which I write on a PC) into an 8k x 8 EEPROM. It uses a ZIF socket for the EEPROM chip, so that the chip can be easily inserted and removed without breaking the pins. It also automatically disconnects the EEPROM chip when the not in use, so that I can safely insert or remove the EEPROM without unplugging the programmer.

The heart of the programmer is the 8255 Programmable Peripheral Interface. The 8255 has three programmable 8-bit I/O port, which I use to control all the signals to the EEPROM chip. One of the ports holds the byte to be written to the EEPROM, one holds the first byte of the memory address, and the second holds the remaining five address lines, plut the control write enable signal. A write to the EEPROM is performed by first sending the byte and address to the appropriate ports in the 8255, and then sending the 8255 the commands to lower and raise the bit that controls the write enable signal.

Since support for sub-milliseconds timing is unreliable, the timing is also handled by the programmer. The write signal to the 8255 is connected to ground through a resistor and a capacitor, and the voltage between the resistor and the capacitor is sent back through one of the parallel port's status lines. When the write signal to the 8255 changes, the time required for the capacitor to charge or discharge causes a short delay before the status line sees the change. Thus to strobe the 8255, I can first lower the 8255's write signal, and then wait for the return signal to change state. The resulting delay is less than a millisecond, and is independent of the hardware that the programming software is running on.

The programmer with a chip in the socket

The chip removed

The bottom side

A complete schematic

The programmer software is available for download here. I have tested on Windows XP, with a parallel port in ECP mode. The source code (including a VC 2008 project file) is available here.

Miguel (from Mexico) November 3, 2009, 3:59 am
Good night, your programmer it´s amazing, but i don´t understand what component is the Reed relay,so please, can you tell what´s the name or how can I ask for it in the electronic store??? and what is the software that you use for programming you EEPROMs???

Your work inspire me, to make a Z80 computer but I´m starting ine the world of the microprocessors.
Blake Foster November 3, 2009, 4:26 am
 This is the relay I used. You don't need to use that exact part. Any relay with a 5-volt coil and normally open contacts will work.
 I wrote my own software for controlling the programmer. I've only tested it on my old laptop in Windows XP (so I can't promise that it will work on any other system), but if you want to try using it, it's available for download. I just added links, below the schematic.
Miguel (from Mexico) November 7, 2009, 1:54 am
Hi!! it´s me again :P, I have studied the source Code of the programmer in C to understand hot it works but, when I compile, the compiler return many errors and warnings, I tried to fix them but I can´t fix all of them. :( I used the compiler Turbo C++ IDE. Can you help me please. also I want ask you about the Z80 microprocessor, I´m starting the study of this powerfull microprocessor but in some practices that I have done the signals of WR, M1, HALT, RD and IOREQ have a lot of noise and the comunication with the EEPROM have many problems can you tell me if you had this problem too.
miguel (from Mexico) November 7, 2009, 2:00 am
some of the errors that the compiler show me:
Error ..\MAIN.CPP 3: Unable to open include file 'WINDOWS.H'
Error ..\MAIN.CPP 5: Unable to open include file 'CASSERT.H'
Error ..\MAIN.CPP 11: Declaration syntax error
Error ..\MAIN.CPP 20: Declaration syntax error
Error ..\MAIN.CPP 28: Function 'sprintf_s' should have a prototype
Error ..\MAIN.CPP 35: Function 'sprintf_s' should have a prototype
Blake November 7, 2009, 2:06 am
 I can't really say what is causing those compiler errors without knowing what OS you are using. The code compiles with MS Visual C++ 2008, running Windows. You could probably get it to work with a different compiler, but due to the various operating system calls, it won't work on a different operating system.
 I've never had trouble with noise on any of the signals, or trouble communicating with the EEPROM. Perhaps you are clocking the chip too fast? I only run it at 2 MHz.
Miguel (from Mexico) November 7, 2009, 2:13 am
I´m running the compiler on Windows XP 32 bits. let me try with the compiler that you use maybe that´s the problem. and I have the Z84C0006PEC microprocessor the clock of my system is 4MHz. I will try with a crystal at 2 MHz or less :D. Thank you for you quickly answer, I am work very hard to design a microcomputer like yours :D.
Blake November 7, 2009, 2:21 am
It runs on Windows XP 32 bit on my laptop, so I suspect that your compiler is the problem. The VS project file is included with the source code, so as long as you have the right compiler, you should just need to open that project file and it should compile.
Miguel (from Mexico) November 15, 2009, 2:18 am
Hi!! good night, it´s me again, I have many problems with the software of the programmer :( the code compiles but when I run it not happen nothing can you tell me how the program works please??? when the program runs it´s on mode MS-DOS or like a window???
Blake November 15, 2009, 2:28 am
Hi Miguel,
 The programmer will run in an MS-DOS shell. It needs a parallel port in ECP mode (you can configure the mode in the BIOS). You also may need to adjust the base address in the programmer software (look for the macro at the top of main.cpp). You can find the correct value in the resources tab for the parallel port in the device manager. You want the first number listed under I/O range.
 Once you have the hardware working, you can use the programmer by dragging and dropping any binary file with the extension .rom.
Miguel (from Mexico) November 15, 2009, 3:10 am
What software you use for programming the Z80??? I use the software called "Z80 simulator IDE" and this software create the binary file but extension *.hex, Can I rename this file to *.bin to programming the EEPROM???
Blake November 15, 2009, 3:18 am
 I use a Z80 assembler that was given to me by a professor when I was in college. Any assembler should work. I use the extension .rom because that is what my assembler uses, but there is no reason that you couldn't use something else. You'll just need to modify the programmer code so that it expects the file to end in your extension of choice. Just do a find and replace to change ".rom" to ".hex" in the source code, and recompile.
Miguel (from Mexico) November 15, 2009, 3:38 am
It works!!! :D Thank you so much, I´m going to work with my Z80 system.
Blake November 15, 2009, 11:21 am
You're welcome. Good work!
rusty81 (from Italy) April 13, 2013, 12:30 pm
Instead of sprintf_s just use snprintf (for non MS environment like DevC++). Nice work! Regards
Mahmoud (from Egypt) July 21, 2013, 9:45 pm
Hi .. did u make any usb EEPROM programmer ?? or the software on windows 7 ? .. i dont know what to do exactly with the source code ? to programm the 8255 ? thank you
Anonymous October 4, 2013, 3:47 pm
You are able at the head of collective project in this site. I look for group a industial IBM-compatible controller project. I am sorry my bad english.
Frank (from Germany) August 9, 2015, 5:21 pm
Hi Blake, this is a real nice prommer. The fact that u use the 8255 instead of several 74´s logic ic is a cool idea. So the wole thing is nice and small. Do you also have the source code in VISUAL BASIC ??? ( I am not so fammilar with C )
Leave comment

Name (optional):

Location (optional):

Website (optional):


Characters remaining: 600

Please enter the code that appears in the above image to verify that you are human: