Circuit Design Based on AT89C51 Single-chip Microcomputer to Control LED Display

Circuit Design Based on AT89C51 Single-chip Microcomputer to Control LED Display

LED Display screens are widely used in industrial and mining enterprises, schools, shopping malls, shops, public places, etc. for graphic Display, advertising, and information release. This paper designs a display screen composed of 4 16×16 dot matrix LED modules. The single-chip microcomputer is used as the controller to smoothly move and display any number of text or graphic symbols. This circuit can be cascaded and expanded to achieve any number of 16×16 Display screen composed of dot matrix LED modules.

LED display screens are widely used in industrial and mining enterprises, schools, shopping malls, shops, public places, etc. for graphic display, advertising, and information release. This paper designs a display screen composed of 4 16×16 dot matrix LED modules. The single-chip microcomputer is used as the controller to smoothly move and display any number of text or graphic symbols. This circuit can be cascaded and expanded to achieve any number of 16×16 Display screen composed of dot matrix LED modules.

1 Circuit design

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

Circuit Design Based on AT89C51 Single-chip Microcomputer to Control LED Display

The P3.0 pin of the single-chip microcomputer is connected to the serial data input terminal of the 74LS164 (U10) serial input and output shift register, 8 74LS164 (U10~U17) are cascaded, and the P3.1 pin is connected to the clock pulse input terminal of 8 74LSl64 ; 8 74LS164 are respectively connected to 8 latch 74LS373 (U18~U25), the data output terminal of 8 latches is connected to the row line of 4 16×16 dot matrix LED modules, each 16×16 dot matrix LED module The row lines are independently controlled. P1.O connects to 8 74LS164 (U2~U9) clock pulse input terminals, P1.1 connects to U2, U4, U6, U8 serial data input terminals, every two 74LSl64 (U2 and U3, U4 and U5, U6 It is cascaded with U7, U8 and U9; the parallel data output terminals of U2~U9 are connected to 64 column lines of 4 16×16 dot matrix LED modules. P1.2 is connected to the clearing end of all 74LSl64, and P1.3 is connected to the latch control end of the latch.

2 working principle

This circuit uses the serial communication port to work in mode 0, and simultaneously uses P1.O and P1.1 to simulate serial output to realize the smooth movement of characters on the LED display. 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 is composed of 32 bytes, that is, 16 words of data, and each word data determines the LED lighting of each column condition. The 16×16 dot matrix character data is obtained by character dot matrix extraction software.

First, the single-chip P1.1 serially outputs a binary bit “1”, and sends a high level to the first column of 4 16×16 dot matrix LED modules through 4 groups of 74LSl64, and then serially outputs 4 by P3.O The row data of the first column of a 16×16 dot matrix LED module, that is, the row data of columns Y1, Y17, Y33, Y49, are latched by 74LS373 and sent to the row line of the LED display. At this time, the first column of each LED module The corresponding LED lights up. The row data of each column is 1 word data, and there are 4 word 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 byte of each character. 1 column. Then P1.1 serially outputs a binary bit “0”, after 4 sets of 74LS164 shifts, sends a high level to the second column of the 4 LED modules, and then serially outputs 4 16× by P3.O The row data of the second column of the 16-dot LED module, that is, the row data of columns Y2, Y18, Y34, Y50, are latched by 74LS373 and sent to the row line of the LED display. At this time, the second column of each LED module corresponds to the LED Lights up, that is, the second column of each character is displayed. In this cycle, the LEDs corresponding to each column of each LED module are sequentially lit 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 time of alternate display of each column is appropriate, using the visual persistence characteristics of the human eye, it seems that 16 columns of LEDs are lit at the same time, that is, it appears that the entire character is displayed at the same time. Then scan and display from the first column to the 16th column in sequence, and repeat this multiple times to ensure that the displayed characters have sufficient brightness.

In order to achieve the effect of smooth movement and display of characters, after the 4 characters realized above are displayed statically for a certain period of time, when scanning and displaying again, the first column of each LED module starts to scan and display the data from the second column of each character, that is, the first column of each LED module. One LED module displays the second column of the first character, the third column,…, the 16th column, and the first column of the second character. The second LED module displays the second column and the first column of the second character. 3 columns, …, the 16th column, and the 1st column, 2nd column, … of the 3rd character. When the third scan is displayed, the first column of each LED module starts to scan and display the data from the third column of each character, that is, the first LED module displays the third, fourth, … …, the first column and the second column of the 16th column and the 2nd character, the 2nd LED module displays the 3rd column, the 4th column,…, the 16th column and the 3rd character of the 2nd character The first column, the second column, …. In this way, smooth movement display of characters is realized.

3 program design

According to the above circuit design and working principle, the control program flow chart of this circuit is drawn. Write out the control program according to the program flow chart, use Wave or Keil software to debug and pass, then produce the target code file.

4 Circuit simulation

Add the target code file to the single-chip microcomputer in the LED display control circuit simulation diagram drawn with Proteus software, and the simulation runs, and the result of the operation is shown in Figure 4.

Circuit Design Based on AT89C51 Single-chip Microcomputer to Control LED Display

5 Conclusion

The LED display screen control circuit uses a single-chip microcomputer as the controller, and adopts a serial shift output mode to realize a smooth moving display of a line of characters. In practical applications, a related drive circuit should also be added. This circuit can be expanded to realize the display control of the LED display screen composed of any number of 16×16 dot matrix LED modules. The actual application shows that the circuit is stable and reliable, and the effect is good.

The Links:   EVM31-050A LQ050Q3DG01 TIMMALCD

micohuang