Skip to content

4ilo/HD44780-Stm32HAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HD44780 Lcd - stm32 HAL

HD44780 16x2 Lcd library for stm32 using stm32-hal library's.

Library is developed and tested with Stm32F411-discovery and the given example.

Features:

  • 4bit & 8bit mode
  • Multiple lcd support
  • String printing
  • Number printing
  • Set cursor position
  • Clear screen

Using 16xN and 20xN screens

Set macros for different screen sizes in lcd.h. By default, 16xN is enabled.

// #define LCD20xN 		// For 20xN LCDs
#define LCD16xN			// For 16xN LCDs

8bit example

Lcd_PortType ports[] = {
	D0_GPIO_Port, D1_GPIO_Port, D2_GPIO_Port, D3_GPIO_Port,
	D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port
};

Lcd_PinType pins[] = {D0_Pin, D1_Pin, D2_Pin, D3_Pin, D4_Pin, D5_Pin, D6_Pin, D7_Pin};

Lcd_HandleTypeDef lcd;

lcd = Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_8_BIT_MODE);

Lcd_string(&lcd, "4ilo - 8bit");

Lcd_cursor(&lcd, 1,6);
Lcd_int(&lcd, -500);

4bit example

Lcd_PortType ports[] = {
	D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port
};

Lcd_PinType pins[] = {D4_Pin, D5_Pin, D6_Pin, D7_Pin};

Lcd_HandleTypeDef lcd;

lcd = Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_4_BIT_MODE);

Lcd_string(&lcd, "4ilo - 4bit");

Lcd_cursor(&lcd, 1,6);
Lcd_int(&lcd, -500);

About

HD44780 library for Stm32 using hal library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages