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.
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
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- Vicor high-performance power modules enable the development of low-altitude avionics and EVTOL
- Bourns Launches Two Thick Film Resistor Series with High Power Dissipation Capabilities in Compact TO-220 and DPAK Package Designs
- Bourns Launches New High-Pulse Brake Resistor Series with Superior Energy Dissipation Capabilities
- Nexperia launches new 120 V/4 A half-bridge gate driver to further improve robustness and efficiency in industrial and automotive applications
- Vishay's New 150 V MOSFETs Offer Industry-Leading Power Loss Performance
- The first generation of SGT MOSFET series from Qiangmao: innovative trench technology, automotive-grade 60 VN channel, breakthrough in high-efficiency performance of automotive electronics
- DC/DC Power Supplies for Automotive Applications
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- An MP3 player set with 63 diamonds
- [Shanghai Hangxin ACM32F070 development board + touch function evaluation board] Development environment construction and initial experience
- [Evaluation of domestic FPGA Gaoyun GW1N series development board]——(1) Development environment
- Talk about differential signal
- DSP code optimization instructions in CCS
- ACPI Power Management Program
- Help, what kind of lights are these? I see them for the first time.
- IR introduces three new 25V DirectFET MOSFETs
- Proteus software simulation color screen TFT320240
- Analysis and improvement of errors in making circuit board laminate structure drawings