16x2 LCD Error accessing 0x20

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
jsutherl
 
Posts: 3
Joined: Sun Dec 30, 2012 3:45 am

16x2 LCD Error accessing 0x20

Post by jsutherl »

I just built and installed a new Adafruit 16x2 LCD Pi Plate. The extender chip shows up in i2cdetect but I get errors whenever I try to write or read from it. Anyone have any thoughts? I'm pretty new to this and I'm not sure what the next step should be. Perhaps there is something I should send first to turn the LCD on?

Code: Select all

pi@raspberrypi:~$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
pi@raspberrypi:~$ 

Code: Select all

pi@raspberrypi:~$ sudo i2cget -y 0 0x20 
Error: Read failed
pi@raspberrypi:~$ 

Code: Select all

pi@raspberrypi:~$ sudo i2cset -y 0 0x20 0xff 0xff
Error: Write failed
pi@raspberrypi:~$

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: 16x2 LCD Error accessing 0x20

Post by tldr »

you are detecting the device on bus 1, but trying to read and write to it on bus 0. try

Code: Select all

sudo i2cget -y 1 0x20 

jsutherl
 
Posts: 3
Joined: Sun Dec 30, 2012 3:45 am

Re: 16x2 LCD Error accessing 0x20

Post by jsutherl »

Thank you! So simple, I'm sorry I missed it. But thanks for taking the time to point out my issue.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”