View previous topic :: View next topic |
Author |
Message |
barkerben
Joined: 19 Jan 2006 Posts: 22
|
TQFP programming |
Posted: Mon May 29, 2006 7:06 am |
|
|
Question number 2...
I have a TQFP package. I intend to program it over a serial link using a bootloader, but to do this I first have to get the bootloader onto it!
I'm assuming the easiest way to do this would be to try to temporarily clip wires onto the pins to program it - might be a bit tricky, but could be done. Once soldered in place, it obviously can't be removed again, and dedicated adapters are extremely expensive...
Ben |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Mon May 29, 2006 8:07 am |
|
|
Add a pin header nearby for the programming. Could be pins, pads or plated holes. Then you need a programmer with the approprite mating portion. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Guest
|
|
Posted: Mon May 29, 2006 8:14 am |
|
|
The problem is the ICSP works at 5v, wheras most of the circuit runs at 3.3v,
so I think I need to get the bootlaoder on before I put the PIC in place on the board - then I can just program it over the serial bus |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Tue May 30, 2006 7:05 am |
|
|
Anonymous wrote: | The problem is the ICSP works at 5v, wheras most of the circuit runs at 3.3v,
so I think I need to get the bootlaoder on before I put the PIC in place on the board - then I can just program it over the serial bus |
Depends on your programmer. Get one that runs at 3.3V and keep in mind what kender said about the fuses.
Or, buy your ICs pre-programmed from a distributor. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue May 30, 2006 8:56 am |
|
|
If the board isn't made yet, I thought the correct way to do this is make a header for programming,.. and a jumper to remove the high programming voltage from the rest of the circuit.
Remove the jumper and program while keeping the programming voltage from the rest of the circuit.
Then put the jumper in place and the PIC is feed from the other normal low voltage supply. |
|
|
FirstSteps
Joined: 09 May 2006 Posts: 7
|
|
Posted: Tue May 30, 2006 9:08 am |
|
|
Is this a one-off or for production?
I've done this before. You'll need to bend the pins of interest slightly down, flip the chip and solder fine wires to the pins. The fine wire can be got from an ordinary multiconductor wire. Strip the insulation and take one of the hair-fine strands.
To solder to them you'll need a rosin flux (not the "no-clean stuff") from Radioshack.
After programming, unsolder the wires and clean them up with a little desoldering braid.
Let me know if you need a better description and photo of it being done. I do this sort of fine work all the time. No special skill is needed, just the ability to follow instructions and a few basic materials. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue May 30, 2006 10:38 am |
|
|
treitmey wrote: | If the board isn't made yet, I thought the correct way to do this is make a header for programming,.. and a jumper to remove the high programming voltage from the rest of the circuit. |
Even that might be unnecessary, I think, if you have ICD-U40. When the Vcc pin of the ICD-U40 is connected to +3.3V, and the jumper inside ICD is removed, the levels on PGD and PGC will be 0 to +3.3V. The voltage on MCLR will still be +12V, but that�s ok, because this high voltage doesn�t touch the rest of the circuit.
I haven't tried this, so I might be wrong. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 30, 2006 11:45 am |
|
|
You don't need a jumper.
These instructions are for ICSP programming with the Microchip ICD2
when the project board runs at +3.3v.
1. Run your project board under its own +3.3v power. Its power supply
may be a wall-transformer that goes to a +3.3v linear regulator,
or it could be a battery which runs a DC-DC converter which has
a +3.3v output. Or it could be connected to a bench power supply.
2. The MCLR pin on the PIC should go to +3.3v through a 10K resistor.
(If you're using the CCS ICD, they recommend a 47K resistor).
Don't use any diodes or other components on the MCLR pin.
The 10K resistor permits the MCLR function to work properly during
normal operation of the board. During programming, the resistor
limits the current going from the programmer into the Vdd supply
on the board. During programming, my ICD2 puts out about 13.3v
on MCLR. So the voltage drop across the resistor is 13.3 -3.3v =10v.
The current is 10v/10K = 1 ma. So the ICD2 is sourcing 1 ma
into the Vdd rail on the project board. This won't affect the board
because the voltage regulator (linear or DC-DC converter) will
continue to hold the project board's Vdd at +3.3v.
3. Configure MPLAB so the ICD2 knows that your board runs under
its own power supply. Go to the Programmer / Settings menu
in MPLAB. In the window that pops up, select the Power tab.
There is a check box that says "Power target circuit from MPLAB
ICD2 (5v Vdd)". Make sure that box is not selected.
4. Turn on power to your project board.
5. Plug the ICD2 into the ICSP connector on your project.
The +3.3v Vdd voltage on your project board must be connected
to the Vdd pin on the ICD2 connector. The ICD2 uses the Vdd
voltage on your board to set the proper voltage for its i/o buffers
which talk to your board.
6. Go to the Programmer menu and click on "Connect". You should
see messages in the Output window showing that ICD2 connected OK.
7. Then click the Program button to program the PIC on your board.
Caution: Do not set the Code Protect fuses, as you can only erase them
if the board is running at +5v Vdd. You can't erase them on a board
which is powered at +3.3v. |
|
|
Guest
|
|
Posted: Wed May 31, 2006 4:56 pm |
|
|
Hi,
Thanks for all the replies!
Unfortunately the PCB is already made - it looks like I could have used ICSP after all if I'd put a pin header in. I had assumed wrongly that the 3.3v was a majr problem. In this case, it is a one off project - so I think I'll have to take the suggestion of trying to solder the other programming pins verrry carefully - either that or see if anyone I know has a TQFP adapter, although that seems quite unlikely :-)
It may be a while till I have a chance to do this, but I'll let you know what happens,
Cheers,
Ben |
|
|
Guest
|
|
Posted: Sat Jun 03, 2006 9:36 am |
|
|
By the way PCM programmer, why do you suggest not putting a protection diode between MCLR and Vdd - would that not prevent the power supply having to source current? I'm using a MAX710, and can find nothing on its tolerance of this.
I'm guessing the problem is that the MCLR pin draws so little current, that the voltage drp across the diode is a problem?
Cheers,
Ben |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Guest
|
|
Posted: Sat Jun 03, 2006 11:55 am |
|
|
Ok - thanks for that. I still can't find anything on the MAX710 datasheet about its ability to sink current, but a fraction of a milliamp doesn't seem much... do you think it will be ok? I take your point about static discharge with a diode...
Higher resitors will reduce the current further, but increase its response time - but since MCLR isn't a data line I don't suppose response time really matters. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jun 04, 2006 3:47 pm |
|
|
Quote: |
I still can't find anything on the MAX710 datasheet about its ability to sink current |
If the combined load of the PIC and the external chips or components
is at least 1 ma (ie., 3.3K or less) then there's no problem. If the load
is less than that, then yes, one solution would be to increase the size
of the MCLR resistor.
The constraints on the MCLR resistor are:
1. A lower value would help bleed off the ESD more effectively,
So for that reason, lower would be better.
2. As you suggested, the resistor in combination with the MCLR pin
capacitance will form an RC circuit, so it would start to affect the
rise time of MCLR if the resistance was too large.
2. You can't use a MCLR resistor that is too low in value, because the
programmers have a limited capability to drive the Vpp voltage
during programming. I presume this is why Microchip and CCS
have specified the resistor values of 10K and 47K, respectively. |
|
|
Guest
|
|
Posted: Sun Jun 04, 2006 5:37 pm |
|
|
Ah I see... If the circuit load is exactly 3k3, then the programmer ends up providing the power for the entire circuit and the on board supply supplies no current. For lower loads, the balance is changed between current from the 2 sources. For Higher loads, assuming infinite input impedance to the voltage source, the voltage on the line has to rise.
Wrt ESD, is the following correct:
The MCLR pin is not tied internally to Vdd
Thus, if isolated, a static charge can build up on this pin
Eventually this may be enough to cause brakdown within the chip - bang.
By providing a bleed path, there can no longer be a differential across the circuit due to static
A PCb is likely not to be earthed, so the whole circuit can still be charged up relative to earth by the static, but there can be no relative differences that could lead to breakdown. |
|
|
|