- Published: Thursday, 12 May 2011
- Written by Jon Chandler
- Hits: 4322
A number of devices have been decribed on the pages of Digital-DIY that use the I2C interface, including real time clocks, temperature sensors, WII Nunchuks, port expanders and even thermocouple interfaces and a number of Swordfish modules are available to make using these devices simple. The TAP-20-USB board is based around using I2C for expansion.
Hack-A-Day posted about this tutorial available on Embedded Labs. It's a nice overview on how to use I2C devices. Have a look.
I2C (Inter-Integrated Circuit) is a short distance serial interface that requires only 2 bus lines for data transfer. It was invented by Philips in 1980′s, originally 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 low speed peripherals (external EEPROMs, digital sensors, LCD drivers, etc) to the main controller. In this experiment, we will cover an overview of I2C protocol, its implementation in PIC microcontrollers, and the method of connecting single and multiple devices on a common I2C bus. We will demonstrate the technique by connecting two I2C EEPROM chips (24LC512) and an I2C compatible temperature sensor (DS1631) with PIC18F2550 microcontroller.