Welcome
What you want is to mask the top three bits
EDIT: See section 4.17.4 of the manualCode:MyVar=PORTB & %00011111 IF MyVar = %00000100 THEN
Welcome
What you want is to mask the top three bits
EDIT: See section 4.17.4 of the manualCode:MyVar=PORTB & %00011111 IF MyVar = %00000100 THEN
Last edited by paul borgmeier; - 29th May 2007 at 14:42. Reason: added manual reference
Paul Borgmeier
Salt Lake City, UT
USA
__________________
yup,
for reference about bit masking you could have a look at those
http://en.wikipedia.org/wiki/Bitwise_operation
http://en.wikipedia.org/wiki/Mask_(computing)
Welcome here, and enjoy!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thank you both for excellent information. Lots to learn but absorption rate very high at present!!!
Adrian
Bookmarks