Programming Surface Mount PICs

Hello All,

I am working on a tiny board with a surface mount microcontroller. (PIC16F876A) I have a P16PRO40 programmer, and it works quite well for DIP packaged chips, but there's no easy/good way to program surface mount devices. So I thought it wouldn't be too difficult to pull over the critical lines from the programmer to my new PCB (that has a pic16f876a on it) and program the micro on-board.

I've hooked-up V+(13V), PGD, PGC, GND, and VDD(5V), but the chip doesn't want to program. I shorted out the crystal oscillator from the chip so it shouldn't be "running a program". Because other components are attached, I think swinging the powerline (+5V) may have a large time-constant associated with it. I tried hooking the 5V line to be "always-on", but I still get an error when it checks to see what was written. Address#0x0000 = 0x3880 instead of my data (0x100) and in fact... the correct data was not written.

Any help would be greatly appreciated. I would like to stay away from going out and buying another programmer. It seems like if I hooked up the correct lines, I should be able to program surface mount device in-circuit with a standard DIP programmer.

Thanks, Adam Kumpf

Reply to
Adam Kumpf
Loading thread data ...

If you use a Microchip ICD2 programmer to program these devices on-board, it actually tests to make sure that the on-board oscillator is running, so I don't think you need to short out the crystal. The other thing I have found is that the lead length between the programmer and the device is critical. The lead supplied with the ICD2 is about 30cm long, and this seems to be the maximum you can get away with. However, we have had good results by using cable which screened clock and data lines with seperate earths. Crosstalk between clock and data seems to be a big problem. The other thing to look at is whether or not your programmer supports the revision A device.

Reply to

Try applying a seperate +5V supply - I don't think the F87x has any requirement to sequence Vdd during programming. There is no need to short the crystal - taking Vpp/MCLR to Vpp halts any existing program

Reply to
Mike Harrison

What if I have a PICStart Plus and I'm not trying for in-circuit programming? If I can somehow connect jumpers from the SMD to the ZIF socket, is it possible to program the SMDs as if they were DIPs? Or is there an adapter that already does this?

-Robert Scott Ypsilanti, Michigan (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)

Reply to
Robert Scott

Thanks for everyone's input. Knowing that the +5V line (VDD) could stay high made debugging much more simple. I shortened the leads (about 25cm ~

10inches) and stopped the oscillator for programming and it worked. I think that programming mode is intended to start before the chip starts to execute its program, so unless you have turned on the start-up timer in the config register, grounding the crystal may be needed. One more thing, you can figure out a lot by looking at the signals at the pins of the microcontroller. The data/clock lines should go as high as +5V and the MCLR pin up to +13V.

Thanks again.

Best Regards, Adam Kumpf

Reply to
Adam Kumpf

address is fake.)

Yes they make smd to dip adapters for just that reason. they have flip tops to hold the smd parts.

Reply to
Neil Kurzman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.