Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 11 months ago.
I2C Slave Addressing
Hi Does the read/write bit make up part of the slaves address or is the slaves address only comprised of bits 1-7?
When accessing an I2C device.
thanks Rob
1 Answer
10 years, 11 months ago.
The mbed I2C address you have to give is the 8-bit address, so the 7-bit one shifted one to the left, the read/write bit is included. You don't have to actually set them if you use the regular I2C commands: that is done for you by the code.
So an I2C slave device has both a read and write address? So the I2C device doesn't just use the read/write bit to determine the requests action?
posted by 16 Jan 2014It uses the read/write bit.
However if you have the 8-bit address, that includes the read/write bit. So looking at it that way, you have an address for read and one for write. In the mbed code you can forget that again, you just need to supply the 8-bit address, the lowest bit (the read/write bit) doesn't matter.
posted by 16 Jan 2014