PDA

View Full Version : Testing the PIC after programming



bonuts
08-22-2007, 02:47 AM
I think I successfully programmed a 16f688 with the diag code. I tried to test it but my test failed. Instead of using a PC power supply, a LED and a resistor, I tried the following. Can anyone see glaring error on my part?

1) Tried using a cell phone wall wart (seems like the IC type rather than a wired transformer). It's output was 5.1VDC 800mA.

2) Stuck some solder wire in the middle of the power cylinder. Wrapped some solder wire around the cylinder housing. Multimeter seemed to verify ~ 5volts.

3) On a breadboard tried connecting power from wall wart to pin 1 of 16f688 (using the solder wire). Tried connecting ground of wall wart to pin 14 of 164688 (solder wire again).

4) Because I didn't have a LED or resistor, tried to use the multimeter. I connected the positve wire of the multimeter to some solder wire stuck into the breadboard on pin 13 of the 16f88.

Held the ground wire of the multimeter on the ground of pin 14, and waited for the meter to show some DC current on and off, like a LED blinking. It never did.

5) Verified hardware in WinPic800 again just to make sure I didn't fry the chip.

I guess tomorrow I will try a real computer PSU and try to get a resistor / LED, but I don't know why tonight's test did not work. Any ideas? Thank you.

Mrplow123
08-22-2007, 08:13 PM
Just a guess, your meter might be too slow to respond to the voltage change. Or your meter might not be putting enough load on the pic to show any voltage. Get a resistor and an LED. A pack of resistors and some LED's should cost you less then $5.00. Just a thought.

P. Short
08-22-2007, 08:29 PM
Depending on which version of the firmware that you are using, you need an external oscillator.

--

Phil

bonuts
08-24-2007, 12:50 AM
I got it to work with Phil's help.

First, and biggest problem, I was using the version of the firmware that needs an external oscillator. It's the only diag code posted on the wiki. The one that doesn't require it is over at Computer Christmas: http://computerchristmas.com/ForumBoard/read.php?f=4&i=8257&t=8257&v=f

Second, I had my resistor between pin 13 and ground. This is wrong.

It needs to be +5V to positive LED lead (anode), negative LED lead (cathode) to resistor, other end of resistor to pin 13.

Here is a picture of the circuit...

http://www.christmasinshirley.com/forum/files/16f688_test_circuit_982.jpg