notes/Resources/mechanics/I2C.md

20 lines
1.3 KiB
Markdown
Raw Normal View History

2023-05-09 12:35:31 +02:00
# I²C
The Inter-Integrated Circuit (I2C) bus is a communication protocol used to transfer data between integrated circuits on a circuit board. It was developed by Philips Semiconductors (now NXP Semiconductors) in the 1980s as a way to connect peripheral devices to a microcontroller.
I2C uses a two-wire serial interface consisting of a clock signal `(SCL)` and a data signal `(SDA)`. Multiple devices can be connected to the same bus, with each device having a unique address. The bus is controlled by a master device, which initiates all communication with the slave devices.
Communication on the I2C bus is initiated by the master device sending a start condition, followed by the slave address and the read/write bit. The slave device then acknowledges receipt of the address, and the master device can then send or receive data to or from the slave device.
One advantage of the I2C bus is that it uses only two wires, making it a simple and efficient way to connect multiple devices on a circuit board. Additionally, the protocol supports multiple data transfer speeds, allowing for flexibility in device communication.
```mermaid
graph LR
A(Master Device) -- SCL --> B(I2C Bus)
A -- SDA --> B
B -- SCL --> C(Slave Device 1)
B -- SDA --> C
B -- SCL --> D(Slave Device 2)
B -- SDA --> D
```