wire / wire-format / i2c-protocol

I2C (Inter-Integrated Circuit) protocol

I2C is a two-wire serial bus (SDA data, SCL clock) for connecting low-speed peripherals. Communication: START condition (SDA high->low while SCL high), 7-bit (or 10-bit) address + R/W bit, ACK/NACK, data bytes, STOP condition (SDA low->high while SCL high). Clock stretching allows slaves to slow down the master.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: I2C (Inter-Integrated Circuit) protocol

wire format

spec: I2C specification (NXP)

I2C is a two-wire serial bus (SDA data, SCL clock) for connecting low-speed peripherals. Communication: START condition (SDA high->low while SCL high), 7-bit (or 10-bit) address + R/W bit, ACK/NACK, data bytes, STOP condition (SDA low->high while SCL high). Clock stretching allows slaves to slow down the master.

fieldsizemeaning
START1 conditionSDA transitions high->low while SCL is high. Signals the beginning of a transaction.
Address + R/W1 byte (7-bit addr + 1 bit R/W)7-bit slave address (bits 7-1) + read/write bit (bit 0: 0=write, 1=read).
ACK1 bitReceiver pulls SDA low during the 9th clock pulse to acknowledge.
NACK1 bitReceiver leaves SDA high during the 9th clock pulse (no device at address, or end of read).
Data byte8 bitsData byte, MSB first. Followed by ACK/NACK.
STOP1 conditionSDA transitions low->high while SCL is high. Signals the end of a transaction.
Repeated START1 conditionSTART without a preceding STOP. Used to change direction (write then read) without releasing the bus.
10-bit address2 bytes10-bit addressing: first byte = 11110XX0 (where XX are the top 2 bits of the address), then the low 8 bits.

example:

08 00 00

I2C: START, address 0x04 (write), ACK, STOP


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/i2c-protocol or /wire-format/i2c-protocol.json