I have two questions/doubts in beaglebone black I2c.
Is i2cdev module is installed by default ? I checked lsmod and modprobe i2cdev, I didn’t find it but /dev/i2c-0 and /dev/i2c-1 is present.
If it installed, do I need to do any configuration to use I2c ? (in userspace)
Thanks in advance
1 - i2c was installed by default in my install of the latest factory image…some notes though on the the i2c busses:
i2c-0 is used by some on-board devices
i2c-1 does not yet seem to be supported by the kernel
i2c-2 actually uses the kernel’s /dev/i2c-1 located on p9 with pins 19,20
2 - there are some useful tools for i2c which were from the following link http://elinux.org/Interfacing_with_I2C_Devices:
- list chips on i2c bus (should report a device): i2cdetect -r
- get data from i2c device (should give data): i2cget [register] [b|w]
eg for a TMP102 device with ADDR0 pin tied to GND on I2C-2:
“i2cdetect -r 1” shows device at 0x48
“i2cget 1 0x48 0 w” shows 0xa019 = 0x19a = 25.6C = 78F
Hopefully this is some help,
You are absolutely right. I can see my EEPROM address 50 by executing "i2cdetect -r 1", thank you for the help
It’s worth noting that the i2c driver names the /dev/ files. So it’s only incidental that /dev/i2c-1 points to the i2c-2 pins. Generating a new device tree that configures all three i2c peripherals should cause a /dev/i2c-2 to get created.
What are the default pins for the i2c-0 bus?