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
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.
Guest








PostPosted: Mon Jun 05, 2006 4:23 am     Reply with quote

Wait a sec...

If the load is exactly 3k3, then everything is fine. All the current is sourced from the programmer, and the vdd line sits at 3v3.

If the load is <3k3, the programmer will tend to pull vdd <3.3v, so the on board supply has to provide extra current into the programmer...?

If the load is >3k3, the programmer holds the vdd line > 3v3, and the on board supply, or other circuitry, may be damaged.


I'm getting myself very confused wrt the above, and I'm sure I shouldn't be!
Ttelmah
Guest







PostPosted: Mon Jun 05, 2006 4:33 am     Reply with quote

Don't think about resistances, think about currents. At 3K3, with a 3.3v supply, the board requires 1mA. If the effective resistance is lower than 3K3, the board requires more rhan 1mA, while if it is hgher, the board requires less than 1mA.
In state '1', the programmer delivers 1mA, so the supply turns off (it is regulated), and all the current comes from the programmer. This is an almost impossible situation to maintain.
In state '2' the board requires more than 1mA. The progammer does not 'pull down', but sources 1mA, reducing the amount the supply has to provide by this amount.
In state '3', the voltage will rise. However the current drawn by a PIC, will rise with increasing voltage, so the rise will not be enough to cause harm. This would potentially be a different story, if the source could provide a lot more current.

Best Wishes
Guest








PostPosted: Mon Jun 05, 2006 6:01 am     Reply with quote

I can see that that would keep the power consumed the same, but surely most electronic components dont' work that way - they can't vary their impedance. If you lower the voltage across them, then the current through them falls. They have a specified operating voltage, and won't work outside it. Lowering the voltage doesn't cause the current to increase, it just causes the device to shut down...
Guest








PostPosted: Mon Jun 05, 2006 6:24 am     Reply with quote

ah... a current equation sorts things out. If load is equal to 3k3, our source provides no current. Less, and it provides some. More, and it needs to sink current to maintain voltage, which it may or may not be able to do. If it can't, we have a dead converter and a supply line at high voltage.

Ben
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