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.

Why is PIC ICSP not using TxD for data?

throbscottle

Well-Known Member
Ok this is my very first post, please be gentle :-)

I've recently gone on a mad dash from repairing an ancient oscilloscope to wanting to build a PIC based frequency counter (to calibrate it) and other PIC based instruments (there is a logical train of thought there, honestly!) but apart from what I've read on the internet these last few days, I know hardly anything about microcontrollers or about RS232.

So having very little in the way of funds, I thought I'd see how I can build a programmer, and found my way to serial port programming using the JDM programmer and it's derivatives. As far as I can see on all these circuits, only DTR and RTS are used to transmit the data and clock signals, with TxD only being used to generate Vpp, which as I understand it has to be a steady DC voltage. Since RTS and DTR are originally intended as handshaking lines, why are they being used to send data and clock? Why is TxD not being used for anything other than Vpp?

(for those who are interested, I only have a laptop so I'll be using a cp2102 usb-uart bridge dongle - won at £0.56 on ebay, and some prayer, since people have reported mixed results with these (not as good as FTDI232 but better than PL2303) for PIC programmers, and Arch Linux. It hasn't arrived yet so I can't test anything.)

I really hope someone can answer this, because I'm failing to find the answers anywhere and it's driving me nuts.

Many thanks in advance.
 
Last edited:
The pic requires synchronous serial (clock and data) and TxD is asynchronous.

BTW, JDM programmers are VERY unreliable with USB-RS232 converters.

Mike.
 
Thanks :-) I wonder how long it would have taken me to arrive at that on my own?

I'm sure I'll be back on here as the project progresses!
 
The problem is getting 13v6 from two of the lines.
If you can't get 13v6 try adding it as follows:

**broken link removed**
 
Thanks for that - I'd been planning to use a boost converter/charge pump on the 5v line (from usb) to get vpp, or do LVP, at least until I can get a better arrangement. The dongle doesn't supply rs232 style signals, it purportedly gives a ttl style output, so the jdm style arrangement for deriving voltages from the rs232 signals isn't going to work anyway since dongle gnd will be programmer gnd. (Until it arrives from Hong Kong in about a month I won't know anything for sure though). I still think JDM2 is a clever and elegant circuit though :-).

If I do run into timing issues with my dongle - which I've read is why they're unreliable for this, is there a way I can make the clock and data sync properly in hardware? I was speculating in the bath there must be a simple way to buffer and sync the signals without resorting to a pre-programmed pic (chicken & egg for me). Sorry if it's a stupid question, all this is rather new to me!

TIA
 
The programmer above does not produce high enough voltage.
Some chips do not open until they see 13.6v
That's why I had so many problems.
 
Last edited:
The programmer above does not produce high enough voltage.
Some chips do not open until they see 13.6v
That's why I had so many problems.

Just checked the 16F88 programming data sheet and Microchip state 13V ± 0.5 and so 12.7 is within range but adding another diode in series with D8 would make it 13.4V.

The main problem with programmers that rely on the serial port for power is the slow rise time of Vpp (has to be <250μS).

BTW, adding 6V to a TTL level will give 11V and adding it to a true RS232 level will give 18V = ouch.

Mike.
 
BTW, adding 6V to a TTL level will give 11V and adding it to a true RS232 level will give 18V = ouch.

I don't now where you get these figures from.

The circuit has been tested and it WORKS.

The 10k limits the current and voltage as the chip has internal limiting diodes on all lines.
 
Again, thanks - I really do just have to wait for the time being though! And decide which PIC to use - so much choice! At the moment I'm working out the code I need, and loving how simple the hardware can be.

OAN, 2 line LCD displays are pretty cheap on eBay - I only need one line to display frequency - any thoughts on what I could use the second line for, anyone? I suppose I should be starting a new thread on this...
 
I don't now where you get these figures from.

The circuit has been tested and it WORKS.

The 10k limits the current and voltage as the chip has internal limiting diodes on all lines.

TTL high output voltage is 4.7V. Add 6V = 10.7V = too low.

Also, I think you'll find that MCLR doesn't have clamp diodes or you wouldn't be able to get it above 5.7V. (Data sheet confirms, diode only to Vss.)

Mike.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top