Ignore Input from PIC
I'm using the PIC 16-series to program something. I was wondering if anyone knows how I can ignore a certain input... E.g. i want to turn off the 5th bit of Port B(which I have initialised as my input) so that the program code that I have written may ignore any input at that pin.. How may I be able to do that?... and ofcourse, switch it on again at a later time in the program...
In summary:
1) ignore/turn off bit-5 of portB
2)switch on/enable it back again
any ideas?...it's urgent...
๐
In summary:
1) ignore/turn off bit-5 of portB
2)switch on/enable it back again
any ideas?...it's urgent...
๐
Replies
-
argaAssuming you want to do this in C then mask the 5th bit off. If the variable 'A' is you input register then:
A &= 0x0010;
Add a conditional to turn it on and off.
Frank
You are reading an archived discussion.
Related Posts
friends,
do you know about parallax and bs(bs2p) adding pbasic lang?
For those who don't have to do anything better -
Use four 0's (zeros) and any mathematical operators to get 24.
Those who are smart, don't spoil the fun soon....
If you've been stuck with AVG Free 7.5 for what seems an eternity, Girsoft has recently rolled out Version 8.0.100 here:
AVG Free - Download installation files & documentation
What's...
Good evening to all and to the Big K,
Though i am an old member i am still introducing myself as i have not done it before and not also...
CEans!
We are now 11,000 members strong ๐๐๐!
Keep spreading the good word! ๐๐๐