LX Group discusses the Inter-integrated Circuit Bus

22nd January 2013
CONTACT US

As mentioned in our previous discussion of the 4-20 mA current loop, there are many forms of wired data transmission that can be used in products, and today we’d like to review another form – the Inter-integrated Circuit bus (or I2C bus for short). This is also known as the “two wire interface” and has been around for quite some time. Invented by NXP (previously Philips Semiconductor) the I2C bus is a multi-master serial single-ended data bus used to allow systems to communicate with a huge variety of electronic devices.

From a hardware perspective it is quite simple – 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, for example:

 The master device controls the bus clock and initiates communications with each slave device. Communications are initiated by sending the slave device address – which is unique to each device – and then either data write or request commands. Then the slave device will act upon received data, or broadcase the required number of bytes of data back to the master device.

You may be wondering how the slave addresses are organised – each device manufacturer applies for an address range from NXP for their products. Some devices will only have one set address, and some can have their address altered – for example by changing the last three bits in the binary representation of the addresses. This is done in hardware by connecting three pins to Vdd or GND.

The speed of the I2C bus varies, and 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 – and many design engineeers are familiar with the bus due to the history.



But what sort of devices can make use of the I2C bus? There are literally thousands available, in a wide range of categories. These can include simple temperature sensors, EEPROMS, motor controllers, LCD interfaces, I/O expanders, real-time clocks, UART interfaces, ADC/DACs, and more.

Apart from the huge range of devices, the advantages of using the I2C bus include industry expertise, the ability to address literally hundreds of devices using only two master I/O pins, and that devices on the bus can be “hot swap” – that is you can add or remove devices from the bus without powering off the entire system. This in itself is perfect for systems with maximum run-time requirements, as technicians can replace faulty device modules with reduced down-time for the end user.

However there are disadvantages to the I2C bus, two of which need to be taken into consideration. The first is that the maximum physical length of a bus run is usually around 20 metres, and in some cases much less. You can use bus extension devices from NXP (and others) that will allow much further physical distances – however designers need to ensure the capacitance across the bus stays at around 400 picofarads.

The second disadvantage is the possibility of slave address clash. You may have two specialised devices with the same slave address. In these situations you 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.

It can be said that the I2C data bus may not be the “latest technology”, but it can effectively solve problems in the right circumstances. However there are many options, and choosing the right one is a fundamental step for the success of your project. So if your design team is set in their ways, or you’re not sure which data communication method is best for your application – it’s time to discuss this with independent, experienced engineers.

 At the LX Group we have experience designing a wide range of data gathering and control systems over short and long distances – and using this experience we can determine the most effective method of returning data and control signals no matter the application or geography. Our engineering team have developed a number of systems in this area and have extensive experience with the core technology requirements of such systems.

We understand the importance of high availability, accuracy and integrity of the systems, combined with the need for future proofing infrastructure rollouts. For more information or a confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design. https://lx-group.com.au  Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.
LX GroupLX Group discusses the Inter-integrated Circuit Bus

Have a project you’d like to discuss? Speak to someone today.

Add your email and we’ll keep you in the loop with our future developments.