I2C bus is a bi-directional, two-wire (SCL, SDA), synchronous, serial, multi master interface standard, with competition detection and bus arbitration mechanism, which is very suitable for short distance and non frequent data communication between devices. In the I2C protocol system, when data is transmitted, the address of the destination device will be taken, so the device networking can be realized.

If we use GPIO port to simulate I2C bus and realize bidirectional transmission, we need an input / output port (SDA) and an output port (SCL).

The main advantage of I2C bus is its simplicity and effectiveness. I2C can be used to replace the standard parallel bus and connect various integrated circuits and functional modules. Only two bus lines are required: a serial data line SDA and a serial clock line SCL.

I2C is a multi master bus. Every device on the bus has a unique address. According to the ability of the device, any device that can send and receive can work like the master controller and control the bus. Of course, there can only be one master at any time point. If two or more hosts initiate data transmission at the same time, conflict detection and arbitration can be used to prevent data from being damaged.

A master controller can control the signal transmission and clock frequency. Synchronous clock allows devices to communicate at different baud rates through the bus. Synchronous clock can be used as a handshake way to stop and restart serial port transmission.

Because the interface is directly on the module, the space occupied by I2C bus is very small, which reduces the space of circuit board and the number of chip pins, and reduces the interconnection cost. The bus can be up to 25 feet long and can support 40 components at a maximum transmission rate of 10kbps.

The bit rate of serial 8-bit bidirectional data transmission can reach 100kbit / s in standard mode, 400kbit / s in fast mode and 3.4mbit/s in high-speed mode.

The on-chip filter can filter the burr wave on the bus data line to ensure the data integrity. I2C uses pull-up resistor, which has weak anti-interference ability. It is generally used for communication between chips on the same board, and less used for long-distance communication. The number of ICs connected to the same bus is only limited by the maximum capacitance of 400pF.


Leave a Reply

Your email address will not be published. Required fields are marked *