💾File: dev_hd44780.h
📦Library: dev_hd44780
The Hitachi HD44780 LCD controller drives alphanumeric LCD displays
with 2x16 (1602) or 4x20 (2004) LCD displays.
This driver supports HD44780 with I2C on PCF8574 port expander.
Use level shifter to interface with Raspberry Pico.
LCD needs 5V for valid operation or use 3.3V LCD displays.
void dev_hd44780_init(i2c_inst_t* i2c, uint8_t addr)
▶️ Param: i2c I2c channel i2c0 or i2c1▶️ Param: addr I2c address (0x27..)
void dev_hd44780_text(i2c_inst_t* i2c, uint8_t addr, uint8_t line, bool is4line, uint8_t* txt)
▶️ Param: i2c I2c channel i2c0 or i2c1▶️ Param: addr I2c address (0x27..)▶️ Param: line Line number 0..3 (4 line lcd), 0..1 (2 line lcd)▶️ Param: is4line True for 4 line lcd type▶️ Param: txt Text in format col;text, without col format, text is written to column 0
void dev_hd44780_bargraph(i2c_inst_t* i2c, uint8_t addr, uint8_t line, bool is4line, uint8_t data)
▶️ Param: i2c I2c channel i2c0 or i2c1▶️ Param: addr I2c address (0x27..)▶️ Param: line Line number 0..3 (4 line lcd), 0..1 (2 line lcd)▶️ Param: is4line True for 4 line lcd type▶️ Param: data In range 0..100