Home Page. . . . . . . Circuits page . . . . . . . . neelandan-at-gmăil·com

This is my version of the Trivial High Votage Programmer. It is based on Byron Jeff's
Trivial High Voltage Programmer, but includes the signals for Low Voltage Programming
on board. If you ever need to use LVP use a cable with the different signals to the PIC.

The programmer built on a piece of copper clad board just the size of a dongle I picked up at the junk
market, and fits into its shell. A length of five conductor ribbon cable terminates in a home made header.

Warning: If you try this circuit on a solderless breadboard you are likely to damage
the hapless PICs rather than program them. Any slight movement of the zener diodes
and the full unregulated voltage is fed to the device, damaging it instantly.

Always solder this up permanently, you will need all connections reliable and firm. Use a general purpose
board and point-to-point wiring.

The programmer plugs into the parallel port and a short length of five conductor cable connects to the PIC being
programmed.

"Header" is just a fancy name for a small piece of circuit board with stiff wires soldered on. I use the
cut off leads of LEDs. It can be inserted into a solderless breadboard, or a mating socket can be included in your
experimental PIC board.

My usual approach is to wire a piece of IC socket matching it on the project board so that a quick connection
to the programmer is possible, making it easy to update the program without having to extract the PIC.

The programmer in use, programming a 16F84A. This chip can only be programmed in the High Voltage Mode.
The signals on the header are ordered so that the linking is straightforward. The high voltage programming signal
is distinguished by being set one position apart from the rest. This assymmetrical layout helps prevent errors.
The same connections may be used to program most 18-pin PICs in HVP mode.


The settings for using FPP in high voltage mode:


Construction

The first step in constructing this programmer is to get the parts and tools together. You will
need a power supply capable of supplying about 100mA (or more) at at least 15 volts. Such
units are available, with integral plug, called "wall warts" in the USA.

The figure shows the business end of one such supply
and the socket that receives it. One problem is that
these are made with both polarities: The center contact
can be either positive or negative. In most cases, it will
be found possible to use an existing supply for this
purpose if it has the necessary ratings.

My solution to the polarity problem is to wire two sockets in parallel, so that both types can be
accommodated. This is because I have both types in hand and I like my programmer to be ready
to go with either of them.

A multimeter or some such device to measure voltages is necessary. This will be used while testing
the programmer, an essential step unless you wish to risk frying your chips by applying the wrong
sort of voltages. A soldering iron and the skill to use it is, of course, necessary for all electronics construction.

The following is a list of parts:

1. 25-pin D male connnector (parallel port connector - has to suit the printer connector of your computer)
2. Sockets - 2 - to suit wall wart jack
3. Circuit board - General purpose, or copper clad, of adequate dimensions. Buy a large piece - it can be cut to size.
4. Hex CMOS noninverting Buffer CD4050 - 1
5. Red LED - Light Emitting Diode. -1
6. Green LED - 1
7. NPN Transistor - BC548 or equivalent. Almost any transistor will work, provided you accommodate for the differing pinouts.
8. Zener diode 4.7 Volts - 1
9. Zener diode 10 Volts - 1
10. Diode 1N4007 or equivalent - 1
11. Capacitor 100 nf (0.1 microfarad) 12V - 1
12. Resistors 10 Kilohm - 5
13. Resistors 1 Kilohm - 2
14. Resistor 330 ohm - 1
15. Resistor 3.3 Kilohm - 1
16. Wires, solder, mounting hardware, nuts, bolts, etc.

The first step is to Plug the wall wart (or power supply) into the mains and check that the voltage at its plug is more than
12V (ideally it should be more than 15V, with no load connected). This is because some PICs require at least 12V at its
MCLR in order to go to the programming mode.

The sockets have three terminals, of which only two are used. Mate one of the sockets with that plug and find the terminals
which get the voltage. These two terminals of the two sockets are then cross connected.

The next step is to wire up the power indicator LED - this is green, and lights up when you have inserted the power
supply jack into the right socket.

I have assembled my prototype on a piece of plain copper clad board, the copper being cut away to form "islands" and the
components placed across the gaps. I have used surface mount components (rescued from old hard disk driver boards) but
the technique is equally applicable if you use standard leaded components too. The 25-pin D connector is soldered at the
left hand side and the two sockets and ribbon cable to the PICs are at the right hand side. The two sockets for the power
has been formed from thick wire and some springy stuff from a pcb connector.

The figure shows the power jack
in cross section and the method of
connecting the D connector to the
plain copper clad board, and the
technique of forming the sockets
"on board".
First, the two sockets, the diode (1N4007),
the 3.3K resistor and the green LED are assembled,
so that the circuit now looks like this:

Test it.

The Green LED should light when you insert the jack
into one of the sockets. If you have different wall
warts it might be worthwhile trying all of them.

If one of your adapters light up the LED when you
insert its plug into either jack you can't use it - it has
a.c. output, and probably is intended to be used with
a modem or similiar instrument which requires
alternating voltage.

Then you wire up the components for the two supply voltages: One in the range 4.5 to 5.5 for the main supply
to the PIC being programmed, and the other, a "high" voltage between 12 to 14 volts for programming the device.
The nominal 5V supply is generated by the 330 ohm resistor, feeding the 4.7V zener diode. The programming voltage
is generated by the 1K resistor feeding the combination of the 10V zener and red LED in series.

So the circuit now looks like this:

Test it. This is where the meter
comes in. The voltage at the
junction of the 330 ohm resistor
and the zener diode should be
somewhere between 4.5 and
5.5 volts. It will not be exactly
4.7 volts because of tolerances
in the said diode's manufacture.

To measure this voltage, you will
clip the black lead of the meter
to the circuit common (or
"ground") and the red lead to the
top of the zener diode. If this
voltage is low - around half a
volt - chances are that you have
gotten the zener backwards.

Likewise the red LED, too, will
light up and the voltage at the
junction of the 1K resistor and
the 10V zener should be between
12 and 14 V. If it is different, you
should try different zeners or LEDs
until the voltage is just right.

Next, you will have to wire up and test the transistor - this switches the programming voltage on and off, so that the PIC enters or
leaves programming mode. It is connected across the programming voltage so that when the transistor turns on the current through
the 1K resistor all gets shunted to ground and so the voltage is zero - or very close to it.

When the transistor is off the voltage at the programming pin is limited by the onset of conduction of the 10V zener and red LED - a
modern red LED has a forward voltage of around 2V so the series combination will start to conduct (and the LED to light) at around
12V or greater. The red LED lighting up signifies that the programming voltage is being applied to the PIC. It is sometimes nice to
know just what is happening to your PIC.

Add the transistor and its base
resistor, so that the circuit has
now become this:

Now you have to check it.
With the voltmeter connected
to the collector of the transistor,
check that the voltage there is
between 12 and 14 volts, ie,
the same as before. This checks
that the transistor is not shorted,
and that you have not gotten
it backwords or the pins in
wrong order.

Now if you connect the top of
the base resistor to the 5V line
the red LED should go out and
the voltage should become less
than half a volt. If this is not
happening, either the resistor is
bad or the transistor is, or you
have it in the wrong orientation.

When you have successfully navigated so far, it is time to bung the rest of the components in. It would be wise to put
the integrated circuit in last, after checking the rest of the circuit for errors, so that anything which can potentially damage
it can be avoided.

Two
stages
in the
wiring
of my
prototype
are shown
here.

The green LED suddenly died, and I had to replace it. The replacement lights up green but has a transparent body.

When all the components except the integrated circuit has been fitted it is recommended to go over the whole board with a
magnifying glass, inspecting the soldered joints for opens and the gaps for short circuits. Measure each resistor with the meter
in 'ohms' range to make sure that the stresses of soldering have not caused damage.

The picture above is of the board after the D plug has been soldered on, and before the integrated circuit is soldered in.
The wires are arranged in a sort of colour code: Green is data. Brown is clock. Blue is mclr. White is prog (used only
for LVP). Orange is the programming voltage, and Red is the Supply voltage. Black is ground.

If everything checks out all right, the integrated circuit may be fitted, completing the construction. A length of five conductor
ribbon cable (split from wider stock) may be soldered to the pads next to the LEDs and terminated in a five pin header, or
a set of sockets wired for your favourite processors, whichever way you prefer.

 

Home Page. . . . . . . Circuits page . . . . . . . . neelandan-at-gmăil·com