stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

lcdproc and PI4

Wed Jul 24, 2019 4:47 am

I have a HD44780 display wired to my PI 4 GPIO pins. I can get it to work fine using the Python rplcd-tests so I know it's wired correctly. I have compiled the master branch of lcdproc and I can see the driver loaded with no errors when I run LCDd with my LCDd.conf file. But the display does not show the expected startup message so I am guessing there is something wrong in the driver.

This is the output from LCDd:

Server running in foreground
Listening for queries on 127.0.0.1:13666
hd44780: deprecated boolean 'no' for 'Backlight' option found, consider updating configuration !!
HD44780: using ConnectionType: raspberrypi
HD44780: selecting Model: default
HD44780: backlight: none
hd44780: Using hd44780_default charmap
check_board_rev: Raspberry Pi 2 or higher detected
hd_init_rpi: Pin EN mapped to GPIO17
hd_init_rpi: Pin RS mapped to GPIO22
hd_init_rpi: Pin D4 mapped to GPIO25
hd_init_rpi: Pin D5 mapped to GPIO24
hd_init_rpi: Pin D6 mapped to GPIO23
hd_init_rpi: Pin D7 mapped to GPIO18
Key "Escape" is now reserved exclusively by client [-1]
Key "Enter" is now reserved shared by client [-1]
Key "Up" is now reserved shared by client [-1]
Key "Down" is now reserved shared by client [-1]
screenlist_switch: switched to screen [_server_screen]

The pin map shown is correct for my hookup.
Has anyone had luck getting this kind of LCD to work with lcdproc on the PI 4?

Thanks.

User avatar
Paul Webster
Posts: 807
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

Re: lcdproc and PI4

Wed Jul 24, 2019 11:23 am

I thought lcdproc needed some more work or at least verifying an outstanding Pull request.

See issue I raised about 3 weeks ago and response with link https://github.com/lcdproc/lcdproc/issues/131

stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Re: lcdproc and PI4

Thu Jul 25, 2019 10:36 pm

I have a fix. I posted something about getting GPIO working on the PI 4 in another forum and someone said to change the base address to 0xFE000000 from 0x3F000000 so I tried that (in hd44780-rpi.h) and now it works. I had cloned the lcdproc master branch and that's what I compiled to test it.

User avatar
Paul Webster
Posts: 807
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

Re: lcdproc and PI4

Fri Jul 26, 2019 5:51 pm

That was the basis of the fix that I supplied for RPi2 (although I calculated it at run time rather than compile time) and would have been a similar for RPi4 ... however, when I suggested that to LCDProc maintainer he said that this method was now obsolete and there is a new (unreleased but available) more generic way to do this ... hence the link.

Return to “HATs and other add-ons”