View previous topic :: View next topic |
Author |
Message |
Pete Smith
Joined: 17 Sep 2003 Posts: 55 Location: Chester, UK
|
ICD-2 "Recommended Circuitry" |
Posted: Thu Jun 17, 2004 7:12 am |
|
|
Hi all.
I've been asked to take a look at someone elses circuit. They're using an ICD2 to program and debug the PIC (18F252).
I've looked at the ICSP guide, and the ICD2 guide. These say to use a pullup resistor and a capacitor to ground, and a diode between MCLR and the RC network (isolating Vdd from 13v), or just a resistor from MCLR to Vdd respectively.
I've never had any dealings with the ICD2 before.
Will the standard ICSP circuit work with the ICD2, or do I literally just need a resistor?
Thanks,
Pete. |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Thu Jun 17, 2004 7:47 am |
|
|
Just a resistor will do usually. The current across the pull up resistor will need to be less than the circuit draws. With a 10K pull up you have a resistor from 13V to the 5V supply. That is going to put 800uA on the 5V supply. If your circuit uses more than that you don't have a problem. You don't want to pull up the 5 volt supply. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jun 17, 2004 11:14 am |
|
|
Quote: | I've looked at the ICSP guide, and the ICD2 guide. These say to
use a pullup resistor and a capacitor to ground, and a diode between
MCLR and the RC network (isolating Vdd from 13v), or just a resistor
from MCLR to Vdd respectively. |
http://ww1.microchip.com/downloads/en/DeviceDoc/51265c.pdf
(This poster should have come in your ICD2 box). |
|
|
AllanL5
Joined: 05 Apr 2004 Posts: 6
|
|
Posted: Thu Jun 17, 2004 2:26 pm |
|
|
Yes, you want ONLY a 10K ohm resistor between MCLR and +5 (VDD). The other lines must be connected directly to the ICD-2 connector.
NO capacitor on MCLR to ground -- this will muddy the program pulses.
NO diode on PG_Clk.
NO capacitor on PG_Data to ground. |
|
|
Pete Smith
Joined: 17 Sep 2003 Posts: 55 Location: Chester, UK
|
|
Posted: Fri Jun 18, 2004 1:59 am |
|
|
PCM programmer wrote: | Quote: | I've looked at the ICSP guide, and the ICD2 guide. These say to
use a pullup resistor and a capacitor to ground, and a diode between
MCLR and the RC network (isolating Vdd from 13v), or just a resistor
from MCLR to Vdd respectively. |
http://ww1.microchip.com/downloads/en/DeviceDoc/51265c.pdf
(This poster should have come in your ICD2 box). |
It probaby did come with the box, but I've only worked at this place for about 5 weeks, and I've been thrown in at the deep end.
At present, there's a big fat capacitor (4.7uF) on MCLR to ground, and the hardware developers have had to wierd and wonderful things (namely removing the pull up resistor & replacing it with a short, and adding a 1k resistor between MCLR and the programming port.
I've been told to sort the problem.
Thanks for the link to the poster - this is the one file I _didn't_ download! I though "Why would I need a poster!"
The other files suggest that just a resistor is needed, so this confirms it.
Thanks again,
Pete. |
|
|
Pete Smith
Joined: 17 Sep 2003 Posts: 55 Location: Chester, UK
|
|
Posted: Fri Jun 18, 2004 2:54 am |
|
|
Neutone wrote: | Just a resistor will do usually. The current across the pull up resistor will need to be less than the circuit draws. With a 10K pull up you have a resistor from 13V to the 5V supply. That is going to put 800uA on the 5V supply. If your circuit uses more than that you don't have a problem. You don't want to pull up the 5 volt supply. |
If the circuit takes less than 800uA, would it be possible (or "the done thing") to use a diode between the MCLR pin and the resistor, to stop the 13v flowing onto the 5v supply, but which would allow 5v (or 4.4v) onto the MCLR pin when running?
I actually don't know if the circuit draws more than 800uA or not.
Thanks,
Pete. |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Fri Jun 18, 2004 8:30 am |
|
|
Pete Smith wrote: | Neutone wrote: | Just a resistor will do usually. The current across the pull up resistor will need to be less than the circuit draws. With a 10K pull up you have a resistor from 13V to the 5V supply. That is going to put 800uA on the 5V supply. If your circuit uses more than that you don't have a problem. You don't want to pull up the 5 volt supply. |
If the circuit takes less than 800uA, would it be possible (or "the done thing") to use a diode between the MCLR pin and the resistor, to stop the 13v flowing onto the 5v supply, but which would allow 5v (or 4.4v) onto the MCLR pin when running?
I actually don't know if the circuit draws more than 800uA or not.
Thanks,
Pete. |
You could add a resistor from +5 to Ground to insure the circuit draws at least that much. The diode thing works too. Better yet measure current draw and find everything is ok. |
|
|
valemike Guest
|
|
Posted: Fri Jun 18, 2004 11:04 am |
|
|
http://www.ccsinfo.com/forum/viewtopic.php?t=19649
Look at today's recent thread which asks the same thing.
We have pulldown resistors on rb6 and rb7 to prevent floating pins during runtime. (You can also put small 1K pullups on rb6 and rb7 instead of the pulldowns, and it won't affect your programming despite the fact that the datasheet says not to put pullups). And of course you have to protect the 5v rail from getting injected with Vpp(12V) while you're programming the PIC. |
|
|
|