Skip to content

Latest commit

 

History

History
43 lines (40 loc) · 1.87 KB

dev_hd44780.md

File metadata and controls

43 lines (40 loc) · 1.87 KB

🏠 Main Page

dev_hd44780 - HD44780 LCD Driver with PCF8574

💾File: dev_hd44780.h
📦Library: dev_hd44780


Description:

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.

2004 and 1602 LCD Display

image


Functions:


💠Function: dev_hd44780_init - Init hd44780

void dev_hd44780_init(i2c_inst_t* i2c, uint8_t addr)
  • ▶️Param: i2c I2c channel i2c0 or i2c1
  • ▶️Param: addr I2c address (0x27..)

💠Function: dev_hd44780_text Write text to hd44780 lcd

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

💠Function: dev_hd44780_bargraph Display bargraph on hd44780 lcd

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