Help troubleshooting JDM PIC programmer
July 18, 2008
Well, my PIC 16F690s arrived in the mail, and I soldered up an ICSP-only version of the JDM programmer to program them. Unfortunately, and not at all surprisingly, it doesn't work -- the PIC programming software (picprog, in linux) doesn't see the PIC:
$ picprog --output saved-cal-chip1.hex --skip-ones --pic /dev/ttyS0Here's the pinout for the 16F690, for reference:
Picprog version 1.8.3, Copyright © 2006 Jaakko Hyvätti <Jaakko.Hyvatti@iki.fi>
Picprog comes with ABSOLUTELY NO WARRANTY; for details
type `picprog --warranty'. This is free software,
and you are welcome to redistribute it under certain conditions;
type `picprog --copying' for details.
value: 0xffff version: 0xffff
/dev/ttyS0:ff0002:unable to read pic device id
And here's what my circuit looks like (except I didn't include the socket, just the ICSP header):
I only have a really weak grasp of what exactly the JDM programmer is doing and how, so it's hard to debug it, but it IS my understanding that the PIC needs to see 12v between pin 20 (Vss) and pin 4 (Vpp) in order for it to go into programming mode. With my programmer connected, I don't see any voltage difference between Vss and Vpp. I do see 5v between Vss and Vdd (pin 1), and I also see 5v between Vpp and Vdd. So I guess Vpp is at 0v for some reason. Obviously I must have some error in my circuit, but I'm having a hard time figuring out what could be wrong.
I understand that the first zener diode, D2, should bring the voltage to 5.1v, and the second zener diode, D6, should bring it to 5.1 + 8.2 = 13.3v. In other words, the voltage across C2 should be 13.3v. I do measure 5.1v between pin 7 of the serial port (RTS) and the cathode of D2, as expected, but when I measure between pin 7 of the serial port and the cathode of D6, I see 5.0v, not 13.3v. I also get 5.0v if I measure across the two terminals of C2. So either there's a problem around there, or I'm misunderstanding how the circuit is supposed to work.
Looking at the output, I'd expect to see 13.3v between pin 3 of the ICSP header (Vss) and pin 1 (Vpp), or if not that, at least the 5v I'm getting from C2. But actually, I see 0v across those pins. That appears to be because the base pin of Q1 (TxD from the serial port) is at 0v, so the transistor isn't allowing any current through. I do see the 5v from C2 at the collector of Q1, but nothing at the emitter.
So I guess what I'd like is for some of you guys with working JDM programmers to hook them up and tell me what you measure on yours. To begin with, I'm particularly interested in the voltage between pin 7 of the serial port and the cathode of D6, and the voltage across the terminals of C2 (which, as I understand it, should be the same as that first measurement). I'd also like to know the voltage between pin 7 of the serial port and pin 3 of the serial port (TxD). Finally, I'd like to see your voltage between pin 3 of the ICSP header (Vss) and pin 1 of the ICSP header (Vpp/MCLR).
Hopefully that will help me track down what I did wrong with my circuit. Thanks in advance.