#lcd #driver #async #embedded-hal-async #embedded-hal

no-std lcd_parallel_bus

A driver for various liquid crystal displays driven by HD44780 or equivalent, including double controller like 40x4 displays

1 unstable release

0.1.0 Feb 1, 2025

#1423 in Embedded development

Download history 108/week @ 2025-01-29 15/week @ 2025-02-05

123 downloads per month

MIT/Apache

265KB
2.5K SLoC

lcd_parallel_bus

This is a driver for HD44780 or compatible chip based LCDs via a parallel bus.

Overview

This driver supports both the four bit and eight bit parallel data bus. Some displays like a four line times forty character display commonly named LCD4004, which is driven by two chips and has an additional EN2 line, is supported too. The bus structs, which support two chip devices, can be additionally be used to drive two separate one chip displays via one bus.

All functionalities of the HD44780 are supported, including busy waiting, reading busy flag and address counter, reading from and writing to the display data RAM (DDRAM) and character generator RAM (CGRAM).

This driver can be used as async or as blocking. The Lcd and the bus structs are available in a blocking variant in the blocking module.

Features

  • async or blocking
  • Four and eight bit bus
  • Support for dual chip devices like the LCD4004 or two LCD in parallel.
  • Busy waiting
  • Reading from display:
    • busy flag
    • address counter
    • DDRAM
    • CGRAM
  • Optional support for defmt
  • Little Ferris example

Examples

There are multiple examples in the example section of this repository based on a STM32F1. These LCDs work with some limitation in display quality at 3.3V, but are designed for 5V. The pin selection in the example is made to use 5V tolerant pins.

Use this driver if:

  • You need one of the above features.
  • If you like the

Don't use this driver if:

  • Your device is controlled via I2C.

Alternatives

There exist several alternative crates for these devices. Many of them are either async or blocking. The ammount of features supported varies strongly.

License

MIT or Apache-2.0

Dependencies