Programming Surface Mount PICs

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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.

  Adam Kumpf

Re: Programming Surface Mount PICs
Quoted text here. Click to load it

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.

Re: Programming Surface Mount PICs

Quoted text here. Click to load it

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

Re: Programming Surface Mount PICs
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.)

Re: Programming Surface Mount PICs

Quoted text here. Click to load it
address is fake.)

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

Re: Programming Surface Mount PICs
    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

Quoted text here. Click to load it

Site Timeline