1702A PROM Programmer 500
1702A color box

Building a Simple 1702A EPROM Programmer

 

How to build
the simplest one possible.

By Stephen H. Lafferty

I was restoring a newly acquired Altair 8800bt “turn-key” computer last year, when I realized that it did not have the terminal monitor EPROM (erasable programmable read only memory) in it. Unlike the previous Altair 8800 series computers, the turn-key models do not have front panel switches with which to toggle-in bootstrap loader programs. The only means of getting it running would be to create a new terminal monitor (TURMON) PROM.

1702A eprom lowThe EPROM chip used in the 8800bt is the venerable 1702A. Dov Frohman at Intel invented the very first EPROM in 1971 and it became the 1702A. While it only stored 256-bytes of code, that was enough to boot the early microcomputers. It became cheap and was therefore popular in the early generations of personal computers.

Fortunately, the code for TURMON was available on the Altair Computer Club forum. Also, new old stock 1702A EPROM chips were available on eBay for reasonable prices. However, I needed a way to burn the code into the chip. Unfortunately, modern EPROM programmers typically do not handle the 1702A. That is because it requires very odd programming voltages and protocols. During programming, the logic levels must swing about 47V. There is another 12V power supply above that. Also, the 47V power supply must be able to deliver up to 200mA.

Since I only needed one or two EPROMs burned, I set out to build the simplest programmer possible. That was accomplished by adhering to these design guidelines:

  • The PC would directly handle as much of the operation as possible. This includes the complex timing and address inversion.
  • Instead of buying a ~$100 digital I/O board for the PC to interface to the PROM Programmer Hardware (hereafter “PPHW”), I would add one regular parallel port to the PC (~$10). That and the existing one would provide enough I/O lines.
  • Since Windows causes problems for software timing and prevents direct access to the ports, the programming software would run under DOS. (Windows XP, Vista and Win7 can make a DOS boot disk.) The software would be written in good ol’ QuickBasic 4.5.
  • Four lab power supplies would be used for the required +5, -9, +47 and floating 12V supplies. (You could use common wall transformers for all but the +47V. Jameco has inexpensive 48V supplies which should be okay for that.)
  • Separate reading and burning sockets would be used, significantly simplifying the circuitry.
  • The power switching relays and drivers are optional. Without them, you just have to switch the power supplies on and off when moving the EPROM. If you want to simplify it further, the reading socket can be omitted, but I highly recommend including it.

About the Hardware

We will now discuss how the PPHW works. In normal operation, the 1702A is driven by eight address lines and produces eight bits of data for each location addressed. Logic levels are within the range of 0-5V. During programming, the address lines are driven with 47V logic levels. The data pins become inputs and are also driven with 47V logic levels.

Read Mode Power Supply — Look Ma, No Ground!

1702A pinoutEven in normal read operation, the 1702A supply voltage referencing is a bit odd, by modern standards. As you can see from the package pinout at left, there is no Ground pin, even though input and output logic levels are referenced to ground. How can this be? The answer lies in the read operation power supplies, which are: VCC=VBB=+5V and VDD=VGG= –9V. Even though the ground of those supplies doesn’t have a dedicated connection to it, the chip synthesizes that level, as being 9/14th’s (64%) of the way from VDD to VCC. Actually, at the outputs of the 1702A, you will find that the logic-0 level is in fact negative, to insure that it is well below the specified TTL low level.

Re-referencing the Programming Supply Voltages

In the “Programming the 1602A/1702A” section of the Intel databook, they reference VCC to ground (or 0V) and VDD/logic levels are between -47 and 0V. We (and other programmer designers) found that it was easier to reference the most negative voltage to 0V and let all the other voltages be positive. The following table summarizes the voltage levels required at the pins of the chip, for reading and programming:

Pin

Signal

Read Voltage

Prog Voltage(s)

12

VCC

+5V

+47V

13

Program

+5V

+47/0V

14

CS

0V

+47V

15

VBB

+5V

+59V

16

VGG

–9V

+47/10V

22

VCC

+5V

+47V

23

VCC

+5V

+47V

24

VDD

–9V

+47/0V

So for read mode, the chip operates from +5, –9V but interfaces to 0/5V logic. These supplies can be easily provided with standard wall transformers.

In programming mode, most power is drawn from the +47V supply but it also needs a bias supply at +59V. The +47V source should be able to provide 450mA, or so. This could be done with a +48V “Table Top” power adapter available from Jameco for $18-25. A separate (floating) 12V wall transformer can tie to this, to provide the low current +59V source. The low current +10V level, to which Pin-16 is pulled down to, can be supported by simply putting a 10V Zener in series with the open collector driver for that pin.

Circuit Options

Reader Socket
If all you want to do is burn one EPROM (which I initially planned), you probably want to build the programmer as simply as possible. So in theory, you can eliminate the EPROM Reader option. That eliminates the Reader socket, the wiring which goes with it and a few power supply components. Without the reader, you could plug the burned EPROM into the target system and see if it works. I decided to include the reader function, because it adds so few parts and was glad that I did. Debugging the circuit would have been difficult, without it. Plus, had there been a problem in the target system (which there was), I would have been unsure about the cause.

Power Control Relays
You must turn off the power supplies before you insert or remove an EPROM from the reader or burner sockets. Failure to do so could damage the device. Since there are four supplies and you need to move the EPROM from the burner to the reader socket for a burn/verify cycle, there would be a good bit of pesky switch flipping. With relays to control power to the sockets, the software can insure that it is safe to insert or remove an EPROM, at any time that burning or reading is not taking place. This turned out to be a handy feature. Nevertheless, you can save the cost and wiring of the relays and associated parts, if you want to minimize construction.1702A Programmer Board thumb

Schematic Description

Adapter and Cabling
The PPHW is operated by two parallel ports on an Intel PC. At the left of the schematic is a diagram for building an adapter, which has two male DB25 connectors for the parallel ports and one female DB25 connector to go to a cable, on its way to the PPHW. (It turns out that 25-lines are enough to accommodate all lines going to the PPHW.) That uses a standard, DB25 cable, with male connectors on each end.

Data and Address Ports and Drivers
To the right of the DB25M to DB25M Cable, is the DB25 female connector on the PPHW board. Immediately below that is the Reader Socket, which should be a ZIF (zero insertion force) type. Notice that the address lines of the 1702A in the reader socket, are driven directly by one parallel port and the data lines of the 1702A drive the other parallel port. The LPT1 port is used for address and LPT2 is for data. The data port is bidirectional, so it can read from the reader socket and output data to the programming socket. Notice that when the PC data port is in output mode for burning, no 1702A should be in the reader socket, as its output lines would interfere.

For programming, the data lines go to eight transistors (Q3,4,5,6,7,9,10,11), with pullup resistors on their collectors. These drivers deliver +47/0V logic levels to the 1702A data lines, meet the 1us rise/fall time requirement and can handle the specified 10mA maximum sink current. Eight data lines from the other parallel port, drive transistors Q13-20 to provide the address for programming.

Signal Lines for Programming and Power Control
Each PC parallel port has four extra signal lines, which can be used as general purpose I/O, just like the eight data lines. We use only the signal lines from LPT1. A ninth driver (Q12) buffers a signal line from the port to operate the Program pin on the chip. Another signal line from the port operates a special driver (Q1), which grounds the chip’s VDD line, to apply main power. The chip can pull up to 200mA during programming, so that driver must be beefy and high-beta, as well as being fast. Hence, the choice of the BC141-16 transistor.

Intel specifies that VDD must be current limited to less than 300mA, so this function is provided by Q2. Should that be activated, it would be a fault condition and programming would most likely fail. Naturally, that should be a rare occurrence. Nevertheless, when current is limited by Q1/Q2, substantial voltage will be dropped across Q1. TO39 HeatsinkThat will result in significant power dissipation in Q1; perhaps as much as several watts, for a short period. Hence, a heatsink is provided, as a precaution. Actually, due to the short duration of a typical fault, the thermal mass of the heatsink seems as important as its dissipation capability. Inexpensive extruded ones presently on eBay (at right), and similar, have enough aluminum in them to greatly beef-up the thermal mass of the transistor.

The other two signal lines are used to operate the Reader Power and Burner Power relays. LEDs indicate when those are active, to warn against inserting or removing a 1702A. Beware of the fact that, before the programming software (PRMPROG.EXE) is running, the state of the port signal lines could have the relays activated. Once it is running, the software insures that the power to the 1702A is off, unless it is being read or programmed.

1702A Programmer BOM thumbBuilding the Project

Click on the thumbnail at right, for the programmer parts list.DSC_1432 thumb

You can use the top-view photo at left, to aid parts placement. This one was built on a perf board measuring 5.5 x 4.7 inches.

Because of the high density of connections, I found that 30AWG wirewrap wire1702A programmer wiring thumb worked best for most wiring under the board, as you can see in the photo at left. Wires from the DB25 connector are in red, while other 30AWG wiring is in white. Notice that the 30AWG wiring is bundled and tied to the board in three places. In addition, 22AWG wire was used for power supply connections. Ground buses were done with 12AWG bare wire. If you look carefully at the upper left of this picture, you can see some clear epoxy. That was needed to secure the leads of Q1. With the heatsink attached, it tended to move and get pushed down, pushing the wiring underneath, away from the board.

To protect the wiring and connections, the board needs to have legs on which to stand. I used 10-24 x 1” machine screws for that. Small rubber/plastic grommets can be screwed on the ends, to make feet with a firm grip. The DB25 connector (going to the PC parallel ports) should be secured to the board with two 4-40x3/8” screws. Press the TO-39 heatsink onto Q1.

1702A programmer adapter lowMaking the Adapter
With only 21-connections used from the PPHW to the two PC parallel ports, we use a single DB25 connector on the PPHW board and a standard 25-pin DB25 male to DB25 male cable to get close to the PC. At that point, we use a custom adapter (at right) to connect the cable to the two PC parallel ports. Details of the wiring are in the schematic. I made the length about two-feet, which will take care of any conceivable separation of the two ports. I used fine, insulated, stranded wire, probably about 30AWG, for the signals and 16AWG for the grounds (split from zip cord). Three small cable ties on each leg keep it pretty tidy.Syba parallel card

Adding a Parallel Port to Your PC

Most new desktop PCs these days, don’t have a parallel port, much less two of them! I was fortunate that mine already had one. The good news is that add-on parallel port cards are readily available and are very inexpensive. I had no trouble finding one which included a DOS driver. It is a Syba PCI 1-Port Printer/Parallel Card from Everydaysource.com. I see that this particular model is no longer available there but they have a similar one. Unfortunately, USB parallel port adapters would not be useful for this because they aren’t likely to have a DOS driver. If you order a Parallel port card, be sure that it has a DOS driver, or it won’t work with the software for this project. In case your PC doesn’t already have one parallel port, you might be able to get a dual port card or install two cards. I’m not familiar with that, though.

Secret: Making a DOS Boot Disk from Windows

Shhhh — It’s a secret but you can create a DOS boot disk from various versions of Windows, including XP, Vista and Win7. You will need this because the software for the EPROM programmer (PRMPROG.EXE) only runs under DOS. Windows causes problems with realtime software. [Note: If you don’t have a floppy drive you can boot DOS from a USB drive, using the instructions here, or Google “usb dos boot”.] To make the DOS boot disk, insert a floppy and:floppy

  • Download the software for the EPROM programmer: PRMPROG.EXE
  • On your Win desktop, doubleclick Computer.
  • Rightclick the floppy drive A: and select Format.
  • In the Format dialog, check the box for “Create an MS-DOS startup disk.”
  • Click Start.
  • Copy PRMPRG.EXE and the DOS driver for your parallel port card to the floppy. The DOS driver should be supplied by the maker of the parallel port card.
  • Most likely, the DOS driver will have command line options which let you set the mode the parallel port will operate in. The mode you want is “PS/2-type bi-directional parallel port (BPP).” There may be other options related to the card that you will want also. I recommend that you make a BAT file on the floppy to run the driver, with those options. For the card I used, the command in the BAT file reads: mtdosin -a -r -u -c:lpt2=bpp
  • You will also need to have the file with the data to be burned into the EPROM. (More about that in a moment.) Here is an example data file, which has the code for TURMON, the monitor program for the Altair 8800bt.

Instructions for Burning an EPROM

Here is what we need to do to burn an EPROM. These instructions assume that you have the power control relay and reader options installed:

  • Clear the EPROM with an EPROM eraser. Mine takes 10-minutes.
  • Connect the power supplies to the board: 12V floating, +47V, +5V, -9V. See the discussion above for power supply suggestions.
  • Connect the custom adapter to the two PC parallel ports and the 25-line cable. Connect the other end of the cable to the DB25 connector on the PPHW.
  • Insert the boot floppy prepared above (with the EPROM data file) into the PC drive.
  • Set your bios to boot from the floppy, if necessary. Boot DOS from the floppy.
  • Run the parallel port driver program, which you copied to the floppy.
  • Run PRMPROG.EXE. You should see:prom prog success
    1702A EPROM Programmer
    Press any key to continue...
  • Press a key to see the main menu:
    Please select function:
        (B)urn an eprom
        (R)ead an eprom into a file
        (V)erify eprom is erased
        (O)ption settings
        [Esc] to quit
  • Turn on the four power supplies. Verify that the red and green LEDs on the PPHW are off.
  • Insert the erased EPROM in the reader socket and press V. (Capitalization doesn’t matter.) You should see a confirmation that the EPROM is erased.
  • Move the EPROM to the burner socket and press B.
  • Enter the filename of the source data file, including extension. Then select the format with A or B (more about that below). Press Enter.
  • You should see a hex listing of what is in the source file. Press Enter to start the burning. It will display the progress of burning the 32-passes. (It takes a couple of minutes — Hey, we’re talking about big-time data here! :)
  • Press Y to have it verify the burn. It will prompt you to move the device to the reader socket. After pressing a key to continue, it will list any errors or simply print: The PROM compares okay.
  • You then have the options to return to the main menu, to burn the same data again or press Esc to quit the program. Remove the EPROM from the socket. You might notice that it is a bit warm.

About the EPROM Data Files

File Formats

The PRMPROG.EXE program reads and writes two data formats, which correspond to the ones which I encountered, while looking for hobbyist sources of the MITS / Altair PROMS. They are both quite simple, having little more than a direct listing of the data. The binary format (sometimes having a .BIN extension) is literally a file of the 256-bytes of binary data, in the order that they are to written into the EPROM. There is no header or address information, nor is there any trailing information. The file is exactly 256-bytes long.

The ASCII format (sometimes having a .TXT extension) is a listing of the 256-bytes of data in ASCII hex format with one byte per line (two hex characters). There is no address information. Since I usually found text descriptions at the top of such files, I attempted to give the software, the ability to skip those. The software does not start reading data until it finds a line which has exactly two valid hex characters. Of course, some comments might conceivably confuse it. However, once it starts reading data, encountering a pair of characters which are not valid hex, will be reported as an error. An error will also be reported (for either format) if the file ends before 256-bytes are read.

Sources of Boot EPROM Data for the MITS/Altair Computers

The best source that I found for these are the Yahoo Altair Computer Club:
http://groups.yahoo.com/group/altaircomputerclub/

1702A Programmer with Altair 8800bt lowDenouement

After completing the EPROM Programmer project, I was able to burn the TURMON (terminal monitor) program into a 1702A and install that in the Altair 8800bt (at left), which I was restoring. Much debugging of the CPU and “Turn-key boards” lay ahead, as those had apparently been factory scrap. But finally the day came, when I powered-up and the screen showed the coveted “dot prompt.” That tiny little mark signified SO much! Star Trek printoutThe Altair was computing and TURMON was waiting for a command. (A woo-hoo moment! :) So I use TURMON to load programs into the machine and soon find myself as captain of the starship Enterprise, playing an early version of Star Trek.   Life is sweet. :)



Bonus Stuff

A Survey of Other 1702A EPROM Programmer Circuits

When I started this project, the only 1702A EPROM Programmer Circuit which I knew about was the original 1972 Intel design, which was part of their MCS-8 microcomputer development system. It was presented in the User’s Manual and here is an excerpt covering that circuit board: Intel 1702A Programmer.pdf  Pop Electronics 1702A programmer lowThe problem with that design is that it is quite complicated. That motivated this project.

Later, I discovered an interesting 1978 Popular Electronics article about building a 1702A pro­grammer (at right). That one though, required the user to toggle-in data on binary switches, rather than being able to read it from a file: Popular Electronics 1702A Programmer. Looks cool though :)

Eberhard M1702A lowAfter publishing this article, I stumbled across a Feb, 2012 posting about a really nice design by Martin Eberhard, offered as a partial kit. The kit includes a PCB, a programmed PIC controller and a beautifully written 50-plus page manual: MFeberhard 1702A Programmer (at right). Since then Martin has done more runs of the project and by Feb, 2013 had sold dozens of them. I bought one and can vouch for the fact that it is a very well done kit. The programmer is designated the ME1702/A. Remarkably, Martin has continued to support and improve the design. It also handles related devices, such as the 1702 and 8702A.

If they are still available, Martin’s product would be a great way for someone to build a 1702A programmer. The project presented here is much simpler. On the other hand, Martin’s kit includes a PCB and it works with any terminal emulator software. You can inquire about the kit by posting here:
http://groups.yahoo.com/group/altaircomputerclub/

Source Code for PRMPROG.EXE

For those who like to tinker or might want to use a different interface than the classic parallel ports, I am offering the source code of the software. Please note that it is as-is, without warranty of any kind. I am granting a free license to anyone who wishes to use or modify the code for non-commercial purposes, so long as due credit is given. Here is the link: PRMPROG.BAS source code.

About the PRMPROG Software

The software is extensively commented, so I will not go into detail about how it works, here. The main program is only about the first 200-lines. The other 500-lines are the subroutines so it’s pretty modular. A note about data polarity: remember that the drivers used in burning mode are inverting for both address and data. There are no drivers in read mode, so those lines are not inverted by the PPHW. If you try to follow the polarity of the extra control lines used to control VDD, Program, Burner Power and Reader Power, bear in mind that all except the last one are inverted in the I/O hardware. That has to do with the original printer control functions, for which they were intended, back in the day.

To minimize the amount of hardware required, the software does all of the critical timing of the programming operations using timing loops. For those who might worry that this would be dependent on the particular computer used, let me set your mind at ease: At the beginning of the program, it calibrates its core timing loop against the realtime clock of the computer. This is done using a function built into QuickBasic (QB), in which the code is written. Why not use the QB function directly in the loops, you ask? It turns out that the function only has a time resolution of about 1/18th of a second. So the program must execute loops long enough to take a couple of seconds, to get decent resolution for the calibration. After the calibration, the timing routine can provide a resolution on the order of 0.5us, on this 3.4GHz i7-2600K machine.

For reference, the timing which is implemented by the programming software (for each byte), is shown in the diagram below:

Programmer timing2 low2

The 12ms delay between bytes is required to let the chip cool off.

I will be happy to help if anyone has questions about this project. Feel free to post below.  Happy vintage computing!   — Steve

1702A programmer in operation

 

Reader Comments


Posted by Steve L. August 30, 2014 - 02:46 pm
Hi Minime, I take it that you meant to say "reader part" at the end of your message. Yes indeed, to extract the reader part, look at the sections enclosed in dotted lines at the lower left of the schematic. (Unfortunately for clarity, the DB25 connectors are also drawn with dotted lines but please ignore those for the moment.) The dotted lines I mean are labeled "Optional Reader" and "Optional Reader Pwr Ctrl." To make a reader, you need what is contained in those two sections, along with the DB25F connector directly above. Then make the separate adapter cable shown on the left. The adapter cable goes from the reader board to the two parallel ports needed on your PC. Beware that many newer PCs don't have parallel ports.

Only the +5V and -9V power supplies shown in the dotted lines are needed for the reader. If you are careful to keep those supplies off when inserting and removing the 1702A, you could leave out the "Optional Reader Pwr Ctrl" section. In that case, about the only things left on the reader board would be the 1702A socket, a couple caps and the DB25F connector. No active electronics needed!

I don't know of any reason why the existing software wouldn't work with this arrangement. Of course, the only useable command will be (R)ead. Choosing that will prompt you for a filename and a choice of ASCII or binary format. It will then read the PROM data and put it in the file.

I wish you the best of luck with your project.

Posted by minime August 30, 2014 - 01:02 pm
This is by far the best writer description I could find so far... unfortunately for me I am searching for a reader only, to keep things simple, but most on the net is either incomprehensible or includes a writer. Would it be hard to extract from the schematics only the writer part?

Posted by Steve L. August 28, 2013 - 06:32 am
Hi Mike, I'm not familiar with the M5203Q part and could not find a datasheet on it. Sometimes, board manufacturers use "house numbers" on parts, instead of the standard commercial ones. It's possible that that is what this number is. I'm sorry that I cannot help further with your question.

Posted by Mike August 27, 2013 - 09:35 pm
I need some help programming a few M5203Q eproms. Im not electronically inclined. Will this copy / program this eprom?
Thanks

Posted by Steve L. October 27, 2012 - 12:47 pm
Hi Paul, I appreciate the kind words. It's neat that you built the PE programmer and Z80 computer. I had a somewhat similar experience around 1976, building an 8080-based computer. I was lucky though, that the company where I worked had an Intel development system (in another building). Used that to burn the 1702A-based debugger for my 8080. Used every byte!

Posted by Paul Williams. UK October 27, 2012 - 12:21 pm
Thanks Stephen, that was fun. I constructed the Popular Electronics version in 1978/9 for a Z80 homebrew - it worked and I still have it. As you say, hand toggling each byte was arduous, but one1702A held enough code for a monitor, and another held the VDU routines. Those were the days...


1 - 2 - next> - last>>

Add your comments here...


Name:


Message:

Copyright © 2012-2013, Stephen H. Lafferty. All rights reserved.