I’ve just recently discovered I have access to lots of 16x2 LCD displays.
I see there are many examples of interfacing it to a Linux machine, but most are via user space. I’m looking for kernel space examples. modinfo hd44780 shows a driver is there, but how do I use it.
Is there a device tree for the hd44780 for a parallel interface?
I suspect the true parallel interface has become somewhat deprecated --
most later displays using that protocol have incorporated a sub-board that
does serial<>parallel (I2C or SPI, maybe even plain UART).
One problem is that the parallel mode supports TWO configurations:
8-bit parallel and 4-bit parallel. When you add in the other control
signals, you can easily consume 11 GPIOs (in 8-bit mode; 7 GPIOs in 4-bit).
Hi Mark
Seen RCN’s response below. I have several of the hd44780 LCD displays also, spent the weekend trying to get it to work with the info RCN provided. Seems the R/W line is always high, thus all the data signals are distorted. If I pull the R/W line low, then the data signals are ok, but nothing is written to the display. I know the displays are good, I wrote a uart-to-parallel with an atmel chip several years ago. if you have success with the Linux driver, I would like to know.
I’m in the process of doing a project with the PRUs, only just started, and learning how to do MUX and pad settings etc, using TI’s hands on labs, plus have seen some of your work Mark.
I’ll be later using a 20 x 4 char LCD which is the same interface & protocol.
Is that something you’d like me to post back here if/when I get it all working?
As long as I can get MUX and other settings done to allow the PRU access to the pads/pins, then should all be fine.
Just wanting to follow up on this. The LCD display is working, just had to remove the R/W parameter from the dts and tie the LCD R/W to ground. The driver does not seem to support reading from the display, so no harm in doing it this way.
I do custom builds with yocto, the meta data is from jumpnowtek. kernel version linux-stable_5.7
In addition to the info that RCN provided, I added the pin mux stuff to define all the gpio pins.
looked at the driver for the R/W issue, seems they do not set the R/W bit, they do set the RS bit, so maybe just need to add the same for the R/W bit.