SparkFun Electronics will be closed on July 3rd, 2015 in observance of Independence Day. Any orders placed after 2:00pm MT on July 2nd will be shipped out after the weekend. Thanks!
Frequently Asked Questions
Mon-Fri, 9am to 12pm and
1pm to 5pm U.S. Mountain Time:
Chat With Us
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!