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 support@ccsinfo.com

What to do with RB6 / RB7 pins when no ICD2 present?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

What to do with RB6 / RB7 pins when no ICD2 present?
PostPosted: Fri Jun 18, 2004 4:48 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jun 18, 2004 6:00 am     Reply with quote

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
PostPosted: Fri Jun 18, 2004 7:46 am     Reply with quote

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.
PostPosted: Fri Jun 18, 2004 7:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jun 18, 2004 11:44 am     Reply with quote

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

 
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