Application of AT89C51 single chip microcomputer in the design of LED display screen control circuit

Publisher:芳华逝水Latest update time:2014-06-03 Source: 互联网Keywords:AT89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

LED display, also known as electronic display, is composed of LED dot matrix, which displays text, pictures, animations, and videos by turning on and off red or green lamp beads. The content can be changed at any time. It is usually composed of display module, control system and power supply system. The display module is composed of a dot matrix composed of LED lights, which is responsible for luminous display; the control system can display text, pictures, videos and other contents on the screen by controlling the on and off of the corresponding area. The constant dance card is mainly used to play animations; the power supply system is responsible for converting the input voltage and current into the voltage and current required by the display.

LED display screens are widely used in information indicator lights, large screen displays, backlights for LCDs, solid-state lighting, etc. This paper designs a display screen consisting of four 16×16 dot matrix LED modules, with a single-chip microcomputer as the controller, which can smoothly move and display any number of text or graphic symbols. This circuit can be cascaded to realize a display screen consisting of any number of 16×16 dot matrix LED modules.

1. Control circuit design

The control circuit is controlled by AT89C51 single-chip microcomputer. The display screen is composed of 4 16×16 dot matrix LED modules. Each 16×16 dot matrix LED module is composed of 4 8×8 dot matrix LED modules. Users can expand and add any number of 16×16 dot matrix LED modules as needed. The structure of 8×8 dot matrix LED module is shown in Figure 1. There are 8 rows and 8 columns. Each light-emitting diode is placed at the intersection of row and column lines, with a total of 64 light-emitting diodes. When a column is at a high level and a row is at a low level, the corresponding light-emitting diode lights up.

 

1.jpg

 

The P3.0 pin of the microcontroller is connected to the serial data input end of the serial-input-parallel-output shift register 74LS164 (U10), 8 74LS164s (U10~U17) are cascaded, and the P3.1 pin is connected to the clock pulse input end of 8 74LSl64s; the 8 74LS164s are respectively connected to 8 latches 74LS373 (U18~U25), and the data output ends of the 8 latches are connected to the row lines of 4 16×16 dot matrix LED modules, and the row lines of each 16×16 dot matrix LED module are independently controlled. P1.O is connected to the clock pulse input of 8 74LS164 (U2~U9), P1.1 is connected to the serial data input of U2, U4, U6, U8, and every two 74LSl64 (U2 and U3, U4 and U5, U6 and U7, U8 and U9) are cascaded; the parallel data output of U2~U9 is connected to the 64 column lines of 4 16×16 dot matrix LED modules. P1.2 is connected to the clear 0 end of all 74LSl64, and P1.3 is connected to the latch control end of the latch. The designed circuit is shown in Figure 2.

 

2.jpg

 

2. Circuit Working Principle

This circuit uses the serial communication port to work in mode 0, and uses P1.O and P1.1 to simulate serial output to achieve smooth movement of LED display characters. Since the LED module is a 16×16 dot matrix, the character dot matrix is ​​also a 16×16 dot matrix, that is, each character consists of 32 bytes, that is, 16 word data, and each word data determines the lighting of each column of LED. The 16×16 dot matrix character data is obtained by the character dot matrix extraction software.

First, the single-chip microcomputer P1.1 serially outputs a binary bit "1", and sends a high level to the first column of the four 16×16 dot matrix LED modules through four groups of 74LSl64. Then, P3.O serially outputs the first column row data of the four 16×16 dot matrix LED modules, that is, the row data of the Y1, Y17, Y33, and Y49 columns, which are latched by 74LS373 and sent to the row line of the LED display screen. At this time, the LED corresponding to the first column of each LED module lights up. The row data of each column is 1 word data, and there are 4 words of data in 4 columns. The address of the first byte of each word data in the character dot matrix data table differs by 32. At this time, each LED module displays the first column of each character. Then P1.1 serially outputs a binary bit "0", which is shifted by 4 groups of 74LS164 and sent to the second column of the four LED modules with a high level. Then P3.O serially outputs the second column row data of the four 16×16 dot matrix LED modules, that is, the row data of the Y2, Y18, Y34, and Y50 columns, which are latched by 74LS373 and sent to the row line of the LED display. At this time, the LED corresponding to the second column of each LED module is lit, that is, the second column of each character is displayed. This cycle is repeated, and the LEDs corresponding to each column of each LED module are lit in turn until the 16th column of each LED module is lit, that is, the columns of each character are displayed in turn. As long as the alternating display time of each column is appropriate, using the visual persistence characteristics of the human eye, it looks like the 16 columns of LEDs are lit at the same time, that is, the entire character looks displayed at the same time. Then scan and display from the 1st column to the 16th column in turn, and repeat this cycle many times to ensure that the displayed characters have sufficient brightness.

In order to achieve the effect of smooth moving display of characters, after the 4 characters implemented above are statically displayed for a certain period of time, when scanning and displaying again, the first column of each LED module starts scanning and displaying from the second column data of each character, that is, the first LED module displays the second column, third column, ..., 16th column of the first character and the first column of the second character, and the second LED module displays the second column, third column, ..., 16th column of the second character and the first column, second column, ... of the third character. When scanning and displaying for the third time, the first column of each LED module starts scanning and displaying from the third column data of each character, that is, the first LED module displays the third column, fourth column, ..., 16th column of the first character and the first column, second column of the second character, and the second LED module displays the third column, fourth column, ..., 16th column of the second character and the first column, second column, ... of the third character. In this way, the smooth moving display of characters is achieved.

3. Programming

According to the above circuit design and working principle, the control program flow chart of this circuit is drawn as shown in Figure 3. Write the control program according to the program flow chart, and generate the target code file after debugging with Wave or Keil software.

3.jpg

 

4. LED display control circuit simulation

Add the target code file to the microcontroller in the LED display control circuit simulation diagram drawn by Proteus software, and run the simulation. The running result is shown in Figure 4.

 

4.jpg

 

V. Conclusion

The LED display control circuit designed in this paper uses the single-chip microcomputer AT89C51 as the controller, and the serial shift output mode realizes the smooth movement display of a line of characters. In practical applications, relevant driving circuits should also be added. This circuit can be expanded to realize the display control of LED display screens composed of any number of 16×16 dot matrix LED modules. Practical applications have shown that the circuit is stable and reliable, and the effect is good.

Keywords:AT89C51 Reference address:Application of AT89C51 single chip microcomputer in the design of LED display screen control circuit

Previous article:Application design of constant current LED drive system
Next article:Effective LED light source color separation technology

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号