Giter Site home page Giter Site logo

hd44780-stm32hal's Introduction

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);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.