TS-7180 TWI: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 25: | Line 25: | ||
| [[TS-7180#FPGA | #FPGA]] | | [[TS-7180#FPGA | #FPGA]] | ||
|} | |} | ||
In addition to the CPU i2c buses, a bit-banged i2c interface is available on the daughter-card interface, using gpio. You may instantiate new devices on this bus, as shown in this example: | |||
<source lang=bash> | |||
echo ssd1306 0x3c > /sys/bus/i2c/devices/i2c-4/new_device | |||
</source> | |||
After executing the above command, you may then access the device at address 0x3c. You may use the i2c-tools, or write your own client. Technologic Systems has provided a simple client program for writing to an SSD1306 OLED display connected to the HD1 connector. The photo below shows the output on the display. | |||
{{Note|It is also possible to request the kernel to bitbang additional I2C buses as needed. See an example [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/619e6bf97479243e9d7b7f6b34ce0ae8558ff1fd/arch/arm/boot/dts/imx6qdl-ts4900-2.dtsi#L196 here].}} | {{Note|It is also possible to request the kernel to bitbang additional I2C buses as needed. See an example [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/619e6bf97479243e9d7b7f6b34ce0ae8558ff1fd/arch/arm/boot/dts/imx6qdl-ts4900-2.dtsi#L196 here].}} | ||
The kernel makes the I2C available at /dev/i2c-#. You can use the i2c-tools (i2cdetect, i2cget, i2cset), or you can [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/619e6bf97479243e9d7b7f6b34ce0ae8558ff1fd/Documentation/i2c/dev-interface write your own client]. | The kernel makes the I2C available at /dev/i2c-#. You can use the i2c-tools (i2cdetect, i2cget, i2cset), or you can [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/619e6bf97479243e9d7b7f6b34ce0ae8558ff1fd/Documentation/i2c/dev-interface write your own client]. |
Revision as of 12:56, 18 December 2018
The i.MX6 supports standard I2C at 100khz, or using fast mode for 400khz operation. The CPU has 2 I2C buses used on the TS-7180.
I2C 1 is internal to the TS-7180 and connects to the onboard Silabs supervisory microcontroller at 100khz; and to the onboard ST M41T00S real-time clock (RTC).
Address | Device |
---|---|
0x4a | #Silabs |
0x68 | #RTC |
The second I2C bus is connected to the onboard FPGA. This bus also runs at 400khz by default.
Address | Device |
---|---|
0x28-0x2f | #FPGA |
In addition to the CPU i2c buses, a bit-banged i2c interface is available on the daughter-card interface, using gpio. You may instantiate new devices on this bus, as shown in this example:
echo ssd1306 0x3c > /sys/bus/i2c/devices/i2c-4/new_device
After executing the above command, you may then access the device at address 0x3c. You may use the i2c-tools, or write your own client. Technologic Systems has provided a simple client program for writing to an SSD1306 OLED display connected to the HD1 connector. The photo below shows the output on the display.
Note: | It is also possible to request the kernel to bitbang additional I2C buses as needed. See an example here. |
The kernel makes the I2C available at /dev/i2c-#. You can use the i2c-tools (i2cdetect, i2cget, i2cset), or you can write your own client.