Getting access to I2C devices
Now we are ready to manage the real I2C devices. We can find tons of supported devices in the Linux kernel tree, which are usually grouped according to their specific operations; so, for instance, all the I2C real-time clock chips are under the drivers/rtc/
directory, while the I2C EEPROMs are under the drivers/misc/eeprom/
directory, and so on.
For example, we're going to use the following development board that carries five I2C devices:
Note
The device can be purchased at (or by surfing the Internet)
On this board, we have an EEPROM, an ADC, a DAC, a temperature sensor, and an I/O expander, so it's perfect to show you how the I2C bus works, and how the preceding device classes can be accessed within our BeagleBone Black.
First of all, we must complete the electrical connections; so, in the following table, I reported the connection between the BeagleBone Black's pins and the I2C developing board's pins:
BeagleBone... |
---|