#lcd-display #embedded-hal-driver #lcd #embedded-hal #hd44780

hd44780-ntb

A non-text buffer embedded hal driver for hd44780 like LCD display controllers

3 releases

0.0.6 Oct 7, 2020
0.0.5 Jul 28, 2020
0.0.4 Jul 28, 2020

#847 in Embedded development

33 downloads per month

MIT license

9MB
369 lines

hd44780_ntb

This is an implementation of a hardware driver for a HD44780 type LCD controller write in Rust which uses the linux-embedded-hal library. It exposes a simple trait-based API for the command set which minimizes the coupling between the hardware driver (GPIO, I2C, etc) and the code that passes commands and data to the display.

Table Of Contents

Getting Started

You will need to have a recent version of Rust installed. Any version of Rust that supports version 0.2 or later of the linux-embedded-hal should work but versions from 1.39 to 1.45 of Rust have been used during initial development on both the nightly and release channels. Earlier versions might work as well but have not been tested.

Development can be done on an OS (GPIO, I2C, etc) that Rust supports but the expected target would typically be something like a Raspberry Pi, STM32, or another embeddable system which can run Linux. All initial development has been done with a combination of a laptop running Windows 10 and a 4GB Raspberry Pi 4 running the Raspberry Pi OS (Raspbian).

Using The Crate

To use the crate in your own project all you need to do is include it in [dependencies] of you project like you would any other crate. If you have cargo-edit install then on the command line you can use:

cargo add hd44780-ntb

Which should add something like this in your Cargo.toml:

[dependencies]
hd44780-ntb = "0.0.5"

Examples

Hi from Ferris! on a 1602 LCD display

You will find examples in the examples directory. The Raspberry Pi GPIO examples were used for testing during initial development on a RPi 4.

Here's a short clip from a run of the rpi4bit example:

Your browser does not support any of the available video format of this video.

To build this example start by clone this project somewhere on your Raspberry Pi:

git clone https://github.com/Dragonrun1/hd44780_ntb

Next execute the follow to build the example:

cargo build --example rpi4bit

And finally execute:

sudo ./target/debug/examples/rpi4bit

You should see the series of messages displayed in the terminal and on your LCD if it has been hooked up using the same GPIO pins that the example expects.

Contributing

Contributors are welcome. I would like to see the hardware drives extended beyond just the Raspberry Pi but I currently don't have access to other hardware for development or testing. Make sure you have read the Contributor Covenant Code of Conduct. All contributed code will be considered to also be contributed under a MIT license. Please include your information in a comment on all code files for the copyright etc.

All contributed documentation or non-code text like this README etc. will be consider to be under the same CC-BY-SA license.

Licenses

All code is available under the MIT license. You can find a copy of the license in the LICENSE file.

All documentation like this README is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA).


Creative Commons License

Dependencies