I2C Address Converter
Convert between the 7-bit address and the 8-bit read/write byte actually sent on the wire.
I2C Address Converter
Why there are two numbers for one address
I2C addresses are 7 bits — 128 possible slave addresses. But every byte on the wire is 8 bits, so the controller shifts the 7-bit address left by one and appends a read/write bit in bit 0: 0 for a write, 1 for a read. That means a single device answers to two different byte values depending on the transfer direction, even though it only has one address.
This is a frequent source of bugs: Linux’s i2cdetect and most Arduino/embedded HAL calls expect the 7-bit form, but plenty of datasheets print the 8-bit write byte as “the address” instead. If a device that should be at 0x48 only shows up at 0x24 or a scan seems to hit the wrong chip, a mixed-up bit width is usually why.