I²C Specification and Protocol Configuration ARM7 LPC2148 / Embedded Systems
Overview of I²C • I²C (Inter-Integrated Circuit) is a two-wire serial communication protocol. • Developed by Philips (NXP) for connecting low-speed peripherals. • Uses Master–Slave architecture with multiple devices. • Wires: SDA (Serial Data), SCL (Serial Clock). • Half-duplex, open-drain bus with pull-up resistors.
I²C Specification • Standard Mode: 100 kHz • Fast Mode: 400 kHz • Fast Mode Plus: 1 MHz • High-Speed Mode: 3.4 MHz • Logic ‘0’: 0–0.4 V | Logic ‘1’: 0.7Vcc–Vcc • Max Bus Capacitance: 400–550 pF • Requires pull-up resistors on both SDA and SCL.
I²C Protocol Format 1. START Condition (S) – SDA goes Low while SCL is High. 2. Address Frame – 7-bit/10-bit address + R/W bit (0=Write, 1=Read) 3. ACK/NACK Bit – Receiver sends ACK (0) or NACK (1) 4. Data Frame(s) – 8-bit data, followed by ACK/NACK 5. STOP Condition (P) – SDA goes High while SCL is High.
Protocol Configuration (Microcontroller) 1. Enable I²C peripheral clock. 2. Configure SDA and SCL pins (Open-drain, Alternate Function). 3. Set I²C clock frequency (100kHz / 400kHz). 4. Assign Slave Address (if Slave). 5. Enable ACK (Acknowledge). 6. Enable I²C peripheral. 7. Use data registers for communication.
Advantages and Limitations Advantages: • Simple 2-wire interface • Supports multiple devices • Hardware addressing Limitations: • Limited data rate (up to 3.4 Mbps) • Short-distance communication • Power loss due to pull-up resistors