There are many EPROM Programmers sell in the market. Generally those devices have the ability to programmed many type of ICs. But unfortunately, the value is still very high for the home constructor and hobbies. Even if we only want to program a simple type of EPROM IC. The circuit here is the implementation of the 2764 type EPROM programmer. I expand it from the article made by Moh. Ibnu Malik (see the reference below). It is a quiet simple one and the most important thing that it is a low cost value. The only one condition must be fill is the requirement of a computer. Because this device use an LPT printer parallel port adapter as the connection. The function is only for writing the EPROM and can not be used to read data from EPROM, because we want to maintained the simplicity of the circuit by itself. Add more function will add the complexity of the circuit. It doesn't seem that this function can't be add to the LPT port, as we may know that this port only for sending data. But in now a days many devices can be attach to this port, like : scanner, storage media (zip drive, tape cartridge, even hard disk, etc.), etc. This devices can receive data from parallel port. Secondly, many of LPT parallel port products in recent years can be programmed as multi I/O (have the capability to read and write or bi-directional). So it is all our decision to make what kind of device that we want to connect to.
In the original design, the hardware only have the write capability. But I had added the option for read data. As long as we have the bi-directional LPT port adapter, this feature can be added to our card. But this option only valid for the new LPT card (see how to checked this feature at LPT parallel port adapter topic). For the old card, it must be configured first, needs a little hardware modification (see change an old LPT card). But I think, many of these ports are uni-directional ports For this port, we can't read from outside, without add more hardware. If we used PC port for writing and PS or DP ports for reading, we can used it to read/write the EPROM (more details of the hardware can be seen at LPT parallel port extender topic). By used this optional card, our EPROM programmer can be run on uni-directional LPT port adapter or standard LPT port adapter, used the same program to run.
2764 type EPROM is a 8192 byte erasable and electrically programmable ROM. This device is packaged in a 28 pin Dual In Line Package (DIL/DIP) with transparent lid. The transparent lid on the package allows the memory content to be erased with ultraviolet light (more discussion about it, go to EPROM eraser topic). 2764 type EPROM usually have the programming voltage about 21V or 25V (in the old fabricate) and 12.5V (in the new fabricate). The new one is coded an A like : 2764-A in the package. This is an Intel product. We choose the new one voltage to implementation. The complete operation mode selection is like below :
Pins Mode | ||||||
Verify | ||||||
This circuit use 8 bits of data line (DP) and 4 bits of control line (PC) and 3 bits of status line (PS) as bits for identifying of our card and for mode operation detection. PC bit 0 (stobe/inverting output) is used for PGM pulse, to program the EPROM. PC bit 1 (autofeed/inverting output) is used for resetting the address counter. We used a CMOS 4040 binary counter to increment the EPROM addresses. PC bit 2 (init/normal output) is used for A12 address because the binary counter only for 12 stages. PC bit 3 (select in/inverting output) is used for increment pulse for the address counter. PS bit 3 (error/normal input) and PS bit 7 (busy/inverting input) are used for identify card. If this bit Lo and Hi meaning that the EPROM programmer card is connected. You can choose another bits or the combination of it if you want. PS bit 4 (select/normal) used for detection the manually selector switch. If this bit lo, it means read operation mode choose. All of this only valid for bi-directional port. For standard port, only PS bit 3 be checked, and the detection of mode operation can not be performed because we have run out all input function. I drawn this circuit with protel ver 1.0 and the PCB layout with protel ver 1.5
A Programmer's Introduction to C#, Second Edition
A Programmer's Introduction to C#, Second Edition
- See the EPROM programmer schematic diagram in GIF format.
- See the EPROM programmer pcb layout in GIF format.
- Programmers Introduction To Debugging C
First, I implemented the software in Turbo Pascal. The programming stage was perform by given the PGM pin lo during 50 milli seconds (see the characteristics data for Standard EPROM Programming Algorithm). Beside that there is one more programming algorithm (see the characteristics data for Intelligent EPROM Programming Algorithm), but I didn't implemented here (I am still working on a complex EPROM programmer project, that cover all of EPROM type from 2716 up to 27512 type). An implementation of this algorithm can be obtained from Andrew's eprommer project. Thanks to Tom Johansen for this link page. The difficulty is how to get the exactly 50 milli seconds delay time in Pascal? Using the DELAY(N) statement in pascal can solve the problem, but only for one type of computer, not for the other type (I mean for any range of PC type;PC, PC/XT, AT, 286, 386, 486 or even a pentium). I create a subroutine object in assembly language to link in pascal, it doesn't work, but it works in pure assembly. So I make a starting program run in assembler and call a child program to execute in pascal. The program seems to work good. The algorythm that I used is like this : To get a 50 milli seconds delay time, I reprogramming the PIT channel 0 in PC to active at 1 milli second delay time (standard delay time is 54.945 milli seconds, i.e. 18.2 clock ticks/second). This timer is used for INT 08H hard ware interrupt to generate a clock tick and used by disk drive delay time. This also used by INT 1CH (for user interrupt). So we must make the subroutine in order not to mixed up the computer work. But there is still a miss rounded number because we can only rounded nearly 55 milli secons (18 ticks/second). So there is a delay in the display time in orde a few seconds per day. After the programming end, everything is return as before (So it doesn't matter for a few minutes). At last I found the methode to get the exactly how to make the delay time without depends on the computer types (processor independent delay), see the references below for the detailed. The fixed hardware time delay was implemented in the IBM PC/AT and continued in all 286, 386, 486, and Pentium based IBM and compatibles computers. IBM made PB-4 of port 61H toggle every 15.085 uS (this maybe efresh time of DRAM). The routine is like this :
Delay_50_mS Proc Near
MOV CX,3314 ;Count of 15.085 uS, about 50 mS delay
PUSH AX
Delay_1: IN AL,61H
AND AL,10H ;Check PB-4
CMP AL,AH ;Did it just change ?
JE Delay_1 ;Wait for change
MOV AH,AL ;Save the new status
LOOP Delay_1 ;Continue until CX zero
POP AX
RET
Delay_50_mS ENDP |
So the program can be write in pure Pascal like below, and I compiled it using Turbo Pascal version 5.5. Here is the program looks like when in the programmed mode.
PROCEDURE Delay_50_mS;
BEGIN
Regs.CX := 3314; { Count of 15.085 uS, about 50 mS delay }
REPEAT
REPEAT
Regs.AL := PORT[$61];
Regs.AL := Regs.AL AND $10; { Check PB-4 }
UNTIL Regs.AL <> Regs.AH; { Did it just change ? }
Regs.AH := Regs.AL; { Save the new status }
DEC(Regs.CX);
UNTIL Regs.CX = 0; { Continue until CX zero }
END; |
Bits used for this EPROM programmer are :
For PC bits : PC-3 PC-2 PC-1 PC-0 (17) (16) (14) (1) Function : Address A12 EPROM Reset ____ ___ clock 4040 PGM or CE Reset 4040 0 0 1 1 0 1 0 Increment A12 0 1 0 0 1 1 0 Read EPROM 0 0 1 1 0 1 0 Stand by/Inhibit 0 0 1 1 0 Write EPROM 0 0 1 1 0 1 0
For PS bits : PS-3 PS-4 PS-7 (15) (13) (11) Function : Identify Select Identify Card check 0 X 1 EPROM read mode 0 0 1 Eprom write mode 0 1 1
Data send to the port for mode operation are :
Write mode operation : For Low Address A12 (A12 not active): Stand-by: Program: Inc. Address: * Bi-directional port PC_Port:=$02; PC_port:=$03; PC_Port:=$0A; * Standard port DP_Port:=$49; DP_Port:=$48; DP_Port:=$41; For High Address A12 (A12 active): * Bi-directional port PC_Port:=$06; PC_Port:=$07; PC_Port:=$0E; * Standard port DP_Port:=$4D; DP_Port:=$4C; DP_Port:=$45; Read mode operation : For Low Address A12 (A12 not active): Stand-by: Read: Inc. Address: * Bi-directional port PC_Port:=$02; PC_port:=$23; PC_Port:=$0A; * Standard port DP_Port:=$C9; DP_Port:=$C8; DP_Port:=$C1; For High Address A12 (A12 active): * Bi-directional port PC_Port:=$06; PC_Port:=$27; PC_Port:=$0E; * Standard port DP_Port:=$CD; DP_Port:=$CC; DP_Port:=$C5;
Data file to be programmed have the extension as *.EDF (stand for EPROM Data File as default). This file may have another extension as you wish. Such as, if your data file was a compiled program or just only data. The file can also be build by used a simple EPROM editor. This program I create to make data for Fonts Generator program. But it may be used to input any other data or program in machine hex code.
With the read capability, we can make a compare option mode (verifying mode). But its rather compare then verify, since we couldnot do the step in a byte but in a whole process. For this purpose I make 2 buffer as one for input data buffer and another one for reading data buffer. After programming process has complete, reading mode must be perform first, and then comparing can be done. Part list for the EPROM Programmer :
- Resistors :
- R1 = 82 Ohm (1/2W)............................................................... 1 pce
- R2...R7 = 4k7 (1/4W).............................................................. 6 pcs
- Capacitors :
- C1 = 470uF/25V...................................................................... 1 pce
- Diodes :
- D1...D5 = 1N4001................................................................... 5 pcs
- LED1...LED2 = Red 3 mm......................................................... 2 pcs
- Semiconductors :
- IC1 = 7812............................................................................ 1 pce
- IC2 = 7805............................................................................ 1 pce
- IC3 = 4040............................................................................ 1 pce
- Others :
- Transformer Tr1=500mA/15V sec, 220V pri ................................ 1 pce
- IC Socket for 28 pins or textool type.......................................... 1 pce
- Selector Switch S1..S2 (dpdt).................................................... 2 pcs
- Power-On Switch S3 (spst)....................................................... 1 pce
- Cable (0.75sq X 16c)............................................................... 2 m
- DB-25 Socket (male)............................................................... 1 pce
None of changes will be need if we connect the programmer card to the bi-directional port or standard LPT port, but you must be remember that to connect to the standard LPT port, it needs additional LPT extender card which must be configured so the pins compatible with the pin number of standard LPT port. Refer to the schematic diagram for more infos.
PCB mounting. As usual, I prefer to put the whole unit on a piece of board like showing below. It is easy to take some measurement point, and besides that more easy to insert or take out the EPROM by itself. For the EPROM socket, it is all your decision what type you might be want to use. It's very good if you can use one like textool type
No comments:
Post a Comment