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

PIC powered through PIN_B6

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



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PIC powered through PIN_B6
PostPosted: Thu Dec 13, 2007 3:34 am     Reply with quote

Hi

I am using the PIC18F2550.
When the board is plugged into a receptacle the power pin receives power and PIN_B6 is checked if it is H or L. This is how things should work.

What happens in reality, sometimes, is that PIN_B6 sees the H first (before the chip is powered), and this seems to power the PIC.
I have tried to trim the receptacle's PIN_B6 pin shorter so that mechanically it gets a H after the power pin. This helps, but does not work 100%.

Can someone please tell me if there is a way to switch off the PIC from being powered through PIN_B6?
Are there any other possilbe things I can try?

Thank you in advance
a.
Ttelmah
Guest







PostPosted: Thu Dec 13, 2007 3:53 am     Reply with quote

You need a reasonably high resistance in the line connected to B6.
All pins on MOS logic devices like the PIC, normally have an internal 'protection' diode, to prevent the pin being pulled above the supply rail, and destroying the chip. If you are directly connecting a line capable of supplying the pin, to such a pin, it _will_ supply the chip through this diode.
What you do, is feed your signal through something like a 100KR series resistor. Then when the chip is 'off', only 50uA can flow through this, and the chip doesn't get powered. When the chip is on, this is still a good enough connection, to signal the operation required.

Best Wishes
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PostPosted: Thu Dec 13, 2007 4:06 am     Reply with quote

Hi Ttelmah

As always a good suggestion- Thank you!

May I ask: What is the minimum (approximately) current that is needed for the PIC to be powered through the pins (eg PIN_B6)?

Also what is the minimum V on an input pin (with respect to V supply) for the PIC to see a H?

Once again thank you
a.
Ttelmah
Guest







PostPosted: Thu Dec 13, 2007 6:06 am     Reply with quote

The minimum, will depend to some extent on the configuration (oscillator frequency, and loads). The clamp diodes are rated for 20mA. A typical pic at 4MHz, will draw something like 4mA to run. The chips draw a minimum of about 100uA, in their lowest power 'running' mode (low frequency oscillator etc.), hence my choice of 50uA to keep well clear of this. The voltage needed to see for a 'high', will depend on the input buffer for the pin concerned. For a TTL input, normally 2v. For a Schmitt input, 4v (both assuming the chip is on a 5v supply). Port B, normally has TTL inputs. The input leakage, is normally under 1uA, so any resistance of under 3MR, connected to 5v, will be enough to be 'seen' as a high. However something lower, provides more margin. CCS, use 220K, for their detection of 5v, on the USB bus, which gives a typical example of this.

Best Wishes
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PostPosted: Thu Dec 13, 2007 8:09 am     Reply with quote

Hi Ttelmah

Thank you!! I have just tested it with 51kR in series with the input Vdd and it works well now.
(I have another R=100k to ground and PIN_B6 connects where 51k and 100k meet).

I appreciate your help.
a.
Ttelmah
Guest







PostPosted: Thu Dec 13, 2007 10:17 am     Reply with quote

Good. That sounds safe.:-)

Best Wishes
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