8devices Community https://www.8devices.com/community/ |
|
i2c https://www.8devices.com/community/viewtopic.php?f=13&t=833 |
Page 1 of 2 |
Author: | kajotsoft [ 28 Oct 2014, 13:15 ] |
Post subject: | i2c |
Hi I have a question about i2c support. According to viewtopic.php?f=5&t=416 (tty post from 27 May 2013, 11:03) it is supported in openwrt. I take the latest openwrt code (14.07), compile image as it was suggested, but I can not get it working (my RTC clock is MCP79401 is connected to GPIO_18 - SDA and GPIO_19 - SCL with 2k2 pullup resistors to +3V3, I've configure it with echo i2c-gpio-custom bus0=0,18,19 > /etc/modules.d/66-i2c-gpio-custom). How I should use i2c-tools to get it working? |
Author: | FPeter [ 28 Oct 2014, 14:19 ] |
Post subject: | Re: i2c |
Author: | kajotsoft [ 28 Oct 2014, 14:25 ] |
Post subject: | Re: i2c |
Hi, thanks for fast answer, responses below: root@OpenWrt:~# i2cdetect -l root@OpenWrt:~# i2cdetect -y 0 Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory |
Author: | FPeter [ 28 Oct 2014, 14:33 ] |
Post subject: | Re: i2c |
Author: | kajotsoft [ 28 Oct 2014, 14:42 ] |
Post subject: | Re: i2c |
dmesg | grep -i i2c [ 11.900000] Custom GPIO-based I2C driver version 0.1.1 [ 11.910000] i2c-gpio i2c-gpio.0: using pins 18 (SDA) and 19 (SCL) lsmod | grep i2c i2c_gpio_custom 880 0 so you're right, I load it by: insmod i2c-dev lsmod | grep i2c i2c_dev 4064 0 i2c_gpio_custom 880 0 i2cdetect -l i2c-0 i2c i2c-gpio0 I2C adapter i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 6f 70: -- -- -- -- -- -- -- -- thanks how can I now read data from RTC? (how to use i2cget?) |
Author: | FPeter [ 28 Oct 2014, 14:57 ] |
Post subject: | Re: i2c |
Author: | kajotsoft [ 28 Oct 2014, 14:59 ] |
Post subject: | Re: i2c |
thanks for help, if you can share some C code to deal with i2c I will be grateful thanks for help |
Author: | FPeter [ 28 Oct 2014, 15:21 ] |
Post subject: | Re: i2c |
Author: | kajotsoft [ 28 Oct 2014, 15:24 ] |
Post subject: | Re: i2c |
thank you |
Author: | tty [ 28 Oct 2014, 19:23 ] |
Post subject: | Re: i2c |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |