View previous topic :: View next topic |
Author |
Message |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
What to do with RB6 / RB7 pins when no ICD2 present? |
Posted: Fri Jun 18, 2004 4:48 am |
|
|
I'm developing my product with the ICD2 always connected and this works perfect. The product is going to be released soon and I'm wondering what to do with the RB6 (PGC) and RB7 (PGD) pins?
Pull-up, pull-down resistors are not allowed, but floating input pins will cause excessive currents. Define them as outputs?
Currently I have these pins defined as inputs, but will it be safe to always set them as outputs? Even with the debugger connected? |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Jun 18, 2004 6:00 am |
|
|
I think I figured it out:
Without the ICD-2 connected I noticed a much higher current consumption, about 10mA more than average! I guess this was because I had RB6 and RB7 programmed as inputs. Nothing connected to these pins caused them to float, switching rapidly between logic 0 to 1 levels. This oscillation consumes a lot of power.
So, lesson learned: Leaving the debugger connection with floating input pins is no good implementation because it might cause a high current consumption.
According to the ICD-2 documentation pull-up resistors are not allowed.
Pull-down resistors are allowed, but too bad, not implemented on my board. I will remember this for the next revision...
Without hardware modifications the only option I have left now is to set the debugger ports as outputs. |
|
|
valemike Guest
|
Two proposed solutions |
Posted: Fri Jun 18, 2004 7:46 am |
|
|
Back in 1998, I was told by a field application engineer (FAE) that floating pins should be configured as OUTPUT '1'. Never had a problem with that. That was before there were such things as ICDs.
More recently though, I was told to use
Code: |
If you would prefer to use a pull down, I would not use less than 1K since it would require a fairly high source current to support a logic high. A 4.7K to 10K pull down would be preferable.
|
In fact, the design note says NOT to use a pull-up, but I was told that if I use a 1K pullup, then
Code: |
If operating at 5 volts, a 1K pull up and 4.7 K pull down allows the pin to swing from 0 to 4.1 volts which works regardless of the design note says.
|
Additionally, I noticed that some designs don't use this:
Code: |
Remember, the Vpp - MCLR pin will have a high voltage (greater than 10 volts) applied when programming. Take care that it is not connected to anything else on your board that can not take the 10+ volts.
|
(That is why you would see diodes or zeners on MCLR - so that the rest of the 5V voltage rail doesn't get hammered with 10+ volts during programming and damaging the rest of your circuit.
-Mike |
|
|
valemike Guest
|
p.s. |
Posted: Fri Jun 18, 2004 7:49 am |
|
|
p.s. The 4.7K resistor I talk about is actually the pull-down (?) resistor that is built in the ICD-2. Thus you need a smaller value of 1K if you desire to use a pullup. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jun 18, 2004 11:44 am |
|
|
A weak pullup (47K on a +5v system, or 33K on a +3.3v system)
works just as well. The 4.7K to ground inside the ICD2 over-powers
the weak pullups on the target board.
But after initially doing that, I realized that I could just use the
internal Port B pull-ups instead. |
|
|
|