#no-std #lcd #embedded-hal-driver #embedded-hal #hd44780

no-std hd44780-driver

A crate to use HD44780 compliant displays with embedded-hal

3 unstable releases

0.3.0 Feb 21, 2019
0.2.1 Oct 17, 2018
0.2.0 Aug 8, 2018

#58 in Embedded development

28 downloads per month
Used in 1 crate

MIT license

633 lines


crates.io crates.io crates.io travis-ci.org

Implementation of the embedded-hal traits for the HD44780.


Crates.io - https://docs.rs/hd44780-driver


Currently there are basic examples for Raspberry Pi as well as the Adafruit Metro Express M0 as those are the devices I currently have on hand.

Any platform that implements the embedded-hal traits is supported by this library! See awesome-embedded-rust for a list of supported platforms.

Getting Started

This library aims to keep it simple in that to get started all you will have to do is supply the HD44780::new function a bunch of pins from your platform that implement the OutputPin trait for embedded-hal as well as a struct that implements the delay traits DelayUs<u16> and DelayMs<u8>.

// Code grabbed from the metro_m0 example
let mut lcd = HD44780::new_4bit(
    pins.d4.into_open_drain_output(&mut pins.port), // Register Select pin
    pins.d3.into_open_drain_output(&mut pins.port), // Enable pin

    pins.d9.into_open_drain_output(&mut pins.port),  // d4
    pins.d10.into_open_drain_output(&mut pins.port), // d5
    pins.d11.into_open_drain_output(&mut pins.port), // d6
    pins.d12.into_open_drain_output(&mut pins.port), // d7


// Unshift display and set cursor to 0

// Clear existing characters

// Display the following string
lcd.write_str("Hello, world!");

// Move the cursor to the second line

// Display the following string on the second line
lcd.write_str("I'm on line 2!");


  • 4-bit & 8-bit modes are supported


  • Busy flag support (Waiting for support from embedded-hal to read and write from a pin)
  • Non-blocking API
  • A more user-friendly API with additional features
  • Custom characters


  • Additional issues as well as pull-requests are welcome.

  • If you have a platform not yet covered in this repository that is supported by embedded-hal, a pull-request of an example would be awesome!


This project is licensed under MIT license (LICENSE or https://opensource.org/licenses/MIT)