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
Posted: Thu Aug 06, 2009 7:38 am
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
Posted: Thu Aug 06, 2009 7:44 am
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).
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