IntermediateTopic 66 of 104Electronics & Embedded

I2C

Two-wire bus with addressable devices and pull-up resistors.

In depth

I²C uses two open-drain lines, SDA and SCL with pull-ups, 7-bit addresses, ACK bits and speeds 100 kHz–3.4 MHz. Multi-master with arbitration. Pull-up value depends on bus capacitance. Great for sensors and EEPROMs.

Key points

  • Start and stop conditions
  • Clock stretching
  • Address conflicts need multiplexer
Example

An IMU and OLED share one I²C bus at different addresses.

Why it matters

I2C connects many devices on two wires, which is very convenient for sensors and small peripherals.

Where this is used

  • Connecting a temperature sensor and an EEPROM to one microcontroller.
  • Reading a real-time clock chip over a shared bus.
  • Configuring a camera module with a register interface.

Frequently asked questions

What is I2C?

Two-wire bus with addressable devices and pull-up resistors.

Why is it important to understand I2C?

I2C connects many devices on two wires, which is very convenient for sensors and small peripherals.

Why does I2C need pull-up resistors?

The bus lines are open drain, so pull-ups are needed to bring them high, and their value sets the rise time and power.

What is an I2C address?

A seven-bit device identifier sent at the start of a transaction, which lets many devices share the same two wires.

How is I2C used in practice?

Typical applications include connecting a temperature sensor and an EEPROM to one microcontroller, reading a real-time clock chip over a shared bus and configuring a camera module with a register interface.

What should I learn before I2C?

Study "SPI" first (topic 65 of 104 in Electronics & Embedded). It covers the groundwork this topic builds on.

What are the key points of I2C?

Start and stop conditions. Clock stretching. Address conflicts need multiplexer.

Can you give an example of I2C?

An IMU and OLED share one I²C bus at different addresses.

What comes after I2C?

The next topic is "CAN bus", which builds directly on this one.

How difficult is I2C?

It is classed as Intermediate in Electronics & Embedded (topic 66 of 104). It is an intermediate topic. Work through the beginner topics in Electronics & Embedded first.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.