I2C is a powerful serial communication used in data intensive applications. It replaces a complex parallel interface with a straight forward two-wire interface. Being a Master-Slave interface, each salve in I2C is addressable by a unique address. So, for a 7-bit address from master there can be 2^7 slaves on the line. The addresses ranging from 0 to 127. The maximum slave count is sometimes limited by the capacitance over the bus. Designers need to keep in mind that for a capacitance of less than 200pf, pull-up is used and capacitance over 200pf requires a current source. The maximum capacitance over I2C as per the standard is 400pf.
How a START/STOP bit differs from other data bits transmission and how come slave differentiates between data and START/STOP bits?
During an I2C data transfer, when the CLK is HIGH, no transition must occur on SDA line. If such transition happens, then it is an indication of either a START/STOP condition.
1. START condition is indicated by a HIGH to LOW transition when SCK is HIGH.
2. STOP condition is indicated by a LOW to HIGH transition when SCK is HIGH.
UFm mode:
In Ultra-Fast mode, which can operate at a speed of up to 5Mbps, only unidirectional transfer is possible. There is no ACK from slave as in normal modes. It is a push-pull bus. PCx966x family (I2C bus controller) from NXP supports this ultra high speed I2C transfer.
Applications of I2C:
1. LED controller/driver
2. Touch interfaces for display
3. GPIO Expanders
4. Memory (EEPROM)
5. RTC
6. Gaming industry
7. Sensors
8. ADC/DAC
9. Multiplexer/Switches
10. Communication modules (BT, Wi-Fi, NFC, .. )
11. Other control, portable and consumable applications
Advantages of I2C interface:
1. Simple 2-wire serial interface
2. Easily programmable
3. I2C compared to other parallel interfaces reduces the PCB footprint and results in lower system costs.
What if you don’t have a I2C interface on your device?
An I2C bus controller can be used, to convert any of the parallel interfaces to I2C. MAX166x and PCx966x are some of the examples.
How do you simulate I2C data?
If you are working with a microcontroller, the debugging tools provided by that vendor help to trace the I2C data in registers. But if you have a standalone slave device evaluation board without any master and wanted to debug, TOTAL PAHSE provides some debugging tools which helps to simulate your I2C interface. Aardvark I2C/SPI Host Adapter from TOTAL PHASE acts as master and can pump in data to slave. Beagle I2C/SPI Protocol Analyzer helps to analyze the data transitions between them.