Design of LED dot matrix display system based on STC89C55RD+ single chip microcomputer

Publisher:代码律动Latest update time:2011-09-26 Keywords:STC89C55RD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

In places such as stations, shopping malls, and schools where changing real-time information or advertising is required, traditional media such as blackboards, paper, or neon billboards can no longer meet current needs in terms of display effects or modifiability. However, LED dot matrix displays have the characteristics of low power consumption, low cost, long life, small space occupation, and real-time display. In addition, the amount of information displayed is large, and users can edit and modify the displayed content at any time. Therefore, it has been widely used in recent years.

2 Overall design

The system adopts the structure of upper computer and lower computer. The upper computer is a PC, which communicates with the lower computer display system through a serial communication interface [1] to realize real-time erasing and updating of the displayed content. The lower computer system mainly includes two parts: the single-chip microcomputer control circuit and the display circuit. The Chinese character display adopts the 16x16 dot matrix mode. Through the control of the single-chip microcomputer, the dynamic display effect of characters scrolling from right to left is realized. The basic block diagram is shown in Figure 1.


3 System Hardware Structure

3.1 MCU selection

MCU is the core component of the whole lower computer system. Its performance and on-chip resources largely determine the flexibility, advancement and stability of the system. Based on this, this system uses the STC89C55RD+ enhanced 51 single-chip microcomputer produced by STC.

The instruction system, hardware structure and on-chip resources of the STC89C55RD+ microcontroller are fully compatible with the standard 8052 microcontroller and are packaged in DIP40. The maximum clock frequency supported is 80M, which can maximize the operating speed of the MCU. The chip contains a large-capacity 20KBFLASH program memory and 1KB data memory, and the internal available Data FLASH is 58 sectors totaling 29KB. It has in-system programmable (ISP) and in-application programmable (IAP) functions, which can realize remote software upgrades without a programmer, thereby greatly reducing development complexity and saving the additional investment in purchasing a programmer.

3.2 Serial Communication

The system host and slave communicate through a serial communication interface. The STC89C55RD+ microcontroller contains a programmable full-duplex serial communication interface, namely RXD (P3.0) and TXD (P3.1), which has all the functions of UART. The interface circuit can send and receive data at the same time. In general, serial communication with the host PC can be achieved through the three wires of RXD, TXD and GND. According to the distance of communication, RS232 or RS485 communication mode can be selected. Since the display control circuit in this system is close to the host PC, the RS-232 standard bus interface is selected. The specific circuit diagram is shown in Figure 2.


3.3 Driving and scanning circuit

The LED dot matrix uses 8x8 modules, and every 4 modules are arranged into a 16x16 dot matrix to display a Chinese character. All LEDs in each row of the dot matrix share a cathode, and all LEDs in each column share an anode.

Because the driving capability of the I/O port of the single-chip microcomputer is limited, the cathode of each row of LEDs is connected to the power supply through a transistor 8550, and the I/O port only needs to provide a few milliamperes of input current to control its on and off. Considering that this system can display six Chinese characters at the same time, the anode of each column of LEDs is connected to the power supply through a current limiting resistor and a transistor 8550. When the Chinese character fonts of the same row of six Chinese characters (i.e. 12 bytes) are sent out in parallel through the latch 74HC377, the shift register 74HC595 outputs a row selection signal to light up the LED of the row, and then sends the next row of data, and then selects the next row to be valid, until all 16 rows are scanned once. At this point, a complete text message appears, and then it is scanned repeatedly in this way. With the help of program control, the information can be dynamically displayed from right to left. The specific circuit diagram is shown in Figure 3.


The main functions implemented by the software of this system include: sending information (or commands) from the upper computer and controlling the content and mode of the dot matrix display of the lower computer.

4.1 Host computer software

The upper computer information (or command) can be sent using ordinary font extraction software and serial port debugging software. When communicating with the lower computer, it is necessary to ensure that both parties have the same data format and baud rate. This design uses RS232 communication with a baud rate of 9600bit/s. At the same time, a communication protocol between the upper and lower computers is formulated, and the information packet format is shown in Figure 4.


4.2 Lower computer software

The display content and mode of LED dot matrix are mainly controlled by the program of single chip microcomputer. The program adopts modular structure, mainly including main program, serial port interrupt service subroutine and scanning display subroutine.

(1) The main program is a sequential structure, which mainly completes the system initialization of the I/O port and some variables, the timer initial value, the serial communication working mode, and the baud rate setting [2], and then cyclically calls the scanning display subroutine to display the Chinese character information already existing in the original Data FLASH area.

(2) The serial port interrupt service subroutine is started by receiving interrupts [3]. It is mainly responsible for receiving information sent from the host PC, including the content to be displayed and command bytes, and completing corresponding information writing, erasing and other operations according to the commands. Finally, it opens an interrupt to return to the main program. Its flow chart is shown in Figure 5.


The operations of writing and erasing information are mainly completed by the IAP function of the microcontroller. IAP, which means in-application programmable, means that the program memory can be erased and written by the program itself when the program is running. Through the relevant instructions of the IAP function, the data to be displayed can be written to the specified sector of the program memory, and the data in the corresponding sector can be erased as needed. In this way, the data will not be lost when the power is off, just like the burned-in program. Of course, the area where the data is written is separated from the program storage area to prevent the program from being damaged.

(3) The scanning display subroutine is responsible for taking out the font from the display buffer, outputting the row selection signal and column scanning signal, and performing dynamic scanning display.

5 Conclusion

This dot matrix display system does not require external program memory and data memory. It can realize real-time information release and update through the IAP function of the STC89C55RD+ microcontroller. The system has beautiful appearance, stable operation, clear characters and freely set fonts. It has been actually used in our hospital as the main platform for information release. In addition, the system can be slightly improved to achieve the control of multiple display screens by one computer to meet the needs of displaying different information in different places and at different times. If a wireless communication module [4] is added to the system, an LED display system based on wireless data transmission can be developed.

The author's innovation: The system has a simple circuit structure, no external program memory and data memory, and fully utilizes the IAP function of the STC89C55RD+ microcontroller, and uses software to realize the release and update of information at any time.

Keywords:STC89C55RD Reference address:Design of LED dot matrix display system based on STC89C55RD+ single chip microcomputer

Previous article:Design of temperature measurement and control system using VB software and AT89S51 single chip microcomputer
Next article:Serial communication between C51 and atmega64 and PROTEUS simulation design

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

Design of LED dot matrix display system based on STC89C55RD+ single chip microcomputer
1 Introduction In places such as stations, shopping malls, and schools where changing real-time information or advertising is required, traditional media such as blackboards, paper, or neon billboards can no longer meet current needs in terms of display effects or modifiability. However, LED dot matrix displays
[Microcontroller]
Design of LED dot matrix display system based on STC89C55RD+ single chip microcomputer
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号