ex_lcd v0.3.0 ExLCD.HD44780
ExLCD.HD44780 is the display driver module for Hitachi HD44780 type parallel LCD display controller managed display modules.
Hitachi HD44780 Controller
The HD44780 is the most ubiquitous character matrix display controller but not the only one. It supports a number of standard operations like moving the cursor, displaying characters and scrolling. It is an 8-bit parallel interface which can operate in 4-bit mode by sending 2 4-bit nibbles to make one 8-bit byte.
It supports 208 characters which are compatible with UNICODE single byte latin characters. The controller character ROM includes a number of non- standard character glyphs which this driver maps to their multi-byte UNICODE equivilents automatically. See the character map in this file for details. There are also 8 user definable character bitmaps mapped to characters byte codes 0-7.
Configuration
The start/1 function expects to receive a map of configuration settings for the display and it’s hardware interface. The configuration map is passed by your application to ExLCD.start_link/1 and then on to this driver module. Please see ExLCD for details. The following keys are used by this driver to operate the display:
- Key -> Type(O|R) -> Description
- rs -> integer(R) -> The GPIO pin ID for the RS signal
- en -> integer(R) -> The GPIO pin ID for the EN signal
- d0 -> integer(O) -> The GPIO pin ID for the d0 signal
- d1 -> integer(O) -> The GPIO pin ID for the d1 signal
- d2 -> integer(O) -> The GPIO pin ID for the d2 signal
- d3 -> integer(O) -> The GPIO pin ID for the d3 signal
- d4 -> integer(R) -> The GPIO pin ID for the d4 signal
- d5 -> integer(R) -> The GPIO pin ID for the d5 signal
- d6 -> integer(R) -> The GPIO pin ID for the d6 signal
- d7 -> integer(R) -> The GPIO pin ID for the d7 signal
- rows -> integer(R) -> The number of display rows or lines
- cols -> integer(R) -> The number of display columns
- font_5x10 -> boolean(O) -> Font: true: 5x10, false: 5x8 (default)
O - optional R - required
Example:
config :MyApp, hd44780: %{
rs: 1,
en: 2,
d4: 3,
d5: 4,
d6: 5,
d7: 6,
rows: 2,
cols: 20
}
More Information
For more information about your display and its capabilities here are a few resources to help you get the most of it:
- Hitachi HD44780 Datasheet
- Wikipedia Entry for HD44780
- ExLCD
- Raspberry Pi Example Application with nerves