I2C Protocol
I2C addressing, ACK/NACK, START/STOP conditions and VHDL FSM structure.
What is I2C?
The I2C (Inter-Integrated Circuit) protocol was developed by Philips Semiconductors (now NXP) in 1982. It enables communication between multiple devices using only two wires.
Key characteristics:
- 2 wires: SDA (data) and SCL (clock)
- Open-drain: lines require external pull-up resistors
- Multi-master: hardware arbitration between multiple masters
- Addressing: each slave has a unique address (7 or 10 bits)
- ACK/NACK: acknowledgment after each byte
I2C Signals
| Signal | Type | Description |
|---|---|---|
| SDA | Bidirectional open-drain | Serial Data |
| SCL | Bidirectional open-drain | Serial Clock |
Both lines are pulled high by pull-up resistors. Any device on the bus can pull a line low (open-drain), but none can force it high - only the pull-up resistors do that.
Start and Stop Conditions
I2C uses two special conditions that violate normal data transitions (data stable while SCL high):

START condition: SDA falls while SCL is high. STOP condition: SDA rises while SCL is high.
SDA data must only change while SCL is low - except for START and STOP conditions.
I2C Frame
A typical I2C write transaction:
START | Address (7 bits) | R/W='0' | ACK | Data byte | ACK |