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

how to make a input

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



Joined: 14 Oct 2008
Posts: 103

View user's profile Send private message

how to make a input
PostPosted: Thu Aug 06, 2009 7:27 am     Reply with quote

Hello guys. I'm trying use a tristate switch through GP1 pin of 12F675.
What I want to know how to make GP1 pin an input?

Will output_float() do the trick?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Aug 06, 2009 7:38 am     Reply with quote

In the default compiler set-up simply reading the pin with the input() function causes the compiler to make the pin an input before reading it. Output_float() will tri-state the pin without consuming any memory to put the result in, but it is rarely necessary.
If you use fixed I/O or fast I/O instead of the default standard I/O you will need to set pin direction explicitly. But those are only for special occasions.
_________________
The search for better is endless. Instead simply find very good and get the job done.
aruna1



Joined: 14 Oct 2008
Posts: 103

View user's profile Send private message

PostPosted: Thu Aug 06, 2009 7:44 am     Reply with quote

SherpaDoug wrote:
In the default compiler set-up simply reading the pin with the input() function causes the compiler to make the pin an input before reading it. Output_float() will tri-state the pin without consuming any memory to put the result in, but it is rarely necessary.
If you use fixed I/O or fast I/O instead of the default standard I/O you will need to set pin direction explicitly. But those are only for special occasions.


Ok so what should I write? (I don't want to read any input data. Just to make it as an input).
aruna1



Joined: 14 Oct 2008
Posts: 103

View user's profile Send private message

PostPosted: Thu Aug 06, 2009 9:20 am     Reply with quote

output_float() is working
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