circuitpro
- 23rd July 2010, 03:21
I'm trying to use XOR, and don't get it. I want an 8-bit binary number showing the difference between two 8-bit ports.... i.e. port X reads one thing, port Y reads another thing, how are they different. How do you do it, because this does not work...
I2CREAD SDA1,SCL1,DJAM,[X]
X=X^%11111111
I2CREAD SDA1,SCL1,IRS,[Y]
Y=Y^%11111111
Z= (X XOR Y)
DEBUG BIN8 Z,10,13
The ports are different, but this returns all 1's.
Thanks!
I2CREAD SDA1,SCL1,DJAM,[X]
X=X^%11111111
I2CREAD SDA1,SCL1,IRS,[Y]
Y=Y^%11111111
Z= (X XOR Y)
DEBUG BIN8 Z,10,13
The ports are different, but this returns all 1's.
Thanks!