chipKIT Tutorial 6: Inter-Integrated Circuit (I2C) communication




I2C or IIC (Inter-Integrated Circuit) is a simple bidirectional serial interface, which requires only 2 signal lines for data transfer. It was originally developed by Philips in 1980′s to provide easy on-board communications between a CPU and various peripheral chips in a TV set. Today, it is widely used in varieties of embedded systems to connect many low speed peripherals, such as external EEPROMs, sensors, LCD drivers, port expanders, real-time clocks, etc, to the host microcontroller. In this tutorial, we will explore the chipKIT Wire Library for establishing an I2C communication link between the chipKIT Uno32 board and two I2C sensors. The Uno32 board receives the sensor outputs through the I2C link and displays the results on the serial monitor window on the computer screen. – See more at: http://embedded-lab.com/blog/?p=8232#sthash.9WEDvhyg.dpuf
TheoryAn I2C bus consists of two signal lines called SDA (data) and SCL (clock). Just line Arduino Uno, the chipKIT Uno32 board offers the SDA and SCL connections via analogue input pins A4 and A5 respectively. Each device connected to the I2C bus is software addressable by an unique 7-bit address. Multiple I2C devices can be connected to the same I2C bus as long as they have different addresses. A simple Master and Slave relationship exist at all times between the communicating devices. The Master device initiates a data transfer, generates clock signals and terminates the transfer. Any device addressed by the Master at any time is considered a slave.

Inter-Integrated Circuit (I2C) communication




Both SDA and SCL are open-drain lines, and therefore, require two pull-up resistors during operation. A more detail look of the I2C Bus protocol and how the exchange of information takes place between Master and Slave has been discussed in one of my previous tutorials, Inter-Integrated Communication in PIC MCU. So I am not going to repeat that here again.

READ  LTC3601 - 1.5A, 15V Monolithic Synchronous Step-Down Regulator

 




Leave a Comment

*
= 5 + 7

(Spamcheck Enabled)

Read previous post:
Android ADK2012 is here and is powered by Arduino technology
Android ADK2012 is here and is powered by Arduino technology

ADK2012 board Google has unveiled at Google IO their new  Accessory Development Kit for Android mobile phones and tablets, the...

Close
Scroll to top