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/

16x2 LCD Error accessing 0x20

by jsutherl on Sun Dec 30, 2012 2:59 am

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 | TOGGLE FULL SIZE
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 | TOGGLE FULL SIZE
pi@raspberrypi:~$ sudo i2cget -y 0 0x20
Error: Read failed
pi@raspberrypi:~$


Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~$ sudo i2cset -y 0 0x20 0xff 0xff
Error: Write failed
pi@raspberrypi:~$
jsutherl
 
Posts: 2
Joined: Sun Dec 30, 2012 2:45 am

Re: 16x2 LCD Error accessing 0x20

by tldr on Sun Dec 30, 2012 7:54 am

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

Code: Select all | TOGGLE FULL SIZE
sudo i2cget -y 1 0x20
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 12:34 am

Re: 16x2 LCD Error accessing 0x20

by jsutherl on Mon Dec 31, 2012 9:40 pm

Thank you! So simple, I'm sorry I missed it. But thanks for taking the time to point out my issue.
jsutherl
 
Posts: 2
Joined: Sun Dec 30, 2012 2:45 am