dbrgn / RPLCD

A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller, written in Python. GPIO (parallel) and I²C modes supported.
https://rplcd.readthedocs.io/en/latest/
MIT License
261 stars 72 forks source link

BPI LCD 1602 display module #106

Closed PedroCavaleiro closed 3 years ago

PedroCavaleiro commented 5 years ago

I've just acquired the BPI LCD 1602 display module but I can't get it to work correctly

I have an Raspberry PI B rev 2

For that I used the following code

from RPLCD.i2c import CharLCD

lcd = CharLCD(i2c_expander='MCP23017', expander_params={'gpio_bank': 'B'}, address=0x20, port=1, cols=16, rows=2, charmap='A02')
lcd.clear()
lcd.home()
lcd.cursor_mode = 'blink'
lcd.write_string('Hello World')

Is there any hints how to get this module to work?

With this code I get the following result Imagem

dbrgn commented 5 years ago

Hm, I'm not sure. Are you sure the expander_params and the address are correct?

PedroCavaleiro commented 5 years ago

Got partially working, the GPIO BANK was incorrect, now the cursor now moves correctly but when I use write_string I can see that the cursor moves to the correct position but still no text

dbrgn commented 5 years ago

Maybe the data is written to the wrong memory location. But I don't know the details of this display, sorry.

PedroCavaleiro commented 5 years ago

How can I overwrite the memory location, to try a new location?

JBrummans commented 3 years ago

@PedroCavaleiro did you happen to solve this issue? I have a very similar LCD using the MCP23017 but with a red PCB and "Designed for RPI"

I get the same result as you with the blinking cursor.

PedroCavaleiro commented 3 years ago

@PedroCavaleiro did you happen to solve this issue? I have a very similar LCD using the MCP23017 but with a red PCB and "Designed for RPI"

I get the same result as you with the blinking cursor.

Yes, l managed to get the LCD and buttons working, I will send the code as soon as I can

dbrgn commented 3 years ago

@PedroCavaleiro good to hear that you could resolve your issue! I assume it was not a problem with RPLCD?

I'll close this issue for now. Feel free to leave a comment how you solved it, or whether it was a problem related to RPLCD.