I²C

From Stm32World Wiki
Revision as of 04:13, 6 October 2024 by Lth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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