Jump to content

4x20 I2C LCD display (HD44780) with Banana Pi not working


nkahl

Recommended Posts

Hello,

 

I have a 4x20 LCD display (with an HD44780 compatible adaptor) connected to my Banana Pi. It is running (freshly installed, switched from Bananian) on the mainline kernel:

Linux bpi 4.9.7-sunxi #1 SMP Thu Feb 2 01:52:06 CET 2017 armv7l GNU/Linux

However, the display is not recognized. I checked the wire connections multiple times, they're okay and the backlight is on.

 

So I assume this is a software issue. The output of "i2cdetect -y 1" is:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

which leads me to the consideration that it is not even recognized by the system.

 

I did the following things - without success:

  • run "apt-get dist-upgrade" (where some 404 errors occured, see this topic for details)
  • installed "i2c-tools" and "python-smbus"
  • loaded "i2c-dev" kernel module

 

According to the documentation https://docs.armbian.com/Hardware_Allwinner/#connect-your-lcd-display, the I2C stuff should work out of the box in the mainline kernel.

 

Any help would be appreciated. :)

 

Best regards and thanks in advance,

Norbert Kahl

Link to comment
Share on other sites

I am using a "normal" Banana Pi, not a Pro or M2 model.

 

There are two I2C-busses here:

root@bpi:/dev# ls /dev/i2c-*
/dev/i2c-0  /dev/i2c-1

On the 0-bus, there is "something" detected but I guess it belongs to the system or internal hardware, not to the display:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

The 1-bus is just blank. :(

Link to comment
Share on other sites

Yes, I2C-0 has the PMIC attached to it.

Since you don't see the i2c-3, it is probably not enabled in the DT, you will have to tweak it by decompile the DTB, edit it, and recompile it. (Of course, after having done a backup of the previous one)

 

Link to comment
Share on other sites

Sorry for all the rush. It was the length of the cable (> 2 metres) which caused this error, since pull-up resistors and terminators are required at that length. Just another I2C-Newbie... :)

 

When using jumper wire (~ 20cm), it works, the LCD display appears as 0x27 on I2C-1.

 

Thanks for all the help!

 

Best regards,

Norbert Kahl

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines