custom cape i2c bus

201 views
Skip to first unread message

johan....@han.nl

unread,
Jul 17, 2014, 11:47:40 AM7/17/14
to beagl...@googlegroups.com
I managed to make my own cape (for two XBee modules). It works very well (even sending between the two modules and to the third one on the computer), but:

if I use node ./eeprom.js

I suspect that my cape is expected to be connected to the fourth (or third if you start counting at 0) i2c bus:

/sys/bus/i2c/drivers/at24/3-0057/eeprom instead of /sys/bus/i2c/drivers/at24/1-0057/eeprom 

So should I fix that in my cape (my cape is default at /sys/bus/i2c/drivers/at24/1-0057 but can be configured to go from /sys/bus/i2c/drivers/at24/1-0054 .. /sys/bus/i2c/drivers/at24/1-0057)

Apart from that, I managed to program the eeprom and get it working, but since it uses UART 2 and UART 5 I needed to change /boot/uboot/uEnv.txt to get that working (BBB Rev B so that is why I needed to change /boot/uboot/uEnv.txt instead of /media/BEAGLEBONE/uEnv.txt), but do I need to supply that with my final version somewhere or is it enough to put that in the manual?

Sincerely,
Johan

prakash....@gmail.com

unread,
Sep 2, 2014, 1:29:28 PM9/2/14
to beagl...@googlegroups.com
Hi !!

I'm facing problem with Custom I2C cape. It's I/o Expander using NXP's PCF8574T Expander chip. I'm unable to detect it. I tried every thing available on web. Can you help me ? please ?

Here is some output.

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux

root@beaglebone:~# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- 34 -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@beaglebone:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

root@beaglebone:~# i2cdetect -y -r 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- 22 -- 24 -- 26 -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

I'm using Beaglebone Black Rev B.

Hope Listen form you soon.
Thanks.

Gerald Coley

unread,
Sep 2, 2014, 2:40:54 PM9/2/14
to beagl...@googlegroups.com
What size pullup resistors are you using on the I2C bus?

Gerald


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prakash Parmar

unread,
Sep 3, 2014, 11:17:01 AM9/3/14
to beagl...@googlegroups.com
Hi,
Thanks for reply.

The pullup resistor which is using in I2C Bus is 10K with 3.3V.

Regards,
Prakash


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/eosKBg3yKHw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Gerald Coley

unread,
Sep 3, 2014, 11:18:52 AM9/3/14
to beagl...@googlegroups.com
I would take that down to 4.7k. Not sure that it will fix your issue, but a stronger pullup is generally required.

Gerald

ky...@cranehome.info

unread,
Sep 5, 2014, 4:25:40 PM9/5/14
to beagl...@googlegroups.com
So it appears you should expect to see a device between 0x20 through 0x27 from the datasheets.   The device address is 00100000 when not shifted for the R/W bit.   That corresponds to 0x20 as the base chip address and the A1,A2, and A3 pins can set up to 7 other address for the final three bits.   I2C can be really confusing in how the addresses are specified in various datasheets.  Linux reports the 7 bit address of devices it finds in hexadecimal.


I see your output shows devices at 0x20, 0x22, 0x26, and 0x28.   That appears to be the correct hecxidecimal, 7-bit, addresses for the chips?  Do you have 4 chips wired up?

Prakash Parmar

unread,
Sep 8, 2014, 2:18:51 PM9/8/14
to beagl...@googlegroups.com
Hi,

You are right. I have 4 PCA8574T I/o Expander chip.


On Sat, Sep 6, 2014 at 1:55 AM, <ky...@cranehome.info> wrote:
So it appears you should expect to see a device between 0x20 through 0x27 from the datasheets.   The device address is 00100000 when not shifted for the R/W bit.   That corresponds to 0x20 as the base chip address and the A1,A2, and A3 pins can set up to 7 other address for the final three bits.   I2C can be really confusing in how the addresses are specified in various datasheets.  Linux reports the 7 bit address of devices it finds in hexadecimal.


I see your output shows devices at 0x20, 0x22, 0x26, and 0x28.   That appears to be the correct hecxidecimal, 7-bit, addresses for the chips?  Do you have 4 chips wired up?

--

ky...@cranehome.info

unread,
Sep 11, 2014, 5:24:31 PM9/11/14
to beagl...@googlegroups.com, prakash....@gmail.com
Then it appears your cape is working and the chips are at least visible to the bus.   You should be able to use the smbus system calls to talk to them.   Might be able to do something with i2cget. 






 
Reply all
Reply to author
Forward
0 new messages