Full Featured PC-Based 4Mbit EPROM Programmer by David L. Jones The PC controlled EPROM programmer described in the September/October 1993 editions of Electronics Australia by Glenn Pure has generated quite a deal of interest, with many hundreds of kits being sold. Not very surprising considering that you could build your own EPROM programmer for a little over $100 !. The follow up article in November 94 describing enhanced software drivers for the kit also proved extremely popular, with most constructors opting for the improved software over the original BASIC source code. Being one the authors of the enhanced software drivers mentioned, I've received many requests for an improved project that would support larger device sizes, as the original unit could only support up to 256Kbit EPROM's as standard. Many constructors asked for 512Kbit support, which was a relatively simple hardware modification, but required new software to match, and many others felt there was a need for a low cost programmer to support the newer 32 pin EPROM's which are becoming very popular. In some cases cheaper than the 28 pin devices !. While it is possible to add support for larger devices on to the existing design, it starts to become quite messy once you go to 32 pin 1Mbit EPROM's and beyond. In fact, adding 32 pin EPROM support would require a new front panel PCB and complete rewiring !. This would also require three separate sockets to support the full range of devices. I therefore decided that it would be much better to redo the design from scratch, and not only add support for 32 pin EPROM's, but also add other bell's and whistles found only on the more expensive commercial programmers. My goal was to design a unit not much more expensive than the previous design, yet add new features like full software control, device ID detection, and support for 64Kbit to 4Mbit EPROM's. I also wanted to make the project easier to build by keeping the entire design on one single sided PCB without wiring, thus eliminating the extensive wiring required by the previous design which many constructors had problems with. The design would also operate off the PC's parallel port like the earlier unit. I'm glad to say that the design to be described here meets all of these goals, and delivers a project that can match much more complex commercial units costing many times the price. A commercial programmer with the same functionality will cost upwards of $350 !. The hardware design described here supports 2764, 27128, 27256, and 27512 28 pin EPROM's, 27010, 27020, and 27040 32 pin EPROM's, as well as certain types of 64Kbit and higher EEPROM devices. All compatible variations on these generic types are also supported. DESIGN CONSIDERATIONS : ======================= The first decision I made when redesigning the unit was to forego software compatibility with the existing design. I didn't have much choice in this, as the previous interface design could not be expanded to meet the new requirements. There were also some limitations of the previous interface that I wanted to overcome. What this means is that the existing software is not compatible, even if they did support larger device sizes. The next task was to try and design the circuit to fit on one single sided PCB. However, I quickly realised that a design using garden variety 74xx IC's, while certainly possible, could not be easily fitted onto a single sided PCB (no matter how much hair I lost trying !). Not willing to give up my single sided PCB quest that easily, I decided the only way was to use a custom programmed LSI device. The result of which is evident in the schematic. The single LSI device (a Lattice ispLSI 2032) does virtually everything, except for the address counting (I ran out of pins for that one !). The Lattice ispLSI 2032 device is an In-System Programmable (isp) Large Scale programmable logic device. It contains the equivalent of over a 1000 standard PLD gates, and can be completely programmed while in circuit. However, the in-circuit programming feature is not utilised in this design. The circuit for the 2032 device is the equivalent of about 8 standard 74xx series devices. Which is quite a saving in PCB complexity when you eliminate a good number of 8 bit buses from running all over the board !. I also decided to drop support for the 24 pin 2716 and 2732 EPROM's supported previously. Not only would it have overly complicated the design to add this feature, but these EPROM's are no longer manufactured or included in most data books !. This is the trend with commercial programmers as well, with very few having support for the old 24 pin EPROM's. CIRCUIT DESCRIPTION : ===================== As can be seen from the schematic, IC1 (the LSI 2032) handles all of the PC parallel port interfacing, complete control of the address counter (IC's 2 and 3) and the switching relays. In short, it does everything !. The only device not controlled by IC1 is relay RLY2, which is directly operated from the parallel port. Why is relay RLY2 so special ? I hear you ask. Well, it's not really special, it's just that I ran out of pins on IC1 !. IC1 connect's directly onto the data bus of the test socket (SK1), and is able to read and write data to the EPROM under software control. The same goes for address counter incrementing and resetting. IC1 also has programmable internal pull up resistors which are used on selected pins (saving more PCB space !). Due to the accommodation of the different EPROM sizes from 64kbit to 4Mbit, and support for 28 and 32 pin EPROM's, some the pins on the test socket have to perform more than one function. Pin's 22, 29, and 31 on the test socket have to be switched between two different digital signals, which is done internally to IC1 under software control. Pin's 3, 24, 26, and 30 are different in that they must be switched between a power rail (Vcc or +12V Vpp) and a digital logic signal. This cannot be accomplished directly by IC1, and must be done using the SPDT relays RLY1/3/4/5. The relays are switched under software control through IC1 by driving transistors Q1, Q2, Q3, and Q5, which in turn activate the corresponding relays. The PCB design can accommodate two different relay footprints of two different voltage ratings (6V or 12V). The two transistor circuit formed by Q6 and Q7 is used to switch the +12.5V Vpp programming voltage on and off. Q6 is driven under software control by IC1, which turns Q7 off and on via R8. R9 is used to hold Q7 off when Q6 is not on, and similarly for R10 which holds the Vpp rail low when Q7 is not on. The address counter used to supply the EPROM address, is generated by IC2 and IC3. They are 12 bit binary ripple counters, with IC3 clocked directly from IC1, and IC2 being clocked from the MSB Q12 output of IC3. Although the two counters can form an address up to 24 bits wide, only 19 bits are used to form a range up to 512K. The 512K address range will handle EPROM's up to 4Mbit (512K x 8) in size. Support for 28 and 32 pin EPROM's in the one socket requires switching the Vcc voltage to pin 30 (pin 28 on the 28 pin device), and is performed by relay RLY5. A single PCB mounted LED, LED1 is used to indicate the presence of Vcc power to the test socket. Make sure it is turned off before inserting or removing an EPROM !. Relay RLY2 is used to switch the Vcc voltage to both the 28 and 32 pin devices off and on. This allows safe insertion and removal of the EPROM to and from the test socket, without having to manually switch off the power. Relay's RLY1, RLY3, and RLY4 are used to switch the Vpp voltage onto the required pins depending on which EPROM type is being programmed. Switching Vpp onto the EPROM's A9 line (pin 26), was not done in the previous design, and is used to enable an EPROM's identification code to be read. Regulator REG2 is used to supply the Vpp programming voltage, with the variable resistor VR1 used to set this voltage, which is usually within 12-13V. It also supplies the input to the other regulators. Regulator REG3 supplies the Vcc voltage to the EPROM. This is selectable between 5V and 6V by the circuit formed by Q8. Q8 is driven by IC1 (again under software control), and when turned on, parallels R12 across R11 which produces a regulator output voltage of 5V. If Q8 is off, then only R11 is in circuit which will raise the regulator output to the required 6V. REG3 is also used to supply the coil voltage for the relays, which means that it will carry a few hundred milliamps whilst dropping 6 or so volts. I've found that the bolt used to secure REG3 to the PCB act's as a sufficient heatsink in most cases, however a proper heatsink may be required. REG3 is a simple 7805 5V voltage regulator which supplies the logic devices IC1, IC2, and IC3. REG3 may require a small clip-on heatsink if it gets overly hot, but will generally not require one. Although REG2 supplies everything on the board, including the other regulators, it should not require a heatsink because it is only dropping a few volts. The bolt used to secure REG2 to the PCB should be a sufficient heatsink. But if the input to the regulator is more than 16V DC, REG2 may require a small heatsink. The circuit requires a 16V DC or 12V AC plugpack rated at 500mA or greater. This input is full-wave rectified by diode bridge BR1, and filtered by C1. Without going into the details of IC1 and EPROM programming algorithms, that's all there is to the circuit operation, as almost everything is under complete software control. CONSTRUCTION : ============== The project has been designed to accommodate everything including the test socket and parallel port D connector onto the one single sided PCB. Construction is as simple as mounting the components onto the PCB, there is no wiring to be performed. You should have little trouble following the component overlay and circuit diagram, and experienced constructors will no doubt jump straight in without reading the "how to" !. Start off with the 28 wire links, some of which are very close to the IC sockets and will be difficult to neatly insert later. At this stage, the voltage selection for the relays must be done. This involves installing one of two different wire links. These links are marked with "6V" and "12V" respectively on the component overlay. If you have relays with a 6V coil, then install the "6V" wire link while leaving out the "12V" link, and vice-versa if you have 12V relays. The coil voltage rating should be marked on the relay case. Next install all of the resistors and IC sockets. IC1 requires a 44 way PLCC (Plastic Leaded Chip Carrier) socket, which will require careful insertion to avoid bent leads. Ensure that all of the leads are straight before inserting this socket, otherwise it will require a lot of patience to align the pins to the holes!. Also be sure to align the notch on the socket to correspond to that shown on the component overlay, as the IC can only be inserted one way. The notch is at the bottom left hand corner of the PCB. IC2 and IC3 do not require sockets, however this will aid in servicing and power up tests. If you are only going to use a 32 pin machine pin IC socket for SK1, then this should be inserted now, otherwise if you have a ZIF (Zero Insertion Force) socket this should be left until last. Leave the IC's out of their sockets for now. Now install the other components, ensuring correct orientation and placement of polarised components. When installing the regulators, bend the leads over and lay the regulator flat on the PCB to avoid breakage. REG2 and REG3 should be bolted to the PCB with suitable bolts. The programmer is not housed in a case, but instead sits open on stick-on rubber feet attached to the bottom corners of the PCB. This seems to be the trend with a lot of commercial programming units, and does make good economical sense. Why pay for the cost of a case if the design is completely self contained on one PCB ?. However, there is nothing to stop you from mounting it in a case if desired. SETTING UP ========== The only adjustment that has to be performed prior to use, is that of the Vpp programming voltage set with VR1. But first, the power up checks must be performed. Start by applying power to the board and measuring the voltage at the output of REG2. Adjust VR1 so the output is set at 12.5V. If you can't get this voltage, then check the input voltage, it should be at least 15V. Now measure the output voltages of REG1 and REG3. They should be at 5V and 6V respectively. It would also pay to check the voltage at the power pins of the IC's, which should be at 5V. Turn the power off and insert the IC's, being careful to watch the orientation. IC1 will only go into the socket one way, so don't try and force it in. The bevelled corner on the chip should be positioned at the lower left of the socket. Restore power to the board, and once again check the voltages on the IC's and the outputs of the regulators. The output of REG3 may have dropped to 5V depending on the power-up state of IC1, which controls the output voltage. You can now connect the board to the PC's parallel port with a 25 way IDC ribbon cable. This cable will require a female D25 on the programmer end, and a male D25 on the PC end. Now run the PCEBTEST program supplied with the software and follow the on screen prompts to test out the rest of the programmer. The programmer requires a DC supply of at least 2V above the required Vpp voltage, which will usually work out to at least 15V DC. Some 12V AC plugpacks may not be suitable for this project, due to the tolerance of the plugpack voltage and mains input. In this case, use another type of plugpack or drop the Vpp voltage down to the minimum required for the EPROM being programmed. USING THE PROGRAMMER ==================== Documentation is supplied with the software on disk, so we will only discuss the basic operation of the programmer here. The program is an enhanced version of my software which I supplied for the previous programer design (see EA Nov.94), although with extra features to support the new programmer design. Note, this new version is NOT backward compatible with the previous design. While the program supports all devices up to 4Mbit in size, this will require around 600KB of free base memory. If you have less than this, then the program will only support devices up to 2Mbit in size. Apart from the memory requirement, the program is less than 50KB in size and can be operated from a single floppy drive if required. No swap file is required as on the previous version. The program is entirely text based and does not require a graphics card to operate. All three standard parallel port addresses are supported, and can be chosen from the main menu. You only have to select the required port once, as it is saved in the programs configuration file. The screen interface and program operation is very similar to the previous version, with single 'hot-keys' used to access all functions from the main menu. The following basic functions are supported by the software : Read Program Verify Compare Blank Check AutoProgram Device Detection Load/Save/Edit data CRC Checksum The program is based around a central data buffer, which is used to hold the data to be programmed or edited. Reading an EPROM's contents will place the data in this buffer. The buffer contents can be loaded and saved to a specified file on disk. The data can be viewed and edited in both Hexadecimal and ASCII formats. The programmer does not have an ON/OFF switch, so an EPROM should only be inserted or removed when the program is running at the Main Menu, with the correct parallel port chosen. The program will disable all power and signals to the test socket when at the Main Menu. Power will only be applied to the socket when the user selects one of the commands that accesses the EPROM, at which point LED1 will be ON. Do not insert or remove an EPROM while the LED is ON !. When inserting a 28 pin device into the test socket, be sure to insert the chip closest to the bottom of the socket. IE. the ground pin is common to both 28 and 32 pin chips. Inserting the chip in any other position will not work and possibly damage the device. The program supports a multitude of different device types, which can be selected from within the Type library. The user is also able to add their own device types to the library. The correct device type must be selected in order for the program to communicate properly with the EPROM. Automatic device ID detection is a feature which enables the software to automatically detect the brand and type of an EPROM. This is useful when the markings on a device are hard to read. If device ID is enabled from the main menu, then the program will try to detect the EPROM type before Reading, Comparing, or Programming, and then automatically choose the correct device type in the software. This is assuming that the ID of the EPROM (if it has one) matches one that is already stored in the programs Type library. Start and End addresses can be chosen to enable the software to only operate on one part of an EPROM if desired. Checksum calculation is also scaleable to the range between the specified Start and End addresses. All of the timing for project, including the programming pulses, are generated by the software. The software will calibrate itself when started, which will take three seconds. If your PC has a turbo switch, then do not touch this after the program has loaded, otherwise the timing routines will be affected. Whilst the nominal programming voltage of 12.5V that was set during the setup process should be adequate for the majority of EPROM's available, some devices are more sensitive and may require adjusting the programming voltage. Be sure to select the correct device type and algorithm before accessing an EPROM. If in doubt, consult the relevant manufacturers data sheet. I've found that EPROM's are quite easy to damage by using an incorrect algorithm and/or programming voltage. In many cases the chip is not completely ruined, and appears to function and program correctly except for occasional errors. This was very frustrating when developing the project, as it was difficult to know if it was a faulty chip, or the software !. One last safety message !. When erasing EPROM's, be sure to avoid exposure to the Ultra Violet light used for this purpose. The high levels of UV light used for EPROM erasing can permanently damage the eye's and skin. It is recommended that only a good quality commercial eraser be used, to avoid accidental exposure to UV light. In short, both the programmer hardware and software operate very similar to commercial programmers, as well as providing most of their functions. I hope you'll find the programmer easy to use and very functional. Happy burning !.