trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

RGB LCD1602 | Detected, but not working

Thu Jun 17, 2021 8:25 am

Hi everyone,

I am trying to use a 16x2 RGB LCD by WaveShare and I have it connected via I2C to my Pi 3B like shown in this image. The display does get detected by i2cdetect, but no matter which of the three addresses I use I get an I/O error.

1) Tried to also get it to run using my Pi Zero, but it does not even get detected with it.
2) According to WaveShare the screen supports both 3V and 5V, but for me it only gets detected when connected to the 5V pin.
3) I have installed both python-smbus and i2c-tools.
4) I have enabled the I2C interface via raspi-config.
5) I have both i2c-dev and i2c-bcm2708 in /etc/modules.
6) I have tried changing the addresses in the driver provided in this example, however no matter which one of the three addresses I used I still get the error.
7) Running ls -la /dev/i2c-1 returns:
crw-rw---- 1 root i2c 89, 1 Jun 16 23:17 /dev/i2c-1
8) Running i2cdetect -y 1 returns:

Code: Select all

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3e --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
What could be the cause for this? Any tips on how to solve this issue?

twostage
Posts: 125
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: RGB LCD1602 | Detected, but not working

Thu Jun 17, 2021 9:46 am

What should it's i2c address be ? Do you have any other devices connected (I'm assuming not given your wiring picture).
The diagram on their website does show power from the 3.3 but it should work from 5v anyway.

Bad unit ? Have you got another i2c device to test ?

( like the look of it by the way, never seen a multi-coloured one before)

trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

Re: RGB LCD1602 | Detected, but not working

Thu Jun 17, 2021 10:23 am

1) I do not know what the I2C address should be, as I have never managed to get it to run, however when I disconnect the screen all of these addresses shown on i2c-detect disappear. Also, just to note, the RGB backlight has a separate address from the display's address(es).
2) I have no other I2C devices connected.
3) Also got no other I2C-based devices that I can test with.
4) I am thinking that it might be the fact that I am not using the original RPi powersupply (since mine broke and I am waiting for a new one to get delivered to me right now), but one that can put out .1V less and 0.5A less.
5) Can it be a bad unit still if i2c-detect lists its addresses?

twostage
Posts: 125
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: RGB LCD1602 | Detected, but not working

Thu Jun 17, 2021 2:51 pm

Found this :-

https://www.waveshare.com/w/upload/2/2e ... Module.pdf

As you say 2 i2c addresses. The documentation says 7c and c0 which doesn't look right. But anyway, you should be getting 2 not three.
Power supplies I tend to be quite cavalier about if its a zero and use just about anything that has a 5v supply but it is definitely worth ruling our power supply as the issue.

trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

Re: RGB LCD1602 | Detected, but not working

Thu Jun 17, 2021 3:06 pm

So in this case it is most likely a faulty unit (since i get three addresses: 0x60, 0x70 and 0x3e)? Also what would be the reason for the screen to not get detected on my Pi Zero WH at all in that case?

P.S: Also, to make sure I have done it right, to use I2C I just need to enable it from raspi-config, right?

twostage
Posts: 125
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: RGB LCD1602 | Detected, but not working

Fri Jun 18, 2021 7:23 am

Yes, just enable in raspi-config and it should be seen by the software.

Wiring is always a possibility but it's only 4 wires and faulty wiring with an i2c device usually means it's not detected at all..

Did you get the new power supply ?

trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

Re: RGB LCD1602 | Detected, but not working

Fri Jun 18, 2021 8:08 am

Supply should arrive in a few hours tops. Let's hope this solves the issue.

trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

Re: RGB LCD1602 | Detected, but not working

Fri Jun 18, 2021 11:25 am

My RPi-branded power supply arrived. I just tried once again (now with the OEM supply) to use the display and it is still not even turning on - the display stays dark (i2c-detect still shows the same wrong addresses). I have called the seller I bough it from and I'll try to get it replaced, since it might just be a bad unit at that point.

UPDATE: The seller mentioned that I am the first buyer of such display from them, since it is a new product and they had not tested such a display with an RPi (just with an Arduino) before beginning to mass-sell them.

ddahms
Posts: 77
Joined: Tue Mar 18, 2014 3:38 pm

Re: RGB LCD1602 | Detected, but not working

Fri Jun 18, 2021 11:01 pm

I2C has a 7-bit address range. The address is shifted left one bit when the R/W bit is added. Sometimes companies specify the address including this shift. In this case the example code you referenced defines the address as:

Code: Select all

LCD_ADDRESS   =  (0x7c>>1)
RGB_ADDRESS   =  (0xc0>>1)
and indeed those two values are 0x3e and 0x60, as shown by i2cdetect. So that much makes sense.

But this does not explain what is causing the 0x70.

twostage
Posts: 125
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: RGB LCD1602 | Detected, but not working

Sat Jun 19, 2021 10:53 am

Worth waiting until this is resolved before I take the plunge then, I do like the look of them.

trayanovboris
Posts: 6
Joined: Thu Jun 17, 2021 7:35 am

Re: RGB LCD1602 | Detected, but not working

Tue Jun 22, 2021 8:45 am

It was a defective cable from the side that connects to the I2C GPIO pins (the SDA & SCLK) - too loose and not making a good enough connection with the pins themselves. They sent me a working cable and the display is now detected and working as it should.

twostage
Posts: 125
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: RGB LCD1602 | Detected, but not working

Thu Jul 01, 2021 2:17 pm

trayanovboris wrote:
Tue Jun 22, 2021 8:45 am
It was a defective cable from the side that connects to the I2C GPIO pins (the SDA & SCLK) - too loose and not making a good enough connection with the pins themselves. They sent me a working cable and the display is now detected and working as it should.
Glad it's sorted. Might have a look at them now. :D

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