
February 2012 Doc ID 022651 Rev 1 1/19
AN4032
Application note
Interfacing an HD44780 2-line LCD display
with the STM8SVLDISCOVERY
Introduction
This application note describes how to use a firmware example that drives a standard
HD44780 2-line LCD display with the STM8SVLDISCOVERY.
The example uses an LCD display driver that has been developed to be as generic as
possible, so it can be reused with any STM8 device.
The firmware package associated to this application note includes a pre-configured project
template which facilitates development of your own application to use an HD44780 LCD
display module.
The LCD interface offers many ways to easily create a user interface to display text
messages and other application related information, whilst using very few internal hardware
resources.
The HD44780 is a common LCD controller and is very widespread through various formats,
1 X 8, 2 x 16, 2 x 20, 4 x 20 and others. This example uses the very popular 2 x 16 format (2
lines of 16 characters) which is now offered at a very reasonable price. Other LCD display
modules based on compatible ST7066 or KS0066U controllers could also be used.
This application example intentionally uses the least possible microcontroller pins as the
interface bus to the LCD module is 4-bits wide.
This application example requires additional hardware:
■ LCD module HD44780
■ Potentiometer to adjust LCD contrast.
Reference documents
■ STM8SVLDISCOVERY STM8S value line discovery (UM1482).
■ STM8SVLDISCOVERY quick start guide (UM1480)
All these documents are available at http://www.st.com.
www.st.com