Difference between revisions of "I²C"

From Stm32World Wiki
Jump to navigation Jump to search
m (Lth moved page I2C to I²C)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:I2C]]
+
[[Category:I²C]]
To be added
+
[[I²C]] stands for '''Inter-Integrated Circuit''' and is pronounced ''I-squared-C'' or ''I-to-C''.  It is a [[synchronious]] multi-master, multi-slave serial communication bus invented in 1982 by Philips Semiconductors.
 +
 
 +
== The {{I2C}} Bus ==
 +
 
 +
The {{I2C}} bus consists of two data signals, one clock and one bi-directional data line.  One master and multiple slaves can be connected in parallel to the same bus.  The signal pins of all devices are so-called open-drain, meaning they will never supply a voltage to the signal line but either be shorted to GND or in high-impedance mode.  For that reason, both clock and data will need to be pulled high by a resistor.  The benefit of this approach is that if multiple slaves respond simultaneously they never risk frying each other.  The size of the pull-up resistor depends on the application.  On a very short bus (5-10 cm tops) with only one mater and one slave, the resistor can be quite big (read: internal pull-up in a {{STM32}} {{MCU}} will do just fine).  This is known as a weak pull-up.  On a longer bus or a bus with more devices, a stronger pull-up is needed, meaning a smaller resistor.  4.7K to 10K is common.
 +
 
 +
[[File:I2C-Interface.png|600px]]

Latest revision as of 04:13, 6 October 2024

I²C stands for Inter-Integrated Circuit and is pronounced I-squared-C or I-to-C. It is a synchronious multi-master, multi-slave serial communication bus invented in 1982 by Philips Semiconductors.

The I²C Bus

The I²C bus consists of two data signals, one clock and one bi-directional data line. One master and multiple slaves can be connected in parallel to the same bus. The signal pins of all devices are so-called open-drain, meaning they will never supply a voltage to the signal line but either be shorted to GND or in high-impedance mode. For that reason, both clock and data will need to be pulled high by a resistor. The benefit of this approach is that if multiple slaves respond simultaneously they never risk frying each other. The size of the pull-up resistor depends on the application. On a very short bus (5-10 cm tops) with only one mater and one slave, the resistor can be quite big (read: internal pull-up in a Template:STM32 Template:MCU will do just fine). This is known as a weak pull-up. On a longer bus or a bus with more devices, a stronger pull-up is needed, meaning a smaller resistor. 4.7K to 10K is common.

I2C-Interface.png