Maker Pro
Maker Pro

PICKIT3 and PIC12F1840

Hi all,

I have ZERO experience with PICs (I have some with AVR). I bought an LED driver that has 5 programming input pins on it, and a PICKIT3 programmer. The designer of the LED driver supplied software that allows you to set the modes you want, and then easily program the driver.

A photo of the driver I built is here (note I have re-flowed the PIC since so the pins that look like they have no connection are fine now):

https://www.dropbox.com/s/8e3e5w7aemsr0ps/IMG_20130713_181423.jpg

You can see the contact pins for the PICKIT3 at 6 O'clock on the board. That's the PIC12F1840 just above them.

When I connect my PICKIT3 and run MPLAB v8.91, I get the following:

PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.28.72
Firmware type......................Enhanced Midrange
PICkit 3 Connected.
PK3Err0045: You must connect to a target device to use PICkit
3.

I cannot permanently connect my PICKIT to the driver. Besides, the demo videos and instructions are done this way and work fine...

What I do next is to set the PICKIT to power the target circuit. I set this to 4.75V and hit OK. I then get this error:

Target Device ID (00000000) does not match expected Device
ID (00001b80).

Again, I'm guessing it's because the PICKIT is not connected to the PIC itself.

Next I import the PICs firmware, hold the PICKIT3 in position and go to 'Programmer > Program'. It flashes for half a second, and spits this out:

Programming...
The following memory regions failed to program correctly:
Program Memory
Address: 00000000 Expected Value: 00002e3c Received Value: 00003fff
Programming failed

What's happening here? I've re-flowed the PIC to make sure it's all connected. I can't see any shorts on the circuit. The fact it is getting a received value says to me that it is doing something. I just don't know what.

Maybe I should do some soldering and permanently wire the driver to the PICKIT and start the whole process while everything is connected at every step...

Any advice would be greatly appreciated. I took me ages to build these boards and neither of them will work (touch wood) until I can get some firmware onto those PICs!!!

- Matt
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
It's hard to tell from the low resolution of the photo, but I'm not convinced that either of those chips is properly soldered.

I see what appear to be pads with no solder and others with blobs of solder.

Also, what's under the resistors and stuff, I hope I'm not seeing blobs of solder. Or is it glue (did you stick the components down before soldering)?

How did you reflow the board? What type of solder?
 
I have reflowed the ICs since that photo was taken. Its all properly soldered I swear Lol. The board is cleaner, but there is only so much I can do by eye. I don't have a microscope or anything other than solder paste and my hot air flow station.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
OK, let's look at the possibilities:

1) Your PicKit 3 is damaged (you can try it on something else)
2) Your board has an error (the layout is wrong)
3) You have placed 1 or more components incorrectly on the board
4) You have failed to correctly solder something (bad joint or bridge)
5) You have damaged a component or the board (before, during, or after soldering)
6) Your connection to the PicKit3 is poor, or wrong.
7) Everything is working but you don't realise it.

See how many of those you can eliminate.

One test is to see if there is a connection between the programming header and the appropriate pin (and no other) of the chip.
 
Board layout is definitely correct. Hundreds of these have been assembled by others without issue. Tomorrow after work I will remove all the small parts between the two ICs, clean the board of excess solder and then reattach the parts without applying any more solder (so whatever is already on the parts is what will hold them in place).
This is about as good as I can do to prevent shorts with what equipment I have.

I have nothing to test my PICKIT3 with sadly. As I mentioned earlier this is my first experience with PIC stuff :/

I can try and wire to the PIC directly to rule out the PICKIT as the problem (by removing the circuit).

I'll try a board clean up first and go from there.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Every time you remove and resolder a component you risk further damage.

Take a sharply focused image of the board from above (we need to be able to read the writing on the upper surfaces of components).

Also take oblique photos showing the pins of the PIC. Again, these need to be in sharp focus.

The best way to photograph them is outside in shade on a bright day. Don't use flash.
 
Sorry, I only checked your reply after I did the following:

I wired the PICKIT directly to the board as per the photo below. Same issues.

https://www.dropbox.com/s/nvuvaxvgldzwc3b/IMG_20130715_171654.jpg

I then soldered the PICKIT directly to the spare PIC. Picture below.

https://www.dropbox.com/s/k4ruqzumlwjpn4s/IMG_20130715_173022.jpg

BINGO! It worked and I did a jig. I wrote the firmware to the PIC. I now at least know my problem lies board side. I guess that's good. But it also sucks. The fact that directly programming the chips on the board doesn't work, means that the PICs are not on properly. A short elsewhere might be causing the issue as well

I'll try grab the photos for you but it might take me a day or so to get hold of a camera that can do it (sold my SLR a few months ago. Instant regret lol).

- Matt
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
OK, that pretty much confirms that the problem is your soldering.

Leadless components with the connections under the package are a bitch for a first-time SMD solderer.

I presume you did the fancy dead bug style soldering with a soldering iron? (Pretty well done too.)

Perhaps the easiest thing for you to do now is to tin the pads where the component has to go, and ensure there is solder on the pads of the chip. Place the chip into position and hold it in place until it settles under the hot air from your rework station. If it's perfectly flat, and flush with the board, it's probably soldered OK. As long as you didn't leave blobs of solder on the pads, you shouldn't have any solder bridges.

To hold a chip like this I tend to use curved tweezer with the tips pushing down on the top of the chip. Heat the chip evenly so that all of the pins flow.

And good luck.

Shame about the SLR :(
 
Funny you replied exactly at the moment I got the first board working!

Well maybe not exactly...but my email notification went off as I fired it up for the first time :)

I must have re-flowed the PIC half a dozen times. Everytime I thought it looked spot on, it wasn't. I see no visual difference between what I have now and what I had before (not the photo in the OP).

I've got a little technique down. First I just re-flow solder it normally. I check if that has worked. If not I get my exacto knife and pit a TINY bit of solder paste on the tip. I then touch this to the joint area of any pin that looks like it might be causing issues. I then reflow this and test again. Seems to do the trick.

One to go! Only problem is I blew a FET on the second board and have none spare so I can't test it properly until I buy a new one. Ah well.

- Matt
 
Top