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.
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.
| LCD Display Format | 2 lines of 16 characters |
|---|---|
| LCD Character Format | 5 x 8 dots |
| LCD Current Consumption | 2mA |
| Data Bus Width | 4-bit |
| Microcontroller Pins Used | 7 I/Os |
| Custom Characters Limit | 8 characters |
The application requires the STM8SVLDISCOVERY board, an HD44780 or equivalent 2-line LCD display, and a 10 kΩ to 20 kΩ potentiometer.
Contrast is adjusted using a potentiometer connected to the VEE/VO pin of the LCD display module.
Yes, the LCD display driver is generic and can be reused with any STM8 device by modifying the port declarations.