frak
Posts: 17
Joined: Sun Jul 22, 2012 9:33 pm

Strange output from i2cdetect [solved]

Sat May 17, 2014 8:32 pm

I am trying to get the Adafruit 16x2 LCD working, but I think I have messed up the settings somehow. I have enabled the i2c module and can see it in lsmod:

Code: Select all

pi@scythe ~ $ lsmod
Module                  Size  Used by
rfcomm                 33136  0
bnep                   11030  2
bluetooth             225849  10 bnep,rfcomm
rfkill                 19567  2 bluetooth
w1_therm                2870  0
w1_gpio                 2375  0
wire                   25241  2 w1_gpio,w1_therm
cn                      4795  1 wire
i2c_dev                 5277  0
snd_bcm2835            18169  0
snd_soc_pcm512x         8909  0
snd_soc_wm8804          7833  0
snd_soc_bcm2708_i2s     5486  0
regmap_mmio             2818  1 snd_soc_bcm2708_i2s
snd_soc_core          128174  3 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_bcm2708_i2s
snd_compress            8136  1 snd_soc_core
regmap_i2c              1657  3 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_core
snd_pcm_dmaengine       5481  1 snd_soc_core
regmap_spi              1913  3 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_core
snd_pcm                81582  3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc          5168  1 snd_pcm
snd_seq                54657  0
snd_seq_device          6485  1 snd_seq
snd_timer              20353  2 snd_pcm,snd_seq
leds_gpio               2055  0
led_class               4119  1 leds_gpio
snd                    61518  7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
spi_bcm2708             4808  0
i2c_bcm2708             4533  0
So, I have installed the i2ctools package, and with nothing connected to my RPi I would have expected the sudo i2cdetect 0 command to have returned nothing but a table of dashes, however, it shows that quite a lot of devices are connected:

Code: Select all

pi@scythe ~ $ sudo i2cdetect -y 0
     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
Have I got a problem with my hardware, or have I mis-configured something?

Thanks for your help
Last edited by frak on Sat May 17, 2014 9:46 pm, edited 1 time in total.

User avatar
joan
Posts: 14930
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Strange output from i2cdetect

Sat May 17, 2014 9:17 pm

Looks like a wiring problem. If you disconnect the Adafruit LCD does it still show all devices as connected?

frak
Posts: 17
Joined: Sun Jul 22, 2012 9:33 pm

Re: Strange output from i2cdetect

Sat May 17, 2014 9:25 pm

Yeah, I disconnected it as soon as I saw the weird output - and I have tried this on two different devices (both rev a)

frak
Posts: 17
Joined: Sun Jul 22, 2012 9:33 pm

Re: Strange output from i2cdetect

Sat May 17, 2014 9:34 pm

Hah! It was the 1wire stuff that I had enabled that I didn't need. I just disabled those modules in /etc/modules and I get the expected output

Code: Select all

pi@scythe ~ $ sudo 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
EDIT: Confirmed. My LCD plate now functions as expected :)

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Strange output from i2cdetect [solved]

Sun May 25, 2014 10:12 pm

I think that if you had used the 09-25-2013 version of Raspbian, you could have your cake and eat it too.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Interfacing (DSI, CSI, I2C, etc.)”