esp-open-rtos/extras/hd44780
2016-11-03 12:01:18 +02:00
..
img HD44780 documentation (#262) 2016-11-03 12:01:18 +02:00
component.mk Driver for HD44780 LCDs (#246) 2016-10-26 16:21:55 +03:00
hd44780.c Driver for HD44780 LCDs (#246) 2016-10-26 16:21:55 +03:00
hd44780.h Driver for HD44780 LCDs (#246) 2016-10-26 16:21:55 +03:00
README.md HD44780 documentation (#262) 2016-11-03 12:01:18 +02:00

HD44780 LCD display driver

Connection type

Driver supports GPIO connections to module and I2C GPIO expanders as well. Define HD44780_I2C = 0 in application makefile for direct GPIO connection.

See examples/i2c_lcd_test and examples/hd44780_test .

Display types

8x1

Memory layout

0801 display

Example

hd44780_t lcd = {
    .addr = ADDR,
    .font = HD44780_FONT_5X8,
    .lines = 1,
    .pins = {
        .rs = 0,
        .e  = 2,
        .d4 = 4,
        .d5 = 5,
        .d6 = 6,
        .d7 = 7,
        .bl = 3
    },
    .backlight = true
};

16x1

Memory layout

1601 display

Example

hd44780_t lcd = {
    .addr = ADDR,
    .font = HD44780_FONT_5X8,
    .lines = 2,
    .pins = {
        .rs = 0,
        .e  = 2,
        .d4 = 4,
        .d5 = 5,
        .d6 = 6,
        .d7 = 7,
        .bl = 3
    },
    .backlight = true
};
hd44780_init(&lcd);
hd44780_gotoxy(&lcd, 0, 0);
hd44780_puts(&lcd, "Hello wo");
hd44780_gotoxy(&lcd, 0, 1);
hd44780_puts(&lcd, "rld!");

16x2, 20x2

Memory layout

1602 display

Example

hd44780_t lcd = {
    .addr = ADDR,
    .font = HD44780_FONT_5X8,
    .lines = 2,
    .pins = {
        .rs = 0,
        .e  = 2,
        .d4 = 4,
        .d5 = 5,
        .d6 = 6,
        .d7 = 7,
        .bl = 3
    },
    .backlight = true
};

16x4, 20x4

Memory layout

1604 display

Example

hd44780_t lcd = {
    .addr = ADDR,
    .font = HD44780_FONT_5X8,
    .lines = 2,
    .pins = {
        .rs = 0,
        .e  = 2,
        .d4 = 4,
        .d5 = 5,
        .d6 = 6,
        .d7 = 7,
        .bl = 3
    },
    .backlight = true
};