Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Yet another PIC parallel port programmer

Status
Not open for further replies.
A couple of small points:

1) I would strongly advise using current limiting resistors on the LED's, it's not a nice way to treat either the LED's or your parallel port!.

2) The lack of capacitors round the regulators, it's essential to have capacitors on their inputs and outputs to guarantee their stability. It might work OK for now, but could be unstable under certain circumstances, or if built by someone else.

I consider it pointless taking minimal parts count to extremes, it tends to produce unreliable, unrepeatable, designs!.
 
I alreredy solderd it all togeter
 

Attachments

  • dcp01891.jpg
    dcp01891.jpg
    195 KB · Views: 884
I have built many PIC programmers so this time I try to make this a little different.

Instead of using two 9V batteries or AC adapter to power the programmer, I decided to try using a 9V and a 3V lithium battery combination. I don't know whether it is a good idea but one will never know unless one tried. It program all my PICs, including the 16F88.

The circuit diagram is a slight modification of the BrokeBenji design but still using two opto-couplers. I have to use very large values of LED resistors because I don't want to change my batteries too soon. :D

I have measured the idle current of the 9V battery to be 3.4mA when there is no programming activities.

You can find the circuit below and the corresponding WinPic800 settings. Note that I have use parallel port dataline D2 for Vpp control and D3 for Vdd control which is to match with my other programmers. So this is a bit different to Someone Electro's circuit and settings he just posted.

The programmer is shown in the following post. Enjoy.
 

Attachments

  • pp_bat_setting.gif
    pp_bat_setting.gif
    15.1 KB · Views: 862
  • pp_bat3_m.gif
    pp_bat3_m.gif
    15.5 KB · Views: 812
Photos of the programmer.
 

Attachments

  • pp_bat2.jpg
    pp_bat2.jpg
    35.7 KB · Views: 901
  • pp_bat1.jpg
    pp_bat1.jpg
    19.7 KB · Views: 831
Nice one.The first batery powerd programer ive ever sean.

I hate changing baterys so i used an wall wart.

And dangit myne is just a litle too big to fit in a tic tac box.
 
Are PGD, PGC, MCLR, VDD, VSS the only pins on the PIC that have to be connected to program it?

I've been fighting with this thing since yesterday and it still has yet to recognize or program a PIC. All the pins are producing the right voltages when I click them on / off in WP800, but for some reason it never reads back anything but zeros.

Maybe the LPT D0 is holding the ACK pin down + not letting the PIC reply?

So far, I've tried it with a 16F84A, an 18F1320 and a 16F873A.
 
The <Ack> pin is an input so it really shouldn't interfere with <D0>...

Depending on the PIC you're using, the 'erased' state leaves LVP (low voltage programming) enabled and a 'floating' PGM pin on the PIC will create problems (you can't put the PIC into high voltage program/verify mode)...

Another issue that may be critical for this simple design is the length of the parallel port cable... I had to make a custom 18 inch (45.72 cm) cable for my old P16PRO40 parallel port programmer before it would work correctly...

Please try grounding the PGM pin on your PIC and tell us if that helps?

Regards, Mike
 
OK, I haven't tried your suggestions yet, but I did get it to identify the PIC correctly. What I did was place a 150 ohm resistor between D0 and ACK.

Apparently, my parallel port draws a fine line between "active" and "HI-Z"--when I took the PIC out and probed around, there was no way to change the ACK pin from the PIC's connector (it was "stuck" to D0).
 
Well, now that I think about it, that makes sense and I suspect that's why all those old 'Tait style' parallel port programmers used 74LS05 or 74LS07 open-collector driver chips...

You may well have uncovered the flaw in this very simple design...

Regards, Mike

<added>

I wonder if the modification below would eliminate the problem? It should provide isolation similar to that of the 'Tait style' designs but would require flipping the <Dout> polarity in the programming software...
 

Attachments

  • programmer_optocoupler__3.jpg
    programmer_optocoupler__3.jpg
    34 KB · Views: 584
i_build_stuff said:
OK, I haven't tried your suggestions yet, but I did get it to identify the PIC correctly. What I did was place a 150 ohm resistor between D0 and ACK.

Apparently, my parallel port draws a fine line between "active" and "HI-Z"--when I took the PIC out and probed around, there was no way to change the ACK pin from the PIC's connector (it was "stuck" to D0).

Adding the resistor is a good decision and you need to move the PGD connection to ACK rather than the D0 line. I have added this resistor to my previous circuit I posted.

To Mike: I see no good reason to use another buffer for the D0 output. The D0 line is not supplying current to the PIC but only pull down the voltage(provided by the ACK line) on the PGD line so the PIC sees a LOW.
 
eblc1388 said:
To Mike: I see no good reason to use another buffer for the D0 output. The D0 line is not supplying current to the PIC but only pull down the voltage(provided by the ACK line) on the PGD line so the PIC sees a LOW.

It's not there as a buffer, it's there to provide an open collector output, so you can read the PIC (or indeed verify it). It's a 'nicer' solution than a series resistor.

As Mike suggested, this was the main reason for open collector buffers in the Tait designs, the second was to facilitate the Vpp switching. The third reason (for the buffer at all) was to give an extra layer of protection to the parallel port.
 
The MOSFET was added simply to provide an open-drain output for the "wired-OR" circuit requirement (where more than one output needs to drive the same line)... In this case both D0 from the PC and PGD from the PIC need to be able to drive the line...

The resistor mod' will work fine too... It'll only need to dissapate a few milliamps at 5 volts when the two driving signals oppose each other...

Regards, Mike
 
Mike said:
The MOSFET was added simply to provide an open-drain output for the "wired-OR" circuit requirement (where more than one output needs to drive the same line)... In this case both D0 from the PC and PGD from the PIC need to be able to drive the same line...

Regards, Mike

TTL output is very good in sinking current but can only source very little current. This has no problem because TTL inputs usually default to high logic level.

What I meant in the previous post is that you are effectively adding another stage to the existing TTL output stage. The following image is a typical output stage of a LS373 latch.

The D0 line is logic HIGH when the PIC is driving the PGD line so an additional 100R resistor is there to "protect" the D0 line output though it is not really absolutely necessary because of the TTL internal 100R resistor. The additional 100R is there to reduce the PIC internal driving current instead.
 

Attachments

  • ttl_op.gif
    ttl_op.gif
    9.2 KB · Views: 579
Here's a "fixed" version that tested OK for me.

D0 = Dout (inverted)
D1 = Clock
D2 = N/C (could be used for Vdd with minor changes)
D3 = VPP
ACK = Din

**broken link removed**
 
I would rather make the Vdd controlable. Because some PICs want Vdd before Vpp some the oposite.Meaby thats why he codnt program an 16F88.
It just takes reconecting that resistor to D2
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top