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

Pin on PIC drive

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



Joined: 10 May 2005
Posts: 323
Location: Belgium

View user's profile Send private message

Pin on PIC drive
PostPosted: Thu May 12, 2005 8:56 am     Reply with quote

Hi,

this is the scheme:
http://expand.xs4all.nl/uploadarchief/download.do?file=schma.jpg

I need to drive ENABLE_CHARGING LOW to disable charging. This means that the pin on the PIC (I'm using PIC16lF877A Vdd = 3V) is on Vadap via a pull-up resistor. Vadap = 8V ; can that harm the pic?

thx
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu May 12, 2005 9:17 am     Reply with quote

That will definitely harm the PIC. Use a transistor to pull that line low instead.

PIC --- R --- base of BJT (or gate of FET), emitter (or source) to GND

The collector/drain of the transistor then goes to your ENABLE CHARGING line. The only difference is that now a logic high on the PIC line will bring ENABLE CHARGING low.
Guest








PostPosted: Thu May 12, 2005 9:43 am     Reply with quote

There is another way without requiring additional components and without harming the PIC. Use RA5 of the PIC to drive this PIC. RA5 is open drain.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu May 12, 2005 9:53 am     Reply with quote

Good point, only it's A4 that's open drain, not A5.

The only thing is that A4 can only tolerate a maximum of 8.5V (first page of chapter 17 of the 877A's data sheet). If the line that it is connected to is a nominal 8V, it doesn't leave much room for error.
Guest








PostPosted: Mon May 16, 2005 1:43 pm     Reply with quote

can I put a diode in series with the resistor? then I have 8V-0.7V = 7.3 op RA4
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Mon May 16, 2005 2:44 pm     Reply with quote

I guess so. I'm just overly cautious - experience has taught me to be that way. As I said before, I'd do things differently.
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