|
Re: Problems reading io pins as a group
The problem is that you are using bitwise and(&), you should be using logical AND(&&).
the difference is this:
"&" (bitwise and) ANDs each corresponding bit individually.
11110000 & 11111111 = 11110000
10101010 & 10101010 = 10101010
"&&" (logical and) ANDs the entire word at a time. (it will only be true if the two arguements are the same.)
11110000 && 11111111 = 00000000
10101010 && 10101010 = 11111111
__________________
1139 Alumni
|