1. Introduction
The IIC (Inter-Integrated Circuit) communication principle is a serial communication protocol used for communication between integrated circuits. It is a simple and efficient communication interface standard introduced by Philips (now acquired by NXP Electronics) in 1982. The IIC communication method is widely used in various electronic devices, sensors, displays and other fields.
The IIC communication principle mainly includes two bus lines, one is the serial data line (SDA), and the other is the serial clock line (SCL). These two lines transmit data and clock signals through level changes. Among them, the SDA line is used to transmit actual data information, while the SCL line is used to synchronize the clock signal of communication.
2. Communication details
①The master device initiates the bus start signal, that is, pulls the SDA line from high level to low, and then pulls the SCL line high, indicating that the bus starts;
②The master device sends the device address and read and write bits to the slave device, and the slave device judges whether it needs to respond to the master device by detecting the device address and read and write bits;
③ After receiving the device address and read/write bits from the device, if a response is required, pull the SDA line low as a response signal, otherwise keep it high;
④ Before the master device sends data or reads data, it needs to generate a clock pulse, that is, pull the SCL line from high level to low, and then pull it high, so that the slave device knows the timing of data transmission;
⑤ When the master device sends or receives each bit of data, it places the data on the SDA line separately, and synchronizes through the clock pulse timing, and the slave device performs a read or write operation after each bit of data arrives;
⑥ After the master device sends or receives a set of data, it will generate a response bit, that is, pull the SDA line low, and then pull it high, so that the slave device knows the sign that the data transmission is over.
3. advantages and disadvantages
Advantages:
① Save pin resources: IIC only needs two lines (SDA and SCL), so compared with other communication protocols, it can save the use of pin resources;
②Simple and flexible: The IIC communication protocol has a simple transmission method and flexible application scenarios, which can adapt to the communication needs between different devices;
③ Faster speed: IIC communication protocol can realize high-speed data transmission, generally can reach the transmission speed of 400kHz.
Disadvantages:
①Limited communication distance: Since IIC communication uses level signal transmission, its transmission distance is limited by level signal attenuation and noise interference. Generally speaking, the transmission distance should not be too long;
②Restrictions on network topology: IIC communication requires the master device to manage the bus, so the network topology is subject to certain restrictions, and the number of master devices and the length of the bus have certain requirements;
③Single-master device: The IIC communication protocol generally only supports the connection mode of single-master device and multi-slave device. If multi-master device communication is required, other protocols need to be used.
The IIC communication principle is a simple and efficient serial communication protocol, which is suitable for communication between various integrated circuits. It is widely used in electronic equipment, sensors, displays and other fields, but it also has certain limitations. With the continuous advancement of technology, the principle of IIC communication will continue to develop and improve, providing better solutions for the interconnection of various electronic devices.
Ebyte is a national high-tech enterprise specializing in the research
and development of wireless modules and industrial IoT terminals.
Independently developed and produced products include LoRa/WiFi Wireless Module/Bluetooth/ZigBee wireless modules, 4G networking equipment, Ethernet modules, NB-IoT data transmission terminals, industrial IoT.