Type "40" to clear the address counters. Connect a 'scope or logic probe to pin 20 of the EPROM socket. Type "30" then "2F". A 40 millisecond positive going pulse should be observed when "60" is typed. Type "20", and the pulse when typing "60" should now be negative going. Now type "23" and the line should remain at logic 0 when "60" is typed. Move the probe to pin 22. Type "2F" then "31" and the line should be at logic 0. Type "30" and it should go to logic 1. Now type "20" and it should rise to 21V. Move the probe to pin 23 which should be at logic 0. Type "2F" and the line should rise to 25V. Move the probe to pin 26, which should be at 6V. Type "20" and it should go to logic 0. Finally move the probe to pin 27 and type "23". A 40 millisecond negative going pulse should be seen when you type "60".

If you have reached the end of all this successfully you can be confident that your EPROM programmer is 100% functional!

The Case.
The prototype was mounted in a plastic case (type MB6) having external dimensions of 220 X 150 X 64mm. The removable panel is considered to be the bottom, and may be fitted with self-adhesive feet if required. The top surface needs cut-outs for the EPROM ZIF (Zero Insertion Force) socket and the LED's, as well as four fixing holes for the PCB. You may also wish to make four small holes to enable adjustment of the presets.

The rectangular cut-out for the ZIF socket may be made by drilling a line of shall holes around the edge then breaking out the centre part and filing to shape. Take care not to file the hole too large or the result will look untidy! The socket is raised above the PCB by stacking up a number of 28 pin DIL IC sockets, three were used on the prototype. If the result feels insecure, the sockets may be held together with a suitable adhesive.

Position the PCB and mark the positions of the four fixing holes and then measure the positions of the three LED holes. The first LED is 4mm down and 6mm to the left of the top right fixing hole (view from outside the box), the other two are spaced below at 9mm intervals. The fixing holes are 3mm in diameter whilst the LED holes are 5mm. Also drill suitable holes in the rear of the case for the DC input socket and the RS232 cable or connector. On the prototype a 3.5mm jack socket was used for power (since this matched the plug on the PSU), and the RS232 cable passed through a hole fitted with a grommet. Choose connectors that are not likely to come unplugged accidentally! The case may now be marked with rub-down transfers or similar if required.

Solder suitable lengths of wire to the PCB for the off-board connections and insert the LED's through the holes in the PCB (do not solder yet). Mount the PCB in the case using M3 screws, nuts and spacers, then position the LED's so that they slightly protrude through the holes and solder them into place. Complete the interwiring (see Fig ##) and assemble the case. If an additional smoothing capacitor was found necessary whilst testing, this may be mounted across the pins of the DC input socket, or on the rear of the PCB in parallel with C21.

Software Description.
The following information describes the operation of the software shown in Listing1, Listing 2 and Listing 3 (these listings are included in the software download).

In the following section a reasonable understanding of programming in BASIC is assumed. The software was written for Microsoft BASICA, as supplied with Compaq DOS 3.31. It has also been tested with QBASIC supplied with MS-DOS 5 and with Microsoft QuickBASIC V4.5. Users of other BASIC dialects may have to modify the code to suit.

The first test program is shown in Listing 1. Line 70 opens COM1 (the first serial port) at <9600> Baud, <N>o parity checking, <8> data bits, and <1> stop bit. The timeout on CTS (clear to send) is set to 200 milliseconds, CD (carrier detect) and DSR (data set ready) are disabled. Another serial port could be used in place of COM1 if required, by editing this line.

Line 80 accepts an input from the keyboard, the semicolon causes the cursor to remain on the same line after <Enter> is pressed. Line 90 terminates the program if no value is entered. Line 110 converts the entered data from a two character string to a single byte and sends it down the serial port. Note that in BASICA Hex numbers are indicated by preceding them with "&h", hence the value of "&hFF" is 255.

Lines 120 to 170 responsible for waiting up to 0.1 seconds for data to be sent back up the serial port and displaying it. TIMER is a BASICA variable which contains the number of seconds since midnight to 2 decimal places (updated 18.2 times per second), this is used in lines 120 and 130 to control the timeout. EOF(1) will have a value of 0 if data is present, otherwise it will be 1. Line 140 prints "**" if a timeout has occurred, otherwise lines 150 to 170 read the value, convert it from a single byte to a two character string (using the HEX$ function) and print it. Line 180 loops back round for another go!

The second test program, shown in Listing 2, is used to test the address counter system. This clears the counters and then repeatedly increments them, by sending the appropriate codes. The operation should be evident, given the information above.

The main control program is shown in Listing 3. This software is about the minimum required to make sensible use of the programmer. It is written in a manner which should make the functioning relatively easy to understand, and is not intended to be an example of good programming!

The subroutines at lines 7000 to 7060, and 8000 to 8020 fetch a byte from the serial port and send a byte to the serial port respectively. Their operation is as described in the Listing 1 details above. These subroutines are called frequently by the remainder of the program.

Paging Previous 1 2 3 4 5 6 7 8 9 10 11 12 Next



Back to Top