16x2 RGB LCD, MCP23017 + BBB intermittent connection problem

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mikeestee
 
Posts: 4
Joined: Fri Jan 03, 2014 3:04 pm

16x2 RGB LCD, MCP23017 + BBB intermittent connection problem

Post by mikeestee »

hi,

i'm having trouble getting a reliable connection going between a Beaglebone Black & a 16x2 RGB LCD pi plate. I've gotten the Adafruit_CharPlate/LCDTest.py code to work with it once, so the software tool chain is working. I think it's a signaling problem, but I'm not sure what to try next.

Looking at the design of the RGB LCD pi-plate, it has no level shifters. i2c pulls the bus lines down to signal, so I can see how the 5V RGB LCD plate could work with a 3.3V bus in some situations.

I made the perhaps erroneous assumption that the RaspPi & the BBB had a similar hardware implementation of their 3.3V i2c bus. The look similar, and both hav 5.5k pull-ups already on board. In theory they should work, and in fact, I've seen it work, but only for a few seconds.

I thought maybe I had a loose wire, but I can watch the SDA SCL lines at the MCP23017 and at the BBB and they look comparable. The rise times don't seem particularly sharp, but they look the same coming off the BBB with nothing connected.

I use "i2cdetect -y -r 1" to poll the bus, and I see the usual output:

Code: Select all

root@beaglebone:~# i2cdetect -r -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  
every once in a while, I see a 20 that shows that the bus recognizes the MCP, and then it drops back off again.

Any idea what I should try next? Why is there no level shifter in the Pi-Plate which runs at 5V and is designed for a 3.3V i2c interface?

Thanks,
mikest

User avatar
jlbeck
 
Posts: 26
Joined: Fri Aug 09, 2013 11:45 am

Re: 16x2 RGB LCD, MCP23017 + BBB intermittent connection pro

Post by jlbeck »

How are you powering everything? What size power supply?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 16x2 RGB LCD, MCP23017 + BBB intermittent connection pro

Post by adafruit_support_mike »

Try dropping the '-r' option.. that forces an I2C 'read' command using parameters considered 'safe' for each address. The `i2cdetect` manpage lists it as "Not recommended".

More generally, you can check to see if the MCP23017 is reading the bus correctly by watching the signals of the initial connection. The BBB will emit the control byte during the first 8 clock cycles, and the MCP23017 should emit an ACK by pulling the bus LOW on the 9th. Isolating the correct bit pattern of a full bus scan would be a headache without a protocol analyzer, but you can limit the address range with:

Code: Select all

i2cdetect -y 1 0x1f 0x21

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”