There are many forms of wired data transmission that can be used in products - the Inter-integrated Circuit bus (or I2C bus for short) will be reviewed in this article.
Also known as the ‘two wire interface’, the I2C bus invented by NXP (previously Philips Semiconductor) is a multi-master serial single-ended data bus used to allow systems to communicate with a huge variety of electronic devices.
In the I2C bus, each device connects to the serial data and clock lines, which are controlled by the master device. The clock and data lines are connected to Vdd via pull-up resistors.
The master device controls the bus clock and initiates communications with each slave device. Communications are initiated by sending the slave device address unique to each device, and then data write or request commands. The slave device will act upon received data, or broadcase the required number of bytes of data back to the master device. For slave addresses, each device manufacturer applies for an address range from NXP for their products.
The speed of the I2C bus can range from 10 kbps to 3.4Mbps, with the speed usually proportional to the total device power requirements. The usual speed for the majority of devices is 100 kbps.
The decision to use the I2C bus can be simple, due to the popularity of the interface even on the most inexpensive of microcontrollers. Devices that can make use of the I2C bus include simple temperature sensors, EEPROMS, motor controllers, LCD interfaces, I/O expanders, real-time clocks, UART interfaces and ADC/DACs among others.
Advantages of using the I2C bus include industry expertise and the ability to address literally hundreds of devices using only two master I/O pins. Additionally, devices on the bus are hot swappable – one can add or remove devices from the bus without powering off the entire system, which is ideal for systems with maximum run-time requirements, as technicians can replace faulty device modules with reduced downtime for the end user.
One of the major disadvantages of the I2C bus is that the maximum physical length of a bus run is usually around 20 metres, and in some cases much less. One can use bus extension devices from NXP that will allow much further physical distances, however designers need to ensure the capacitance across the bus stays at around 400 picofarads.
The possibility of slave address clash is another disadvantage. When one has two specialised devices with the same slave address, they need to use an address multiplexer IC on the bus, which first needs to be controlled, and then the device selected is addressed as normal. Nevertheless, as part of normal prototyping and planning these disadvantages can be removed or minimised with appropriate engineering.
LX Group has the experience to design a wide range of data gathering and control systems over short and long distances.