EPROM programmer for the Kaypro R. Bardarson P.O. Box 223 Calverton, NY 11933 516-369-7334 With a handful of IC's and support components, you can build a simple EPROM programmer for your Kaypro. What Are EPROMs? An EPROM is Erasable Programmable Read Only Memory. The name is often shortened to PROM or ROM though technically an EPROM, a PROM, and a ROM are each a somewhat different animal. Though we will use all three names, we are talking about EPROMs in this article. You can erase EPROMs by exposing them to strong ultraviolet light. You program them by putting address and data information on the address and data pins along with the programming voltage (usually 25V) and the proper selects. The beauty of an EPROM is that unlike RAM, it doesn't lose its mind when you shut the power off. Its information is ready and waiting to tell your system how to boot your system disk when you turn on the power. (Remove your system EPROM sometime and then turn on the power if you want to see how your system reacts when there is nothing to tell it what to do. Then power-down before reinstalling the EPROM.) The Programmer The programmer can handle 2716's, 2732's, and the newer electrically erasable 2816 PROM's. The circuit is simple to keep the cost down (should be under $25 if all parts are purchased new) and to allow parts substitution. The software is not burdened by fancy features or dependent on the actual hardware chosen. I put the hardware driving software routines in macros, so you can make hardware substitutions. For example, suppose you used 7476's for the address counter, then only the reset macro and the initial data (INITDAT equate for the reset bit) need to be changed. And, for the sake of simplicity, the software doesn't check to see if you've made a reasonable input. The programmer has its own 555 timer so it isn't effected by the Kaypro's clock speed. Theory Figure 1 (see Micro C issue #18) is a block diagram of the programmer. The general purpose PIO on the Kaypro is used to drive the programmer, with port A handling the bidirectional data exchange and port B controlling the programmer's operation. The current sinking and sourcing requirements will allow the direct connection shown to the PROM. Two port B outputs are provided to the header for read/write control. The PROM socket is just a Zero Insertion Force (ZIF) socket with all the pins except 18, 20, and 21 permanently wired to signals. Connections to these last three pins are determined by the type of ROM being programmed. The address counter provides the PROM address, this function is best handled with hardware since most PROM programming is done sequentially. The 12-bit binary counter has 2 bits on port B. One bit is used for reseting the counter, the other for counting. The first 11 address bits (A0 to A10) are wired to the PROM, A11 is routed to the header. The counter may be made of any combination of binary counter IC's as long as 12 bits of output are provided, a common reset line is used, and all bits clock on the same edge. The Timer The timer is a monostable circuit which provides the programming pulse to the PROM, the programming pulsewidth is RC controlled. The timer has 2 port B outputs for reset/disable and trigger, and 1 port B input for timing control to inform the software when the pulse has completed. The timer output to the header is both normal and inverted, since 2716s and 2732s require opposite types of programming pulses. Another timer line is supplied to the header for use with the timing resistor, so different pulsewidths can be used for different EPROMs. Voltage Control The Voltage Switch provides two adjustable voltage levels. One port B output is used to control voltage level selection. The high voltage is generally required for programming and the low voltage for reading. The following resistor values assume a .1 uFd capacitor and the LM555 being the timer chip, note that the pulsewidth with 330K is about 37ms which is below the 2716 minimum specification of 45 ms, however no problems have been experienced with these values. A 2716 header is created by: a) Jumpering 1 to 16 b) Jumpering 2 to 15 c) Jumpering 4 to 14 d) Adding a 330K resistor between pins 7 and 10 A 2732 header is created by: a) Jumpering 12 to 16 b) Jumpering 4 to 15 c) Jumpering 3 to 14 d) Adding a 330K resistor between pins 7 and 10 A 52B13/2816 header is created by: a) Jumpering 2 to 16 b) Jumpering 5 to 15 c) Jumpering 12 to 14 d) Adding a 100K resistor between pins 7 and 10 Program The program is menu driven with the following options supplied: A) Check that each PROM address contains FF Hex, any address that does not contain FF, is reported to the screen. B) Select 2716 2K UV EPROM type. This is the default PROM type, and this selection is only necessary when C or D has been previously selected. C) Select 2732 4K UV EPROM type. This selection changes the default values stored for the 2716, when programming 2732's this must be the first selection made. D) Select INTEL 2816A or SEEQ 52B13 2K EE PROM type. This selection changes the default values stored for the 2716 and erases the EE PROM, when programming 52B13's or 2816's this must be the first selection made. E) Read a File into memory: Load a file into the programming data area at 4000H. F) Create a File from memory: (File size = PROM size) The file written is an image of the programming data area. G) Program a PROM with memory data: located at 4000H. This takes about PROMSIZE*(PROGRAMMING PULSE) seconds. A verify is NOT performed since this is a reliable operation. H) Read a PROM into memory: For copying or verification purposes. I) Cyclic Redundancy Check on memory data: A quick and useful check on the programming data area's contents. J) Dump of memory data: Similar to DUMP.COM, and again no line control is provided. The listed addresses are related to the PROM, showing 0000H though the data really begins in memory at 4000H. Caution One caution. During power up and power down on the PROM, the programming voltage MUST be turned on AFTER VCC is applied and the programming voltage must be turned off BEFORE VCC is removed. Since both supplies are switched, this is an important caution. I know of no simple way to prevent the operator from applying the power incorrectly (a PROM costs about $4, the protection circuit shouldn't cost too much more for THIS type of programmer). Also, there is no protection against inserting a ROM backwards. Either error will destroy the ROM. Schematic Figure 2 (see Micro C issue #18) is the schematic. Note that power to the ICs is not shown and that .01 uFd capacitors should be used across the power pins. The circuit is based on the parts I had on hand. The external programming voltage can be any adjustable supply with a range of 20 to 27 volts that is capable of delivering at least 50 milliamps. A TL431 works fine. The four transistors I used came from the parts box, Q1 and Q2 were unmarked NPN's in a TO-5 can, Q3 and Q4 were 2N1490's because they were on hand and the TO-5s were failing. U1 to U3 are 7493's and U4 is a LM555. Additional components needed: 1 - 24 pin Zero Insertion Force Socket 2 - 40 pin ZIFS if the Kaypro Connection is used (figure 3 - Micro C #18) 1 - switch 1 - Light Emitting Diode in the color of your choice 3 - bypass capacitors, .01 uFd , at least 1 for the 7493's, PROM, and LM555 ? - 16 pin headers, depends how many PROM varities being programmed Miscellaneous support items such as a board, wire, soldering iron, burn ointment, etc. Construction The programmer requires two parallel I/O ports and the simplest way to obtain access to them is to use the general purpose PIO (U54) socket. To accomplish this, I soldered a 40 pin ZIF socket to a 40 pin header and plugged it into U54's socket. When I need a parallel printer, I plug the PIO chip into the ZIF socket. When I use the programmer, I plug a 40-pin wire-wrap socket on the programmer board into the ZIF socket in U54 and plug the PIO chip plugs into another ZIF socket on the programmer board. The ZIF socket on the programmer is soldered to the wire-wrap socket and all pins from the wire-wrap socket except the A and B port pins (see schematic - Micro C #18) plug into U54 (see Figure 3 - Micro C #18). The programmer gets its 5V from the PIO socket. Someday I'll reprogram the monitor and rewire the main board to shift the printer to the B port on the System PIO since I occasionally experience problems with this mechanical The remainder of the programmer is constructed on a 3'' by 5'' piece of IC prototype board.