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

using port A4 as digital output.

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







using port A4 as digital output.
PostPosted: Fri Jan 21, 2005 11:49 am     Reply with quote

I have one analog port setup A0 and I'm trying to using A4 as digital output. Is there anything that I have to do special to make it a digital output?

Thanks,
Nick
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Jan 21, 2005 12:45 pm     Reply with quote

You don't specify what PIC you are using, but RA4 on most pics can only sink current. It is an open drain pin. That means that it cannot output a voltage but can pull the voltage to 0 volts. If you want to use it as an output, then you will have to add a pullup to 5V through a resistor.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Fri Jan 21, 2005 1:13 pm     Reply with quote

Nick -

Google for "open drain" and also consult the data sheet for the PIC you are using.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Nick
Guest







PostPosted: Fri Jan 21, 2005 7:05 pm     Reply with quote

yall are correct, thanks guys!

Nick
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