FirmGod

I²C Address Converter

Convert between the 7-bit I²C address and the 8-bit read and write bytes, check reserved ranges, and see which common parts answer at an address.

What most APIs and Linux expect.

Try:

First byte on the bus

The seven address bits shift up one place and the direction bit fills the gap. That single shift is the whole difference between the two numbers a datasheet might print.

Write
10010000
0x90
Read
10010001
0x91
7-bit address0x48 (72 decimal)
Write byte0x90
Read byte0x91
Binary1001000 + R/W

Parts commonly found at 0x48

A first guess for a scan result, not a catalogue — several families share each address block.

  • INA219 / INA226Current and power monitor0x40–0x4F
  • ADS1115 / ADS1015Analogue to digital converter0x48–0x4B
  • LM75 / TMP102Temperature sensor0x48–0x4F

Address map

Laid out like i2cdetect. Select a cell to inspect it.

0123456789ABCDEF
00
10
20
30
40
50
60
70
AvailableReservedSelected

10-bit addressing

A 10-bit transfer sends two bytes. The first starts with the fixed pattern 11110, carries the top two address bits, and ends with the direction bit; the second holds the low eight bits.

Write sequence0xF2 0x23
Read sequence0xF3 0x23
First byte11110 01 R/W

Why one device has two addresses

An I²C address is seven bits, but nothing on the bus is seven bits wide. Every transfer begins with a whole byte, so the address is shifted up one place and the spare low bit carries the direction: 0 to write, 1 to read.

A device with the 7-bit address 0x48 therefore appears on the bus as 0x90 when written to and 0x91 when read from. All three numbers describe the same device. Datasheets print whichever the author preferred, sometimes without saying which, and that is the entire source of the confusion.

FormValueWhere you see it
7-bit address0x48Arduino Wire, Linux i2c-dev, most documentation
8-bit write byte0x90STM32 HAL, many vendor drivers, logic analyser traces
8-bit read byte0x91The same trace, on the read transfer

The quickest sanity check: a 7-bit address never exceeds 0x7F, and an 8-bit write byte is always even. If a number is above 0x7F it is already shifted; if it is odd it is a read byte.

Reserved addresses

The specification holds back sixteen of the 128 addresses, which leaves 112 for devices. Both reserved blocks sit at the ends of the range:

RangePurpose
0x00General call when writing, START byte when reading
0x01CBUS address, so CBUS parts ignore I²C traffic
0x02–0x03Reserved for other bus formats and future use
0x04–0x07High-speed mode master code
0x78–0x7B10-bit addressing, which starts with the pattern 11110
0x7C–0x7FReserved, including the Device ID mechanism

If a calculation lands a device in one of these blocks, the most likely explanation is that an 8-bit value was treated as a 7-bit one. Halving it usually produces a sensible address.

Reading a bus scan

A scanner walks every address from 0x08 to 0x77, sends the write byte, and records which ones acknowledge. The grid above uses the same sixteen-column layout as i2cdetect, so a scan result can be compared cell for cell, and selecting a cell shows the parts that commonly answer there.

Two failure patterns are worth recognising immediately. A scan that finds nothing at all is almost always electrical: no pull-up resistors, SDA and SCL swapped, or the device unpowered. A scan that findsevery address means SDA is being held low, which the scanner cannot distinguish from an acknowledgement. Neither is an addressing problem, and neither is fixed by changing the address.

Choosing an address in a block

Many parts expose address pins so several can share a bus. A PCF8574 has three, giving eight addresses from 0x20 to 0x27; a 24Cxx EEPROM does the same from 0x50 to 0x57; most sensors have one pin and two choices, such as the BME280 at 0x76 or 0x77.

Tie those pins deliberately rather than leaving them floating. A floating address pin produces a device that appears at an address that drifts, which presents as a peripheral that works until something nearby changes.

When two parts genuinely cannot be separated, an I²C multiplexer such as the TCA9548A gives each one its own downstream segment, and the multiplexer itself occupies a single address.

10-bit addressing

The 10-bit scheme exists to extend the address space, and it works by borrowing the reserved0x78–0x7B block. The first byte is 11110 followed by the top two address bits and the direction bit; the second byte carries the remaining eight.

In practice it is rare. Seven-bit devices ignore the reserved prefix so the two schemes coexist on one bus, but very few parts implement 10-bit addressing and many controllers support it only partially. If you are running out of addresses, a multiplexer is usually the more practical answer.

When the address is right and it still does not answer

Addressing is only the first byte. If a scan sees the device but transfers fail afterwards, look at the pull-up value against the bus capacitance, at clock stretching if the part uses it, and at whether the register access pattern matches what the datasheet specifies — many devices need a repeated START rather than a STOP between writing the register pointer and reading it back.

For decoding the bytes that come back once addressing works, thehex converter handles width and byte order, and theCRC calculator covers the checksums some sensors append.

Frequently asked questions

My datasheet says 0x90 but the library wants 0x48. Which is right?

Both. 0x48 is the 7-bit address; 0x90 is that address shifted up one place with the write bit in the low position, which is what actually appears on the bus. Divide the 8-bit number by two to get the 7-bit one. Datasheets pick either convention without always saying which.

Does my API want the 7-bit or the 8-bit form?

Arduino Wire and the Linux i2c-dev interface take the 7-bit address. The STM32 HAL takes the 8-bit form — its documentation states the datasheet address must be shifted left before the call. Getting this wrong addresses a device at double or half the intended address, so nothing answers.

Which addresses can a device actually use?

The 112 addresses from 0x08 to 0x77. The blocks 0x00–0x07 and 0x78–0x7F are reserved by the specification for the general call, the CBUS address, high-speed mode, 10-bit addressing, and future use. A part answering outside that range is either violating the specification or the address was misread.

Two of my devices have the same address. What are my options?

Check for address pins first — parts like the PCF8574 and 24Cxx EEPROM expose two or three pins that select an address within a block, and many sensors have a single pin giving two choices. If the address is truly fixed, use an I²C multiplexer such as the TCA9548A, or put one device on a second bus.

My scan finds nothing, or finds every address. What went wrong?

Finding nothing usually means missing pull-up resistors, swapped SDA and SCL, or an unpowered device. Finding every address means SDA is stuck low, which a scanner reads as an acknowledgement from everything. Both are wiring faults rather than addressing faults.

Does the read/write bit change the address?

No. It is a separate bit that rides in the same byte. The device compares only the upper seven bits against its own address and then uses the last bit to decide direction, which is why the read and write bytes for one device always differ by exactly one.