I2C LED 16x2 support
Started by cris bar




4 posts in this topic
cris bar

14 posts 4 threads Joined: Aug 2021
16-08-21, 19:56 -
#1
Helloo!

Trying hard to make work samplerbox on RPI3b+, Hifiberry DAC and LCD 16x2 1602A, chip PCF8574T

I can make it sound thru my controller! Nice... But, I can see nothing on the display, just full lighted blue color when is ON, no characters.
I have change configuration.txt to 

USE_I2C_LCD = TRUE
I2C_LCD_ADDR=0x27     
I2C_LCD_PORT=1 ---> not sure about this number...


Also changed in file modules/I2C_lCD.py the adress to 0x27 (it was 0x3f)

The wiring from I2C to RPI is:

GPIO2 = Data
GPIO3 = Clock
PIN 4 = VCC
PIN 6 = GND


I even tried without the DAC and the same PINS above with no results.

AM I MISSING SOMETHING??

IM USING Linux Samplerbox 4.14.30-v7+

PLease help because is very frustrating!!
THANK YOU!
hansehv

168 posts 17 threads Joined: Dec 2020
17-08-21, 00:11 -
#2
(16-08-21, 19:56)cris bar Wrote: I have change configuration.txt to 
USE_I2C_LCD = TRUE
I2C_LCD_ADDR=0x27     
I2C_LCD_PORT=1 ---> not sure about this number...


Also changed in file modules/I2C_lCD.py the adress to 0x27 (it was 0x3f)

The wiring from I2C to RPI is:
GPIO2 = Data
GPIO3 = Clock
PIN 4 = VCC
PIN 6 = GND


IM USING Linux Samplerbox 4.14.30-v7+
Hi Cris,

Configuration looks OK, port number is usually 1 - but hardware may differ.
The I2C_LCD.py didn't need your change, as some statements further this 0x3F default is overridden by the value entered in the configuration.txt.
Wiring looks OK as well (but read on..) and you're obviously working with the correct image.

So, all seems OK but it doesn't work. Hmm. I understand the frustration.

Being curious I looked around and stumbled on this, containing remark "I belive your PCF8574 board is a Chinese version which has the wires swapped on the board", which actually helped in this particular case.
However this is for Arduino and I couldn't really figure out WHAT wires have been swapped = how to cure this for PI.

Though not a solution, I hope above helps a bit.
Regards, Hans
hansehv

168 posts 17 threads Joined: Dec 2020
17-08-21, 11:59 -
#3
Hi Cris,
To check whether you missed something, I suggest you upload/attach your configuration.txt in a next reply. Another option is to add a print statement in the display logic to double check the correct routine is being used.
Hans
cris bar

14 posts 4 threads Joined: Aug 2021
17-08-21, 13:21 -
#4
(17-08-21, 11:59)hansehv Wrote: Hi Cris,
To check whether you missed something, I suggest you upload/attach your configuration.txt in a next reply. Another option is to add a print statement in the display logic to double check the correct routine is being used.
Hans


Hello! Thnak you so much por your answers!!! 

Late last night I managed to make everything work!!! Turns out it was the backlight option, I remember I changed that option, when for some reason adjusting the contrast potentiometer in the i2c packback didn't make a difference. Then, just in case I played with the potentiometer again having restored the original configuration file and voilá! I got the the first row of the screen with white blocks, and then it was a matter of just fine tuning the contrast in the HW.

So, everything is OK now, I'm the happiest man on earth!

YEY!  Big Grin Big Grin  Cool Cool

(I have another question regarding controller's pitch bend wheel, but I'll wait for this topic to be closed, so things don't get mixed up)

THANK YOU SO MUCH, HANS! NICE WORK! 
Cheers

Cris
hansehv

168 posts 17 threads Joined: Dec 2020
17-08-21, 23:12 -
#5
(17-08-21, 13:21)cris bar Wrote: So, everything is OK now, I'm the happiest man on earth!
(I have another question regarding controller's pitch bend wheel, but I'll wait for this topic to be closed, so things don't get mixed up)

Hi Cris,
Good to hear, thanks for this nice feedback.
You can always open a next topic/thread if you have others still open, but I'll close this one anyway.
Regards Hans