Application design of MGLS12864 LCD display module based on SPCE061A single chip microcomputer

Publisher:正在搬砖的河马71Latest update time:2012-09-21 Source: 现代电子技术 Keywords:SPCE061A  MGLS12864  HD61202 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
In many single-chip microcomputer application systems, liquid crystal displays (LCDs) are widely used in terminal display human-machine interfaces. Dot-matrix LCDs can display not only characters and numbers, but also graphics, curves and Chinese characters, and can achieve a variety of animation display effects, making the human-machine interface more friendly and the operation more flexible and convenient. MGLS12864 is a common graphic LCD display module with a built-in HD61202 controller on the market. It has the advantages of low power consumption, small size, light weight, simple structure and easy use. SPCE061A is a 16-bit microprocessor launched by Lingyang Technology after SPCE500A. The CPU core uses a 16-bit μ'nSP microprocessor chip, which is more integrated, cost-effective and more flexible and convenient to use than the MCS-51 series single-chip microcomputer.
This article describes the structural characteristics of the dot-matrix LCD MGLS12864 and the instruction system of its controller HD61202, and specifically designs and debugs the hardware interface circuit and software program between MGLS12864 and the single-chip microcomputer SPCE061A. After actual operation, the LCD display module works reliably and meets the design requirements.

1 Working principle of MGLS12864
The MGLS12864 display module has two HD61202 as column drivers and one HD61203 as row driver, which can display 64 KB dot matrix graphics. The number of dot matrix is ​​64 rows × 128 columns, and each screen can display 4 rows × 8 Chinese characters (16 × 16 dot matrix per Chinese character). It has 64 KB of internal memory, and the display screen is divided into 8 pages.
1.1 Pin characteristics
The pin characteristics of MGLS12864 are shown in Table 1.

a.JPG


From the pin characteristics in Table 1, we can see that the MGLS12864 module has 18 pins. Pins 1 and 2 are two chip select signals. The combination function definition is: CS1, CS2 are forbidden to use when they are 00, select the left area when they are 01, select the right area when they are 10, and not select when they are 11; Pin 3 is the power ground Vss; Pin 4 is the power supply voltage Vdd; Pin 5 is the LCD display drive power supply V0; Pin 6 is the data instruction selection terminal RS; Pin 7 is the read/write selection signal R/W; Pin 8 is the enable signal E; Pins 9 to 16 are the data bus DB0 to DB7, which can be easily connected to the microcontroller; Pins 17 and 18 provide power for the backlight. [page]

1.2 HD61202 Instruction System
MGLS12864 controller HD61202 has a built-in 4096-bit (64×64) display RAM. Each bit of data in the RAM corresponds to the light or dark state of a point on the LCD screen. HD61202 controls the display screen through a series of operation instructions. The HD61202 instruction system is shown in Table 2.

b.JPG


(1) Display switch setting: When D=1, LCD displays the contents in RAM, and when D=0, the display is turned off;
(2) Display start row setting: L0~L5 takes values ​​in the range of 0~3FH (0~63 rows);
(3) Page address setting: P0~P2: Set the page number (0~7), showing that the RAM has 64 rows in total and is divided into 8 pages, with 8 rows per page;
(4) Column address setting: C0~C5: Set the display column address 0~3FH (0~63 rows);
(5) Controller status: When BUSY=1, the internal is working, and when BUSY=0, it is in normal status; when ON/OFF=1, the display is turned off, and when ON/OFF=0, the display is turned on; when REST=1, it is in reset status, and
when REST=0, it is in normal status. In BUSY and REST status, except for the read status instruction, other instructions will not have any effect on HD61202. Before operating HD61202, check the BUSY status to determine whether HD61202 can be operated;
(6) After each read/write operation of the read/write data instruction, the column address will automatically increase by 1. Before the read operation, there must be an empty read operation, followed by a data read operation to read the data in the unit to be read.

2 Hardware interface circuit design of MGLS12864 and SPCE061A
SPCE061A has built-in 2 KB SRAM, 32 KB FLASH, 32 b programmable input and output ports, 7 10 b ADCs and 1 sound analog-to-digital converter, 2 10 b DACs, 2 16 b programmable timers/counters, programmable audio processing, etc. The operating voltage of SPCE061A is 2.6~3.6 V (CPU), 2.6~5.5 V (I/O), and the CPU clock is 0.32~49.152 MHz.

c.JPG

[page]

The hardware interface circuit of MGLS12864 and SPCE061A microcontroller is shown in Figure 1. IOA0~IOA7 of SPCE061A is connected to DB0~DB7 of MGLS12864 as data input and output, and IOB0~IOB4 is connected to CS1, CS2, E, RS, R/W of MGLS12864 as the control end of the microcontroller to the liquid crystal module.

3 Display program design
This system program includes the main program and subprogram modules, among which the subprograms include initialization, full screen clearing subprogram, Chinese character display subprogram, and list of individual characters subprogram. The main program completes the control of the liquid crystal module by calling the subprogram. The flow chart of the liquid crystal display program is shown in Figure 2. First, it is determined whether the display controller HD61202 is in the "busy" state. If it is not busy, the display off command is sent to turn off all displays. Then it is still determined to be in the "busy" state. If it is not busy, the display on command is sent to prepare for the display, and then the full screen clearing subprogram and Chinese character display subprogram are called. Finally, the list of individual characters subprogram is called according to the content needs.

d.JPG



4 Conclusion
This article introduces the application of the LCD display MGLS12864 with built-in HD61202 on the Lingyang SPCE061A. In terms of hardware, the rich I/O resources on the SPCE061A are used to drive the LCD module, simplifying the interface circuit design. In terms of software, the Lingyang μ'nsP IDE development environment uses C language to compile and debug the LCD program, which is convenient and reliable. From the debugging effect, the use of MGLS-128G4 improves the visualization of the system and meets the design requirements. SPCE061A not only has the functions of a general controller, but also has its unique voice processing function, which can develop many intelligent products.

Keywords:SPCE061A  MGLS12864  HD61202 Reference address:Application design of MGLS12864 LCD display module based on SPCE061A single chip microcomputer

Previous article:Introduction to the single chip temperature recording system solution
Next article:LCD1602 control bus mode based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 22:49

Design and implementation of intelligent parking lot vehicle detection system
1. Introduction In modern large parking lots, the intelligent parking management system makes vehicle entry and exit procedures simple and safe, and realizes the functions of automatic detection, billing, statistics, and display of vehicles, which greatly saves human resources and improves work effi
[Automotive Electronics]
Design and implementation of intelligent parking lot vehicle detection system
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号