ds23man wrote:Please correct me if I am wrong:
1000 0000 = 80 hex writing adress
1000 0001 = 81 hex reading adress
Shift 1 to the right:
0100 0000 = 40 hex adress
So I have to use 0x40 ?
I know I was not able to use the 'normal' address in arduino; but maybe there was a bug that we all just got used to and worked around.
I used 0xA7 or A0 (if all user addr bits are 0) for the mcp23008 chip and yet its supposed to be addressed at 0x20 !
I do know that the r/w bit is not part of the *arduino* style i2c addr. they think that i2c addr is the same and r/w is just an attribute of a message (which I think does make i2c a lot easier to handle). suppose I had to have a mailing address for you when I sent to you, but when you wrote to me you used a modified form on your return address. that would confuse everyone
and that's what i2c is like, its 'address' varies depending on whether you are reading or writing. that's abursd (lol) and so they drop the r/w part and you 'open' a connection to a device by its i2c base address and the r/w bit gets added based on the read/write commad you issue.
in short, people seem to try the addr or the 'addr shifted over one' until the device responds, then tell the world what the arduino uses to talk to device XYZ so that others won't have to do this experiment