Page 1 of 1

Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:00 pm
by add1ct3dd
Hey,

So im on the latest Raspbian on one of the first pi's, but can't get my Adafruit LCD working!

I've enabled the modules, but when I run sudo i2cdetect -y 0 I get this:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77


Alternatively if i run sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Is there something im doing wrong?

If i run the example code in Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate:

sudo python Adafruit_CharLCDPlate.py
Cycle thru backlight colors
Red
Yellow
Green
Teal
Blue
Violet
Off
On
Try buttons on plate
Error accessing 0x20: Check your I2C address
Select
Error accessing 0x20: Check your I2C address


Anyone have any ideas?

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:05 pm
by joan
Which pins on the device are connected to which pins on the Pi?

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:11 pm
by add1ct3dd
It sits on the top of the Rpi, so all of them.

http://i.imgur.com/te9A40x.jpg

Any clues? im gonna go over all the solder joints but they looked fine!

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:15 pm
by joan
Not much scope for having the wrong pins connected then!

If you do an i2cdetect -y 0 without the LCD connected do you get similar results to i2cdetect - y 1?

Are there any configuration switches on the LCD? It shouldn't be responding to every address on the i2c bus.

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:19 pm
by add1ct3dd
Yep 5 switches, so it should only be responding to one of the i2c!

Tried it unplugged and made no difference to the i2cdetect!

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:22 pm
by add1ct3dd
Apparently when I run the command I should get this:

http://learn.adafruit.com/system/assets ... 1353533987

Certainly not the case!

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:33 pm
by joan
i2cdetect should be showing all hyphens if nothing is connected.

Code: Select all

joan@soft ~ $ i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
joan@soft ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
joan@soft ~ $ ls -l /dev/i2c*
crw-rw---T 1 root i2c 89, 0 Jul  1 22:54 /dev/i2c-0
crw-rw---T 1 root i2c 89, 1 Jul  1 22:54 /dev/i2c-1
joan@soft ~ $  lsmod
Module                  Size  Used by
aes_generic            31536  1 
i2c_dev                 5620  0 
i2c_bcm2708             3923  0 
snd_bcm2835            16304  0 
snd_pcm                77560  1 snd_bcm2835
snd_page_alloc          5145  1 snd_pcm
snd_seq                53329  0 
snd_seq_device          6438  1 snd_seq
snd_timer              19998  2 snd_pcm,snd_seq
snd                    58447  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
fuse                   69333  1 
arc4                    1676  2 
rt73usb                23292  0 
rt2x00usb              11215  1 rt73usb
rt2x00lib              42334  2 rt73usb,rt2x00usb
mac80211              273413  2 rt2x00lib,rt2x00usb
cfg80211              184163  2 mac80211,rt2x00lib
rfkill                 18202  2 cfg80211
leds_gpio               2235  0 
led_class               3562  2 leds_gpio,rt2x00lib
joan@soft ~ $ 
I have some stuff connected to bus 0, nothing on bus 1. Is your lsmod similar?

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:35 pm
by add1ct3dd

Code: Select all

pi@pi:~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate$ cd
pi@pi:~$ ls -l /dev/i2c*
crw-rw---T 1 root i2c 89, 0 Jul  2 14:24 /dev/i2c-0
crw-rw---T 1 root i2c 89, 1 Jul  2 14:24 /dev/i2c-1
pi@pi:~$ lsmod
Module                  Size  Used by
nfsd                  229441  2
ipv6                  278186  35
i2c_dev                 5620  0
spidev                  5224  0
leds_gpio               2235  0
led_class               3562  1 leds_gpio
spi_bcm2708             4816  0
i2c_bcm2708             3923  0
any luck?

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:41 pm
by joan
That looks fine.

If you get responses to i2cdetect on bus 0 with nothing connected it suggests a hardware problem. I'm afraid that is outside my experience and I have no idea how to find out what is wrong.

Re: Issue with i2c on Adafruit LCD Board?

Posted: Tue Jul 02, 2013 1:46 pm
by add1ct3dd
Balls, ok!

Thanks for the help anyway :)