CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

TQFP programming
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
barkerben



Joined: 19 Jan 2006
Posts: 22

View user's profile Send private message

TQFP programming
PostPosted: Mon May 29, 2006 7:06 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon May 29, 2006 8:07 am     Reply with quote

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








PostPosted: Mon May 29, 2006 8:14 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Mon May 29, 2006 10:43 am     Reply with quote

Quote:
The problem is the ICSP works at 5v, wheras most of the circuit runs at 3.3v

I�m about to build my first 3.3V system (based on PIC18LF258) too, so I�m curious about this subject. From what I read in the ICD section of the forum, it is possible to program everything on a chip with Vcc=3.3V, except for code protection fuses.

http://www.ccsinfo.com/forum/viewtopic.php?t=20395
http://www.ccsinfo.com/forum/viewtopic.php?t=20123
http://www.ccsinfo.com/forum/viewtopic.php?t=20090
And there's probably more...

You just can't power your board with 3.3V from the ICD.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Tue May 30, 2006 7:05 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue May 30, 2006 8:56 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 30, 2006 9:08 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue May 30, 2006 10:38 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 30, 2006 11:45 am     Reply with quote

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








PostPosted: Wed May 31, 2006 4:56 pm     Reply with quote

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








PostPosted: Sat Jun 03, 2006 9:36 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jun 03, 2006 11:34 am     Reply with quote

Quote:
why do you suggest not putting a protection diode between MCLR and Vdd

See my comments in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=26696
Guest








PostPosted: Sat Jun 03, 2006 11:55 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jun 04, 2006 3:47 pm     Reply with quote

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








PostPosted: Sun Jun 04, 2006 5:37 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group