Hi,
I’ve searched this forum, and hadn’t found anyone even talking about a 40x4 Alphanumeric LCD, I got nothing from about 10 different search querries, but again I could’ve just searched wrong.
First the hardware. The display is a cheap EastRising unit (link to seller and datasheet), and the MCU used is a Wemos ESP32 S2 Mini board.
The LCD board has two LCD controllers, with shared RS/RW/DATA pins and individual Enable pins. Which means this LCD is basically just two 40x2 LCDs on top of each other.
The Docs
What does the documentation about Character-Based LCD Displays say? Well not much really. Apart from mentioning that LCD screens are usually 8-40 columns and 2-4 rows, which doesn’t directly suggest that 40x4 LCD’s are supported, there’s no information about driving 40x4 LCD’s.
Driving the LCD outside of ESPHome is pretty simple. I used the HD44780 library defined two different LCD instances, with same RS/DATA pins, but with different enable pins. As far as I’m aware this approach should be fine, as long as you don’t need access to both “parts” of the LCD at the same time.
I’ve also found a forum post mentioning that you can modify the library in a way where the library itself will handle two enable pins. This means I could modify the library, create a custom component, and than get this working, but as someone who barely knows C++, I think that this would be an entirely different beast.
Originaly I thought I would try to use the same method I used outside of ESPHome, however the configuration doesn’t allow for multiple uses of pins.
Perhaps somebody has already tackled this problem before, and could give some pointers?