Part # Application Notes Access Control Accessories Adapters Audio Broadcast Computer Power Supply Corded Terminals Cordless Terminal D datasheet

Part Manufacturer: ST Microelectronics

ST Microelectronics

Part Description: STM32F10xxx LCD glass driver firmware


Part Details:

AN2656 Application note STM32F10xxx LCD glass driver firmware Introduction This application note describes a technique for driving liquid crystal displays (LCD) with STM32F10xxx microcontrollers (MCU), that is without any specific on-chip LCD driver hardware. This technique offers a solution for applications that require a display at low cost together with the versatile capabilities of standard STM32F10xxx MCUs. This application note also provides a technique to control the LCD contrast through firmware. After an introduction on LCDs, Section 1, Section 2 & Section 3 describe the typical waveforms required to drive an LCD with a multiplexing rate of 1 or 2 (duplex) and 4 (quadruplex). Section 3 presents a solution based on a standard STM32F10xxx MCU directly driving a quadruplex LCD. This solution can be implemented with any STM32F10xxx MCU as it only requires the standard I/O ports and one timer, which are standard features on all STM32F10xxx MCUs. Section 4 describes how to use the STM32F10xxx LCD glass library and gives a brief presentation of the LCD glass demo. Section 5 describes low-power management using the LCD glass, and gives current and load CPU measurements. Finally, Section 7 gives an example of the LCD connections to the STM32 MCU (two types of LCDs: 4 digits (64 segments: ref CT4-098-LV) and 8 digits (128 segments: ref: PD-878). With the STM32F10xxx LCD glass library, the CPU load for controlling the LCD is around 0.05% (at 72 MHz), and the number of external components is kept to the minimum (two external resistors per COM line). The number of I/Os involved is the same as in solutions using an on-chip LCD hardware driver or an external hardware LCD driver. With firmware contrast control, the STM32F10xxx MCU offers a very flexible solution that can be adapted easily to a range of applications. The measured DC value depends on the used resistors (refer to Section 3) and the user configuration: LCD interruption priority configuration (refer to Section 4.2). July 2008 Rev 1 1/34 www.st.com Contents AN2656 Contents 1 LCD principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 LCD drive signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1 Single backplane LCD drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Duplexed LCD drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Quadruplex LCD drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.1 LCD mean voltage calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.2 Contrast calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Example of a quadruplex LCD with STM32F10xxx . . . . . . . . . . . . . . . 14 4 Firmware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1 How to use the LCD library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.1.1 How to select the LCD glass by firmware . . . . . . . . . . . . . . . . . . . . . . . 19 4.1.2 How to select GPIOs to connect the LCD glass to STM32F10xxx . . . . 19 4.1.3 How to select the timer interrupt priority that drives the LCD . . . . . . . . 21 4.1.4 LCD contrast control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 LCD timer interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.1 LCD with high interrupt priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.2 LCD with low-high interrupt priority (using boosting priority) . . . . . . . . . 23 4.2.3 LCD interrupt always with lowest priority . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3 Default demo configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24


Please click the following link to download the datasheet:

Application Notes Access Control Accessories Adapters Audio Broadcast Computer Power Supply Corded Terminals Cordless Terminal D.pdf Datasheet