I completed this project during last Christmas break, but I did not have a chance to write about it until now. I am documenting it so I can remember the details later.
My goal in this project was to be able to read 27128′s and 27256′s, and 875x micro controller EPROMs. To simplify things I used 2 PCI cards that provide printer and COM ports. These cards are very cheap and if something goes wrong the printer port on the motherboard is not effected.
There are many programming modes for LPT ports (ECP, EPP, etc) which are set from the ROM BIOS. Again to simplify things we use the parallel port in its simplest mode, so that it does not matter which mode it is set to.
We use the first LPT port to put one byte of data, and the second LPT port to choose which device to read or write this data to. 74373 is a tri-state octal latch. It has 8 inputs, 8 outputs and 2 control lines. If Enable line (pin 11) is High, all inputs are connected to outputs. If Enable line goes Low, whatever state the inputs were at the time, they are frozen at outputs. When Enable line is low, any changes at the inputs are de-coupled from the output. The Output Control line(pin 1) is normally Low. If it goes High, the output lines are at high impedance state.
We would actually need three of these chips, one for data, 2 for address lines (allows up to 64K bytes). I installed four of these thinking that one could be spare for future expansion. (Note the data buffer will be used in the future for EPROM writing).
Each LPT port allows for 4 bit inputs on the status port. But the highest bit is inverted, we we have to account for it in software.
Here is the pictures of the wire wrapped board, the wired side and the component side. Yellow wires are inputs to octal latches, white wires are outputs from octal latches, red wires are Vss, blue wires are ground wires, and green wires are control wires.
Circuit Wire Side
Circuit Component Side
Circuit Component Side
Although it looks complicated, I wired the whole thing in less than a day. For cabling the parallel port, I used a standard old style PATA hard drive cable that provided 40 parallel wires.
Bad connector below the good connector
Printer port connectors
To run the test program DOWNLOAD it, and compile it with gcc -O eprom.c -o eprom. Optimize option is needed to access the input/output ports and you have to run the program as root. It will print out the contents of the EPROM 16 bytes per line.
For testing purposes I tried to read the contents of a 27128 EPROM. I kept getting 0xFF, which meant that either the EPROM was empty or perhaps there was a timing problem or some other problem. One problem I noticed was with the connector I used. Some pins were slightly touching each other because when I measured voltage it was not High or Low, it was somewhere in between. I installed another connector which fixed that problem.
But the problem (reading 0xFFs) persisted for the next 6 days or so. It was definitely not a timing problem, because I had put in lot of delays between the port IO operations. I was running out of ideas, and I thought I would try 27256 EPROM. It worked perfectly! I removed most of the delays, and it still worked fine. There was only one delay that I kept, because when I removed it, the values I read from the EPROM became unreliable.
So the whole thing worked with 27256, but not with 27128, why? The only thing that was different was the pin 27 (A14/PGM). I had set this pin to zero because it was the highest bit of the address. It turns out it needed to be set to one. When I made that change, 27128 worked also.
87xx Micro Controller
The micro controller EPROM is similar to other EPROMs except that the clock needs to be running for reading or writing operations to succeed. Also the RST line needs to be kept at about 2.5 volts. Pin 28 (A15) is used as a READ strobe. Pin 30 (ALE) and pin 31 (EA) is connected to Vcc. Pins 25, 26, 27, and 29 are connected to ground.
With these connections made, when I ran the test program, it worked great. I read about 0×800 bytes into different files and compared them. They matched.
Some of the micro controllers I had was from mid 80′s. It is amazing that after about 25 years the calculated checksum still matched the checksum written on the label! It is amazing because if you look into how EPROMs work, these are trapped charges within an insulator.