Difference between revisions of "Interfacing with I2C Devices"
m |
|||
| Line 1: | Line 1: | ||
| − | This page is meant to provide some basic information about how to interface with [http://en.wikipedia.org/wiki/I%C2%B2C I²C] devices through the /dev/i2c interface. The I²C bus is commonly used to connect relatively low-speed sensors and other peripherals to equipment varying in complexity from a simple microcontroller to a full-on motherboard. I²C is extremely popular due to its ease-of-use and ability to control multiple peripherals while utilizing only two pins on the host controller. | + | This page is meant to provide some basic information about how to interface with [http://en.wikipedia.org/wiki/I%C2%B2C I²C] devices through the /dev/i2c interface. The I²C bus is commonly used to connect relatively low-speed sensors and other peripherals to equipment varying in complexity from a simple microcontroller to a full-on motherboard. I²C is extremely popular due to its ease-of-use and ability to control multiple peripherals while utilizing only two pins on the host controller. Although I2C has a variety of modes, this page will deal purely with communication between a Linux-based master and a slave peripheral for the time being. |
= Code = | = Code = | ||
| Line 15: | Line 15: | ||
[http://en.wikipedia.org/wiki/I%C2%B2C Wikipedia I²C Page] | [http://en.wikipedia.org/wiki/I%C2%B2C Wikipedia I²C Page] | ||
| + | [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/i2c/dev-interface Linux Kernel I2C Documentation] | ||
[[Category:Robotics]] | [[Category:Robotics]] | ||
Revision as of 18:19, 27 April 2010
This page is meant to provide some basic information about how to interface with I²C devices through the /dev/i2c interface. The I²C bus is commonly used to connect relatively low-speed sensors and other peripherals to equipment varying in complexity from a simple microcontroller to a full-on motherboard. I²C is extremely popular due to its ease-of-use and ability to control multiple peripherals while utilizing only two pins on the host controller. Although I2C has a variety of modes, this page will deal purely with communication between a Linux-based master and a slave peripheral for the time being.
Code
Note: Examples shown on this page were developed based on a Texas Instruments BeagleBoard and some changes will be required depending on the system being utilized.
Tested Devices
- AD7991 Quad Input ADC
- Utilized with Sharp GP2D12 IR Range Sensors
- SRF08 Ultrasonic Range Sensors
- ADXL345 3-axis Accelerometer