Chinese LCD Display Technology Based on ARM7 Microprocessor

Publisher:sky0001Latest update time:2010-01-13 Source: 现代电子技术Keywords:ARM  ST7920 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Liquid crystal display (LCD) is a low-power, small-size, radiation-free display device that has been widely used in various embedded electronic products in recent years. LCD can be divided into three types: segment type, character type and dot matrix type. Among them, segment type LCD and character type LCD can only be used for simple display of characters and numbers, and cannot meet the requirements of graphic curve and Chinese character display. Dot matrix LCD can not only display characters and numbers, but also various graphics, curves and Chinese characters, and can realize screen scrolling animation functions, partition window opening, inversion, flashing and other functions. It has a wide range of uses. In order to simplify the design and application of LCD display circuits, manufacturers usually assemble LCD display units, display controllers, display memory and display driver circuits together to make LCD modules (LCM) [1]. LCM provides standard data and control interface and control instructions. Taking ATM12864C as an example, this paper introduces the interface design and programming method of LCD display module with control driver ST7920 and Philips' ARM7 microcontroller LPC2214. On this basis, it introduces in detail the design method of displaying continuously scrollable Chinese menu and menu item highlight selection display on the LCD screen, and discusses how to solve the garbled problem that occurs during the display of Chinese characters.

2 Hardware Implementation

ATM12864C is a Chinese LCD module produced by Guangdong Jinpeng Electronics Co., Ltd. This LCD module uses the control driver ST7920 of the Chinese character dot matrix. It contains 8192 16×16 dot matrix national standard simplified Chinese characters and 126 16×8 dot matrix English symbol fonts. Users can enter the national standard code or ASCII code to realize text display. The full screen displays 8 Chinese characters × 4 lines. In addition, it also provides a 64 × 256-dot drawing RAM (GDRAM), which can be mixed with text display, and contains a font generation RAM (CGRAM) to provide programmable character creation function. The external interface signals provided by ATM12864C are: 8-bit data bus D0-D8; register selection signal R/S, when R/S is high, it controls the data register, when R/S is low, it controls the instruction register, read and write signal R/W, when R/W is at this level, it reads, and when it is low, it writes, enable signal E, the falling edge is valid, the write operation timing of ATM12864C is shown in Figure 1 (b). The read operation timing is the same as the write operation timing except that the R/W signal is high [2].



LPC2214 is a microcontroller launched by Philips based on a 32-bit ARM7TDMI-S CPU that supports real-time simulation and tracing. The frequency is up to 60MHz, with 256KB embedded high-speed on-chip Flash memory and four 32-bit width external memory interfaces. It is a low-power, high-performance, small-package microcontroller. The external memory access timing of LPC2214 is shown in Figure 1 (a) [1].

In order to save the ordinary I/O port resources of the microcontroller and simplify program writing, LPC2214 can directly use the external memory access form to control the LCD display module through the data bus and control signal. This method is more important for some complex systems with limited I/O port resources. Since the data access timing of STA7920 is very different from the memory access timing of LTC2214, as shown in Figure 1. The key to the interface circuit design of LPC2214 and LCD display module is how to make the memory access timing of LPC2214 and the access timing of ST7920 match correctly through reasonable design.

The interface circuit between LPC2214 and the liquid crystal display module is shown in Figure 2. LPC2214 controls the R/S signal of LCM through the low-order address A1 to select the currently controlled register. The data flow method on the data bus is controlled by appropriately delaying the LPC2214 write signal WE as the R/W signal of LCM. The enable signal E of LCM is synthesized by the read signal OE, write signal WE of LPC22414 and the chip select signal CS1 of the memory controller. In the circuit that generates the read/write signal R/W signal, the selection of resistor R and capacitor C is the key. According to the electrical characteristics of LPC2214 and ST7920 (see references [1, 2] for details) and the debugging results, the ideal values ​​are: R takes 1KΩ and C takes 12PF. In order to achieve low power consumption, the backlight of LCM is controlled through a common I/O port. When there is an external key response, the backlight is on, otherwise the backlight is off.


Since the chip select signal of LCM is controlled by CS1, that is, using the Bank1 address space of the LPC2214 external memory interface, and the R/S signal is controlled by A1, the operation of LCM is as follows:

Command input address: 0x81000000

Data operation address: 0x81000002

3 Software Design

In the design process of LCD display program with Chinese character library, the scrolling display of Chinese menu and the highlighting selection of menu items are the key. The LCD display module selected in this paper can display 4 lines, and each line can display 8 Chinese characters. When the menu items to be displayed are greater than 4, scrolling display is required. This paper designs a human-computer interaction friendly menu operation program. The basic idea of ​​the program is: open a display buffer in the memory that can display a 4×16 two-dimensional character array, store the list of menu items to be displayed in another two-dimensional array, and conveniently and flexibly display the specified menu items in the menu list by changing the parameters of the display function LCM_Show(). Assume that the 5-item menu in Figure 3 (a) is to be displayed, the default display focus is on the first line, that is, the menu items in the first line are highlighted. When the "down" key is pressed, the display focus moves down one line. When the focus moves down to the last line of the LCD screen, as shown in Figure 3 (b), press the "Down" key again and the screen will scroll up, as shown in Figure 3 (c). When you continue to press the "Down" key, the screen will continue to scroll up and cycle through the 5 menu items in the menu list, as shown in Figure 3 (d). Press the "Up" key and the operation will be the same.


This article uses the display function LCM_Show() and the reverse display function LCM_ShowInvert() to implement the menu continuous scrolling display function and the focus reverse display function as described above. The specific code is as follows:






In the process of displaying Chinese characters, the displayed content is often a mixture of Chinese characters and ASCII codes. Since Chinese characters are composed of 2 bytes and ASCII codes are one byte, if the number of ASCII numbers in the displayed content is odd, garbled Chinese characters will appear after the ASCII codes.

In response to this phenomenon, this paper proposes a method to format the display content before displaying. The basic idea is to add a space after consecutive odd-numbered ASCII characters to keep the consecutive ASCII characters in the display content in even numbers. This method effectively solves the garbled problem when displaying Chinese characters. The program flow is shown in Figure 4.



4 Conclusion

Based on the research on the access timing of ARM7 microcontroller LPC2214 and LCD display module with control driver ST7920, this paper designs the interface circuit between them. This interface circuit does not need to add ordinary I/O, and directly uses the external memory access form of LPC2214 to simply and conveniently control the LCD display module, which not only saves ordinary I/O ports, but also makes program writing more convenient. At the same time, it also gives the program of Chinese menu scrolling display and menu item highlight selection, and discusses the garbled code phenomenon that occurs during the display process, and gives solutions and program flow. This paper proposes an effective solution for the design of a display system with Chinese character display function for embedded systems based on ARM microcontrollers.

Keywords:ARM  ST7920 Reference address:Chinese LCD Display Technology Based on ARM7 Microprocessor

Previous article:Development of Micro-arc Oxidation Power Supply Control System Based on LPC2119
Next article:Interrupt handling during the transplantation of uCOS II on ARM processor

Recommended ReadingLatest update time:2024-11-16 21:01

Design of vehicle-mounted HMI terminal based on ARM and Qt/E
Improving the performance of HMI (Human Machine Interface ) terminals can reduce the complexity of vehicle control system operation and improve the driver's control over his vehicle. The vehicle-mounted HMI can reduce the number of parts and improve the cost-effectiveness through a single-stru
[Power Management]
Design of vehicle-mounted HMI terminal based on ARM and Qt/E
Analysis of the design scheme implemented on the embedded platform based on the ARM7 series chip
    The purpose of the system power-off protection design is to adopt a mechanism to ensure the certainty of the system operation status and the integrity of the recorded data when the system loses power unexpectedly; when the system power is restored, the field data can be restored in time to avoid confusion in the a
[Microcontroller]
Analysis of the design scheme implemented on the embedded platform based on the ARM7 series chip
ARM9 S3C2440—GPIO initialization settings
The GPIO configuration for external input and output mainly consists of the following steps:   1.Configuration of GPxCON.         The function of each IO pin is multiplexed, and GPxCON determines whether the pin is output (01), input (00), or other functions (external interrupt, serial port, etc.), represented by
[Microcontroller]
Google Pixel Watch details revealed: Developing Arm M33 coprocessor with NXP
IT Home reported on May 25 that Google announced a new smartwatch, the Pixel Watch, at its I/O conference. Its round and delicate appearance attracted many people's love. Unfortunately, Google did not disclose the specific specifications of the Pixel Watch. It is expected that Google will hold a new product launch con
[Mobile phone portable]
Google Pixel Watch details revealed: Developing Arm M33 coprocessor with NXP
ARM processor architecture------implementation of nested interrupts
In traditional ARM, IRQ appears as a system exception. For the ARM core, there is only one system exception called IRQ. ARM generally finds the IRQ interrupt handler through the exception vector when processing IRQ. After entering the IRQ interrupt handler, ARM automatically masks IRQ, which means that subsequent inte
[Microcontroller]
What does the Arm Ethos-U65 microNPU mean for the edge computing market?
Author: Ben Eckermann, Technical Director, System Architect and Chief Engineer, Edge Processing, NXP On October 19, 2020, Arm announced the Ethos-U65 micro NPU. NPU is a neural processing unit, and microNPU, as the name suggests, is a very small NPU, usually targeting area-constrained embedded and IoT devices. Bac
[Embedded]
What does the Arm Ethos-U65 microNPU mean for the edge computing market?
Circuit design of speaker-independent speech recognition system based on ARM
  The ultimate goal of research on non-specific person speech recognition technology is to enable computers and other devices to "understand" human speech and extract specific information contained in speech, making it the most convenient means of human-computer communication and interaction. Since the speech signal i
[Microcontroller]
Circuit design of speaker-independent speech recognition system based on ARM
New architecture highlights excellent computing performance ARM targets automotive/industrial control market
ARM International (ARM) has shown its ambition to enter the automotive and industrial control markets. On the 23rd, ARM officially released the ARMv8-R architecture designed for embedded system processors, and emphasized its real-time computing performance, mainly targeting automotive and industrial control applicatio
[Analog Electronics]
New architecture highlights excellent computing performance ARM targets automotive/industrial control market
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号