Implementation of small and medium size LCD display based on ST7920 controller

Publisher:dswecdLatest update time:2014-03-09 Source: 21ICKeywords:ST7920 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

LCD liquid crystal display devices are widely used in the human-computer interaction interface of instruments and meters due to their low voltage, low power consumption, large display information, and long service life. At present, with the rapid development of integrated circuit manufacturing technology and electronic technology, LCD devices have become one of the most important information processing means in the information industry. At the same time, more and more portable digital devices used in many fields are using single-chip microcomputers as control cores and LCDs as display terminals. 12864 dot matrix liquid crystal is a typical representative of small and medium-sized liquid crystals and is widely used. This article takes 12864 with ST7920 as the controller as an example to introduce its practical application method.

2. Introduction to 12864 with ST7920 as controller

2.1 LCD display control instructions

In order for the LCD to display information, the coded data to be displayed needs to be written into the LCD display cache. The writing of data can only be completed through a series of LCD display control instructions.

The ST7920 control signals RS and R/W control the display control instructions. DB0-DB7 is the data bus, which realizes the data exchange between the external CPU and the internal processor of the LCD. The interactive data includes control instructions and data to be displayed. The main instruction table of the 12864 Chinese character library dot matrix LCD display control based on the ST7920 controller is shown in Table 1.

 

 

2.2 LCD display control timing

Like other controllable devices, a certain control timing is required to make the liquid crystal unit work properly. The so-called timing is the order of the control signal to take the high and low levels. To develop the liquid crystal drive, the main controller must communicate with the ST7920 controller according to the corresponding timing. Figure 1 is the 8-bit parallel port write operation timing diagram of the 12864 liquid crystal controlled by ST7920. As can be seen from Figure 1, when the write operation is controlled through the 8-bit parallel port DB0-DB7, three control signals RS, R/W, and E are required to cooperate. First, RS must be set to 0 or 1 according to whether the data written to the parallel port is a control instruction or display data. Secondly, the R/W read and write control signal needs to be set to 0 for the write operation, and then the control enable signal E must be set to 1. Only after the above three control signals are stable, the 8-bit parallel port can write the data on the DB0-DB7 bus to the LCD screen. After writing, the enable signal E is set to 0. In use, special attention should be paid to the unstable stage during the high and low level conversion of each control signal, and the read and write operations should try to avoid this stage. The 8-bit parallel port read operation timing diagram of the 12864 LCD controlled by ST7920 is similar to the write operation, except that the read and write control signals are different.

 

 

3. LCD display hardware interface circuit

The following uses the STC89C52 single-chip microcomputer to control the LCD screen as an example to introduce the connection method between the MCU and the LCD. Figure 2 is an 8-bit parallel port STC89C52 control interface diagram. The P1 port of the MCU is connected to the DB0-DB7 of the LCD as the bus channel for instructions and display data; P3.0, P3.1, and P3.2 are respectively connected to the RS, R/W, and E of the LCD to form the channel for the LCD display control signal.

 

 

4. LCD display software design

According to the hardware connection diagram in Figure 2, the program code is designed by taking the display of characters such as "ST7920 display control" on the LCD screen as an example.

 


 

 

 

 

 

5. Conclusion

Small and medium-sized LCDs are increasingly used as human-machine interfaces for electronic devices due to their own advantages. This article introduces the software and hardware implementation methods of 12864 small and medium-sized LCDs with ST7920 as the controller, as well as the development and use steps of LCD applications. This method has a certain degree of general applicability and provides a certain reference for the design of other forms of LCDs.

Keywords:ST7920 Reference address:Implementation of small and medium size LCD display based on ST7920 controller

Previous article:Design of dual-loop current-mode PWM controller based on 24V power supply
Next article:Analysis of strategies for improving DC/DC efficiency using digital controllers

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号