January 4, 2012
about 3 years ago
nvm. i worked it out. apparently there is attenuation on the MSB and the LSB is masked when masking 16bit int with 8bit mask.
Example : http://lusorobotica.com/index.php/topic,461.msg2738.html
if eeaddress was 1101 1101 1100 0111
eeaddress >> 8 = 0000 0000 1101 1101 and wire.send() which sends bytes would truncate it to 1101 1101 which is perfect. its sent the high byte.
but i dont understand this.
eeaddress & 0xFF = 1101 1101 0000 0000 so wire.send() would send 0000 0000 which fails to send the low byte. is the code wrong in the exmaple?
No public wish lists :(
Forgot your password?
No account? Register one!