Design and simulation of LED Chinese character display screen based on single chip microcomputer

Publisher:cw57324588Latest update time:2011-08-25 Source: EEWORLDKeywords:led Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This paper studies the design of a 16×16 LED Chinese character scrolling display screen based on the AT89C51 single-chip microcomputer and its simulation implementation using Proteus software. It mainly introduces the hardware circuit of the LED Chinese character display screen, assembly program design and debugging, Proteus software simulation, etc. The design of this display screen has the advantages of small size, less hardware, simple circuit structure and easy implementation. It can help the majority of electronic enthusiasts understand the dot matrix display principle of Chinese characters, understand the basic structure, working principle and application method of single-chip microcomputers, and improve the ability to apply single-chip microcomputer knowledge and technology. Keywords
: single chip; LED; dot matrix; Chinese character display


O Introduction
LED display is a flat display screen composed of light-emitting diode dot matrix modules or pixel units. It has the advantages of high luminous efficiency, long service life, flexible configuration, rich colors and strong adaptability to indoor and outdoor environments. It is widely used for information release and advertising in public places such as buses, shops, stadiums, stations, schools, banks, highways, etc. LED display screens are developing rapidly. This article describes the basic principles, hardware composition and design, program writing and debugging, Proteus software simulation and other basic links and related technologies of 16×16LED Chinese character dot matrix scrolling display based on AT89C51 single-chip microcomputer.


1 Hardware circuit composition and working principle
This product is implemented with the circuit based on AT89C51 single-chip microcomputer as the core chip. It is mainly composed of AT89C51 chip, clock circuit, reset circuit, column scanning drive circuit (74HCl54), and 16×16 LED dot matrix, as shown in Figure 1. Among them, AT89C51 is a low-voltage, high-performance CMOS 8-bit microprocessor with 4kB flash programmable and erasable read-only memory (FPEROM), commonly known as a single-chip microcomputer. The device is manufactured using ATMEL high-density non-volatile memory manufacturing technology, and is compatible with the industrial standard MCS-51 instruction set and output pins. Since the multi-functional 8-bit CPU and flash memory are combined in a single chip, it can perform 1,000 write/erase cycles and the data retention time is 10 years. It is an efficient microcontroller that provides a highly flexible and inexpensive solution for many embedded control systems. Therefore, AT89C51 chips are often used in the design and production of intelligent electronics. The clock circuit is composed of the clock terminals (XTAL and XTAL2) of the 18th and 19th pins of the AT89C51, as well as the 12 MHz crystal X, capacitors C2 and C3, and adopts the on-chip oscillation mode. The reset circuit adopts a simple power-on reset circuit, which is mainly composed of resistors R, R2, capacitor C, and switch K, and is connected to the RST reset input terminal of the AT89C51 respectively. The LED dot matrix display screen adopts a 16×16 dot matrix with a total of 256 pixels. The pin distribution of the dot matrix can be determined by testing the light-emitting diodes with a multimeter.
We connect the row and column bus to the I/0 port of the microcontroller, and then send the scan code analyzed above to the bus, and we can get the displayed Chinese characters. However, if all the row and column ports of the LED dot matrix are directly connected to the 89S51 microcontroller, 32 I/0 ports will be needed, which will cause the exhaustion of I/0 port resources and there will be no room for expansion of the system. Therefore, in actual application, we only connect the 16 rows of the LED matrix directly to the P0 and P2 ports, and the column selection scan signal is selected and controlled by the 4-16 line decoder 74HCl54. In this way, the column selection control only uses the 4 I/O ports of the microcontroller, saving a lot of I/O port resources and providing conditions for the expansion of the use of the microcontroller system. Considering that the P0 port must be set with a pull-up resistor, we use a 4.7 kΩ resistor as the pull-up resistor. The basic process of Chinese character scanning display is as follows: after power is turned on, due to the effect of resistor R and capacitor C1, the RST reset pin level of the single-chip microcomputer is high first and then low, thus achieving reset; afterwards, under the effect of C, C3, X and the internal clock circuit of the single-chip microcomputer, the single-chip microcomputer 89C51 outputs the code level corresponding to the internal Chinese character at the P0 and P2 interfaces according to the set program and sends it to the row selection line of the LED dot matrix (high level drive), and at the same time outputs the column selection scanning signal (low level drive) at the P1.1, P1.2, P1.3, P1.4 interfaces, thereby selecting the corresponding pixel LED to emit light, and using the visual persistence characteristics of the human eye to synthesize the display of the entire Chinese character. Then change the table fetch address to realize the scrolling display of Chinese characters.

2 Dot matrix display principle of Chinese characters and method of obtaining font code
Let's take the UCDOS Chinese Song font library as an example. Each character is displayed by a dot matrix of 16 rows and 16 columns. That is, each character in the national standard Chinese character library is represented by a 256-dot matrix. We can understand each dot as a pixel, and the shape of each character as an image. In fact, this Chinese character screen can not only display Chinese characters, but also any graphics within the range of 256 pixels. For example, if it is controlled by an 8-bit AT89C51 microcontroller, since the bus of the microcontroller is 8 bits, a character needs to be split into 2 parts, as shown in Figure 2

In order to understand the dot matrix composition rules of Chinese characters, we first use the column scanning method to obtain the code of Chinese characters. Chinese characters can be divided into the upper part and the lower part. The upper part is composed of 8×16 dot matrix, and the lower part is also composed of 8×16 dot matrix. In this example, the upper half of the first column in the upper left corner is first displayed by the column scanning method, that is, P00~P07 of the 0th column, the direction is P00 to P07, when the Chinese character "I" is displayed, it is all off, and the lower half of the first column is also all off. The upper half of the second column, P06, is lit, and arranged from top to bottom, as follows: PO. 0 is off, PO. 1 is off, P0. 2 is off, PO. 3 is off, PO. 4 is off, P0. 5 is off, P0. 6 is on, and P0. 7 is off. That is, the binary 00000010 is converted to hexadecimal 02h. After the second column of the upper half is completed, continue to scan the second column of the lower half. For the convenience of wiring, we still design it to scan from top to bottom, that is, scan from P27 to P20. From Figure 3, we can see that P23 in this column is bright, which is 00001000, and the hexadecimal is 08h. According to this method, we turn to the third column, the fourth column, and so on until the sixteenth column is scanned, and a total of 32 8-bits are scanned. It can be concluded that the scanning code of the Chinese character "我" is:
00H, 02H, 08H, 06H, 28H, 02H, 24H, 22H
0FCH, 3FH, 24H, 2 1H, 20H, 10H, 3CH, 08H
0E2H, 07H, 20H, 0AH, 0E4H, 11H, 0A8H, 20H
20H, 30H, 00H, 00H, 00H, 00H, 00H
From this principle, it can be seen that no matter what font or image is displayed, this method can be used to analyze its scanning code and display it on the screen. Although the above method can allow us to figure out the process of obtaining the Chinese character dot matrix code, it is a very cumbersome task to obtain the Chinese character code by manual method. To this end, we often use font software to find character codes. After opening the software, enter the Chinese characters and click "Retrieve". The hexadecimal data Chinese character code can be automatically generated. Just copy the vertical data we need into the program, as shown in Figure 3.

It can be seen that Chinese character dot matrix display generally has three types: dot scanning, row scanning and column scanning. In order to meet the requirements of visual persistence, the scanning frequency of the dot scanning method must be greater than 16×64-1 024 Hz, and the cycle can be less than 1 ms. The scanning frequency of the row scanning and column scanning methods must be greater than 16×8-128 Hz, and the cycle can be less than 7.8 ms. However, when driving one column or one row (8 LEDs) at a time, an external driving circuit is required to increase the current, otherwise the LED brightness will be insufficient.


3 Programming and debugging in Keil environment
The software program mainly consists of start, initialization, main program, and font library. The flowchart of the main program is shown in Figure 4. The following program can be used to realize the scrolling display of "I love you - my motherland". The display of Chinese characters. The program list is as follows:


After completing program writing, debugging and compiling in the Keil software, a Hex file that can run the microcontroller is generated, as shown in Figure 5.

4 Component Selection
The components required for this design are shown in Table 1.

5. Use Proteus software to simulate the LED Chinese character display screen.
Proteus is different from other microcontroller simulation software in that it can not only simulate the working conditions of the microcontroller peripheral circuits or other circuits without the participation of the microcontroller, but also simulate the working conditions of the microcontroller CPU. Therefore, when simulating and debugging the program, the process and results of program operation and circuit operation can be directly viewed from the engineering perspective. In a sense, Proteus simulation is basically close to engineering application. The design of the 16×16 LED Chinese character scrolling display screen based on the AT89C51 microcontroller has been simulated using Proteus software, as shown in Figure 6.

Although this design only uses a 16×16 LED dot matrix and the circuit is simple, it has included the basic circuit principles, basic procedures and Proteus software simulation of the LED Chinese character scrolling display screen. As long as the 10 interfaces of the microcontroller are expanded and some LED dot matrices and related chips are added, a larger area and more colorful LED display screen can be designed. Therefore, this article has certain theoretical and practical reference value for similar designs.

Keywords:led Reference address:Design and simulation of LED Chinese character display screen based on single chip microcomputer

Previous article:Design of large LCD backlighting system
Next article:RGB LED mood lighting - MSP430 creates warm lighting

Recommended ReadingLatest update time:2024-11-16 17:41

LED heat conduction and heat dissipation thermal path glue-free process
It is well known in the industry that LEDs are afraid of heat, because heat will affect the light decay and life of LEDs. Today, we will introduce a new assembly process for LED application products - a glue-free process for LED heat conduction and heat dissipation, and share it with readers!   The current assembly
[Power Management]
LED heat conduction and heat dissipation thermal path glue-free process
Single chip microcomputer stepper motor speed control program (speed LED display)
The microcontroller source program is as follows: //Digital tube high position------low position //Four buttons to control the stepper motor: forward, reverse, plus 1, minus 1 //When the power is on, the motor starts, and the digital tube displays the minimum speed gear 1. The plus and minus gears can be displayed th
[Microcontroller]
Single chip microcomputer stepper motor speed control program (speed LED display)
GaN, a key material for high-power LEDs, begins to encroach on the silicon power MOSFET market
The era of super semiconductor material GaN (gallium nitride) is opening. It is more voltage-resistant than traditional silicon and GaAs (gallium arsenide), and has become one of the key materials for high-power LEDs . It is also favored in the RF field, including Cree , RF MD,
[Power Management]
GaN, a key material for high-power LEDs, begins to encroach on the silicon power MOSFET market
Use assembly to write the beginning of 51 microcontroller to light up the LED
I have always written 51 in C before, so I wanted to experience the feeling of writing 51 in assembly. Therefore, I will start another series. I hope everyone will learn with me. If there are any shortcomings, please give me your advice. First step of the procedure: ORG 0000H; This sentence means to confirm the star
[Microcontroller]
Low-cost low-power LED lighting and lighting driver solutions
One of the fastest growing areas for LED applications is effect lighting, also known as architectural lighting. Effect lighting can use RGB LEDs, which use three chips, each responsible for generating a color of light (red, green, and blue). Another way to generate different colors of light is to use red,
[Power Management]
Low-cost low-power LED lighting and lighting driver solutions
Characteristics of LED luminescent materials
In 1968, HP produced red LED lights (wavelength 660nm), and then yellow-green (wavelength 570nm), blue (wavelength 470nm) and pure green (wavelength 525nm) that can be used for display screens appeared one after another. However, the manufacturing technology of high-brightness blue and pure green semiconductor chi
[Power Management]
Linear LED driver innovation solutions and applications
In many lighting applications, linear LED drivers are the preferred solution because they are relatively simple, easy to design, and enable LEDs to be driven with precise regulated currents regardless of changes in the LED forward voltage drop or input voltage. Since the drivers are linear structures, they must matc
[Power Management]
Linear LED driver innovation solutions and applications
LED full-color display quality judgment standard
The quality of a full-color display screen can be judged from the following aspects: 1. Flatness The surface flatness of the display screen should be within ±1mm to ensure that the displayed image is not distorted. Local protrusions or depressions will cause blind spots i
[Power Management]
Latest Industrial Control 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号