Difference between revisions of "I²C"
Line 1: | Line 1: | ||
[[Category:I²C]] | [[Category:I²C]] | ||
[[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. | [[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]] | [[File:I2C-Interface.png|600px]] |
Revision as of 03: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.