Ajay on Non-MMU Embedded Linux
Making LCD work

Configuring Hitachi HD44780 Character LCD

Oftentimes we need to connect a Non-TFT LCD to a Embedded Linux board and that is completely normal. Why spend a lot of money when you can just use a relatively cheaper part. Also many a times we only need a few bits of information. A Character LCD is perfect for this.

Alt Character LCD

Fig 1 - Character LCD

There are many tutorials online that can make connecting a character LCD to Raspberry PI and they use an userspace driver to make the LCD work. But what if want to:

  1. Use a different/Custom board. RPI is not favorable to mass production.
  2. Use a kernel driver.

In that case, follow along. The STM32F469 discovery board already includes a Arduino connector and a i2C connector.

Alt I2C connections

Fig 2 - I2C connector on STM32F469 Discovery board

I use the I2C based expander so that I can save GPIOs. So lets first connect the GPIO expander to the LCD.

Alt Connect GPIO Expander

Once that is connected, plug it to the board using Female to Female jumper wire.

Enabling GPIO expander drive

The GPIO expander is already a driver available in Linux. Enable it.