STMicroelectronics AN4032 Interfacing HD44780 LCD with STM8SVLDISCOVERY

This application note describes how to use the STM8SVLDISCOVERY to drive a standard HD44780 2-line LCD display. The example uses a LCD display driver that is as generic as possible and can be reused with any STM8 device. The example uses the popular 2 x 16 format of LCD display, but other LCD display modules based on compatible ST7066 or KS0066U controllers can also be used.


STMicroelectronics AN4032 Interfacing HD44780 LCD with STM8SVLDISCOVERY - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
19
File format
PDF
File size
219 KB
Published
06 August, 2012
Updated
28 September, 2023
MD5 checksum
0EEE284869C644D69470D2EACF4ACBCC

About this manual

This document details how to interface an HD44780 2-line LCD display with the STM8SVLDISCOVERY evaluation board. It provides hardware connection schematics and explains the required settings for the STM8SVLDISCOVERY board, such as jumper configurations and pin assignments for the 4-bit data bus.

The guide includes a software description of the firmware example, which demonstrates LCD functions like initializing the display, printing text, managing custom characters, and creating a user interface with a bar graph and time counter. It also covers how to configure the STM8S standard peripherals library for this specific application.

What's inside

  • Application description
  • Hardware required
  • STM8SVLDISCOVERY hardware settings
  • HD44780 LCD display module description
  • Hardware interface application schematics
  • Application principle
  • Software description
  • STM8S peripherals used
  • Configuring STM8S/A standard peripherals library
  • Main application flowchart

Specifications

LCD Display Format2 lines of 16 characters
LCD Character Format5 x 8 dots
LCD Current Consumption2mA
Data Bus Width4-bit
Microcontroller Pins Used7 I/Os
Custom Characters Limit8 characters

Frequently asked questions

What hardware is required for this application?

The application requires the STM8SVLDISCOVERY board, an HD44780 or equivalent 2-line LCD display, and a 10 kΩ to 20 kΩ potentiometer.

How is the LCD contrast adjusted?

Contrast is adjusted using a potentiometer connected to the VEE/VO pin of the LCD display module.

Can the firmware be used with other STM8 devices?

Yes, the LCD display driver is generic and can be reused with any STM8 device by modifying the port declarations.

Download PDF (219 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →