Design of LED dot matrix display control based on single chip microcomputer

Publisher:EternalWhisperLatest update time:2011-08-26 Source: EEWORLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: LED dot matrix display screen has the characteristics of reliable operation, safety, energy saving, low cost and easy use. This paper discusses the various methods used in the design of LED dot matrix display control system based on single chip microcomputer, and produces a dot matrix display screen with single chip microcomputer as control unit. The design adopts the dynamic scanning display method, and selects 74LS154 and 74LS595 chips to form row and column drive circuits respectively. The single chip microcomputer can control the row and column signals of the dot matrix display module unit through the row and column drive circuits, so as to achieve the design requirements of controlling the dot matrix display screen to display Chinese characters and picture information normally.
Keywords: dot matrix LED; single chip microcomputer; display control; chip

Due to the continuous development of single chip microcomputer technology and the emergence of high brightness LED light-emitting tubes, large-screen high brightness LED electronic advertising screens have become possible. Compared with traditional neon light advertisements, LED electronic advertising screens have incomparable advantages in display effect and modifiability. Moreover, the increasing popularity of single chip microcomputers and the continuous innovation of LED technology have made the cost of high brightness and high definition LED dot matrix billboards and traditional neon light billboards closer and closer. In addition, the rapid development of SMT technology and the large-scale use of switching power supplies have made it have obvious advantages over traditional neon advertising in terms of both volume and reliability, laying the foundation for its application in special fields.

1 Design Principle and Design Scheme
1.1 Design Principle
For dot matrix LED display, common cathode or common anode can be used. This system uses common anode, and its hardware circuit is shown in Figure 1. When there is a positive selection signal on the row, the light-emitting diode with four bits of data at the column selection end being 0 will be turned on and lit. In this way, it is only necessary to scan the display code of the graphics or text as the column signal and the corresponding row signal one by one, and the dot matrix can be lit line by line. As long as the scanning speed is greater than 24 Hz, due to the fast scanning time, the human eye's vision has a retention effect, and it can be seen that the display is a complete graphic or text.

a.jpg


This design aims to complete the design of LED dot matrix display control based on single chip microcomputer. The overall plan is to use single chip microcomputer as the control core, and display text on LED dot matrix screen in static, left shift, right shift and other ways through row and column driving circuit. In the design process, the driving circuit uses dynamic scanning display. Dynamic scanning simply means lighting up row by row in turn. In this way, the scanning driving circuit can realize that multiple rows (such as 16 rows) of the same name columns share a set of column drivers. Due to the limitations of dynamic scanning display (parallel transmission), dynamic scanning display (serial transmission) is adopted, and the display mode uses LED dot matrix screen module as the display screen.
1.2 Overall plan
The single chip microcomputer used in this design is AT89C51, the row circuit uses the row scanning method, the column circuit uses the serial input and parallel output data transmission method, and the display screen uses a dot matrix module composed of 16x16 dot matrix LEDs. The chips used are the input and output shift register 74LS595, the 4-line-16-line decoder 74LS154 and the transistor 8550. The overall design block diagram is shown in Figure 2.

b.jpg


2 System Hardware Design
The hardware circuit can be roughly divided into three parts: single-chip microcomputer system and peripheral circuits, column drive circuit and row drive circuit, and LED dot matrix array. The chips used are single-chip microcomputer AT89C51, 4-line-16-line decoder 74LS154, and serial input and parallel output shift register 74LS595 with latch function.
2.1 Single-chip microcomputer system and peripheral circuits The
single-chip microcomputer uses AT89C51. The system uses a crystal oscillator with a frequency of 12 MHz or higher to obtain a higher refresh rate and make the display more stable. The serial port of the single-chip price is connected to the column driver to send display data. The lower 4 bits of the P1 port are connected to the row driver to send the row selection signal, and the P1.5~P1.7 ports are used to send control signals. The P0 and P2 ports are idle, and the system's ROM and RAM can be expanded when necessary.

2.2 Clock Pulse Circuit
The highest clock pulse frequency of AT89C51 has reached 24 MHz. It has an internal oscillation circuit. Just connect two pins of AT89C51 (i.e. pins 19 and 18) to the two pins of a simple quartz oscillator crystal. At the same time, the two pins of the crystal should also be coupled to the ground with a 30 pF capacitor, as shown in Figure 3.

c.jpg


2.3 Reset Circuit
The reset pin (RESET) of AT89C51 is pin 9. When this pin is connected to a high level for more than 2 machine cycles, a reset action can be generated. Taking a 24 MHz clock pulse as an example, each clock pulse is 0.5 μs, and two machine cycles are 1 μs. Therefore, a 2 μs high level pulse is connected to pin 9 to generate a reset action. The simplest is to have only one resistor and one capacitor to form a reliable reset circuit. The resistor is generally 10 kΩ, and the capacitor is generally 10 μF, as shown in Figure 4.

d.jpg

2.4 Design of dot matrix display drive circuit
Since the question does not allow the use of integrated drive circuits, but if the drive circuit is not used, the display screen will be unstable and the brightness will not be high, so discrete transistors are used as drive circuits. The drive circuit is shown in Figure 5.

e.jpg



3 System software design
The main function of the display screen software is to provide display data to the display screen and generate various control signals to make the screen display according to the design requirements.
According to the principle of software hierarchical design, the software system of the display screen can be divided into two layers: the first layer is the bottom display driver, and the second layer is the upper system application. The display driver is responsible for transmitting a specific combination of display data to the dot matrix screen, and is responsible for generating line scanning signals and other control signals to cooperate to complete the scanning and display work of the LED display screen. The display driver is implemented by the display subroutine; the system environment setting (initialization) is completed by the system initialization program; the display effect processing and other work are implemented by the main program by calling the subroutine.
3.1 Display driver
After entering the interrupt, the display driver must first re-initialize the timer T0 to ensure the stability of the display screen refresh rate. The calculation formula for the display screen refresh rate (frame rate) of the 16-line scanning format is as follows:
f.jpg
Where: F is the crystal frequency; T is the initial value of timer T0 (working in 16-bit timer mode).
Secondly, the display driver queries the currently lit line number, reads the display data of the next line from the display buffer, and sends it to the shift register through the serial port.
To eliminate the tailing phenomenon when switching row display data, the driver first turns off the display screen, that is, blanks it, and then outputs the new row number and reopens the display after the display data is input into the output latch. Figure 6 shows the flow chart of the display driver (display screen scanning function).

g.jpg

3.2 System Main Program
After the system main program starts, the system environment is initialized first, including setting the serial port, timer, interrupt, and port. Then, the text or pattern is displayed with the "rolling out" effect, and it stays for a few seconds. Then, the Chinese characters or graphics are scrolled upwards, and after a few seconds, the Chinese characters or graphics are displayed by moving left, right, etc. Finally, the text is hidden with the "rolling in" effect. Figure 7 shows the flow chart of the system main program.

h.jpg



4 Software simulation and hardware implementation
4.1 Software simulation
The core unit of this design is the single-chip microcomputer AT89C51, so the single-chip microcomputer simulation software Proteus 7.0 and Keil are used to perform software simulation on the overall design.
The ISIS module in Proteus is run to layout the designed schematic diagram, and the simulation circuit is shown in Figure 8.

i.jpg


Copy the complete source program to the Keil simulation development environment and run the debugging. Load the compiled source program into the simulation circuit diagram, run the program, and display the results correctly on the dot matrix display screen in the order of "rolling curtain in", "rolling curtain left", "rolling curtain right", and "rolling curtain out" according to the designed display effect.
4.2 Hardware Implementation
After the software simulation is passed, the correctness and feasibility of the scheme are fully proved. Build and debug the hardware circuit according to the design plan. The correct result is shown in Figure 9 below.

j.jpg



5 Conclusion
This paper studies how to control the row and column signals of LED display module units and the driving problems in signal transmission by designing the LED dot matrix display control based on single chip microcomputer. It gives the hardware principle and connection method, the software design process and part of the code, and gives a complete circuit diagram. The result shows that Chinese characters and picture information can be displayed normally and dynamically.

Reference address:Design of LED dot matrix display control based on single chip microcomputer

Previous article:Realization and Design of Fuzzy Control System in Single Chip Microcomputer
Next article:Application of MCS-51 Single Chip Microcomputer and Wireless Modulator

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号