Design of 16×64 LED dot matrix display screen based on single chip microcomputer

Publisher:Yuexin888Latest update time:2009-12-07 Source: 电子元器件应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

LED dot matrix display is a simple Chinese character display, which is cheap, easy to control, and has a long service life. It can be widely used in various public places, such as stations, docks, banks, schools, trains, buses, etc. This article introduces the design process of a low-cost 16x64 dot matrix LED display in detail.

1 Hardware System Design

This system uses AT89C52 single-chip microcomputer as the controller. The whole circuit is mainly composed of single-chip microcomputer control and its interface circuit, display driver circuit, power supply circuit and other parts. In order to simplify the display circuit and reduce the cost, this system does not add character library memory to the single-chip microcomputer part. Instead, Chinese characters and character display information are edited on the PC and converted into corresponding dot matrix display data, which are then sent to the single-chip microcomputer for storage and display processing through the serial port (using RS-232 communication standard). Figure 1 shows the hardware system schematic diagram.


1.1 Single chip microcomputer control circuit

This system is composed of AT89C52 as the minimum application system of single-chip microcomputer. It is also equipped with 11.0592 MHz crystal oscillator and key reset circuit. A Flash memory 29F040 is a data memory, which can be used to store the dot matrix information sent by the PC serial port (the image or text is converted into the dot matrix information corresponding to the pixels of the LED display screen through software). The Flash memory is a non-volatile memory, which can still maintain the information in the chip after the power supply is turned off. Since the capacity of 29F040 is 512 KB (the chip is composed of 8 64 Kbyte read and write blocks, which can be divided into blocks for reading, writing and erasing operations), and AT89C52 can only manage 64KB of data space, 29F040 needs to be divided into 8 pages, each page is 64KB. The page number can be selected by P3.2~P3.4 of the single-chip microcomputer. In addition, MAX232 can be used to complete the conversion between RS232 and TTL levels, so that the PC and the single-chip microcomputer can exchange information.

1.2 Design of 16x64 dot matrix display

Figure 2 is an internal structure diagram of an 8x8 LED dot matrix monochrome row common anode module, with a single point operating voltage Uf of 1.8 V and a forward current IF of 8~10 mA. When a row line is high and a column line is low, the point where the row and column intersect is lit; when a column line is high, the point where the row and column intersect is dark; when a row line is low, all the points corresponding to this row are dark regardless of the column line.

Four 8x8 dot matrix displays can form a 16x16 dot matrix display, and the connection method is shown in Figure 3. In the figure, the 8 columns of (A) and (B), and the 8 columns of (C) and (D) are connected respectively, and the 8 rows of (A) and (C), and the 8 rows of (B) and (D) are connected respectively. A 16x16 dot matrix display with 16 rows (each row has 16 LEDs) and 16 columns (each column also has 16 LEDs) can be formed. These 256 dots can be called a page. In this way, when displaying characters, you only need to control the corresponding on and off in a page.

If necessary, four 16x16 dot matrix displays can be connected to form a 16x64 dot matrix display.

2 Scanning driver for LED dot matrix display

The design of the LED display driver circuit should be coordinated with the control system used. Drivers are usually divided into two categories: dynamic scanning type and static latch type. This article takes the design of the dynamic scanning type driver circuit as an example for analysis. The dynamic scanning type drive mode means that the 16 rows of light-emitting diodes on the display share a set of column drive registers, and then through the time-sharing work of the row driver tube, the lighting time of each row of LEDs accounts for 1/16 of the total time. As long as the refresh rate of each row is greater than 50 Hz, people can see a complete text or picture by using the visual persistence effect of the human eye.

The AT89S52 microcontroller has four I/O ports (P0, P1, P2, P3), each of which has 8 bits. If all of them use parallel output, it obviously cannot meet the requirements. Therefore, the row scan driver in this design uses parallel port output, while the field scan driver uses serial port output.

2.1 Line Scan Driver

Since the 16x64 dot matrix display has 16 lines, in order to make full use of the interface of the single-chip computer, a 4-16 line decoder 74LS154 is added to this circuit. Its input is a hexadecimal code, and the decoded output is a low-state scan signal. Their pin diagram is shown in Figure 4. Ground the G1 and G2 pins of 74LS154, and then use the A, B, C, and D pins as input terminals. There will be 16 different input states, 0000 to 1111, and then each state controls only one output, that is, there will be 16 outputs.

If all 64 dots in a row are lit, the current through 74LS154 will reach 640 mA. In fact, the 74LS154 decoder cannot provide enough absorption current to drive 64 LEDs to light up at the same time. Therefore, a transistor should be used between each output end of 74LS154 and each row corresponding to the 16x64 dot matrix display to amplify the current signal. The Darlington transistor TIP127 is selected in this article. In this way, when a certain output pin of 74LS154 is at a low level, the corresponding transistor emitter is at a high level, so that the corresponding row of the dot matrix display is also at a high level.

2.2 Field Scan Drive

The design of the field scanning drive circuit of this system can use the universal integrated circuit 74HC595 with serial input and parallel output as data latch. 74HC595 is an eight-bit serial input three-state parallel output shift register. Its pins are shown in Figure 4, where SI is the input end of the serial data, RCK is the input clock of the storage register, SCK is the input clock of the shift register, Q'H is the output of the serial data, G is the output enable control of the input data, and QA~QH are the parallel outputs of the serial data. The data input from the SI port can be input into the 74HC595 under the action of the rising edge of the SCK pin of the shift register. And the input data is latched in the 74HC595 under the action of the rising edge of the RCK pin, so that when G is low, the data can be output in parallel. In order to avoid interference with the data input from the PC serial port, the analog serial port P1.4~P1.7 can also be used to output serial data, shift clock SCK, storage signal RCK and parallel output enable signal G respectively.

In order to eliminate the influence of power supply voltage fluctuation and row scanning tube voltage drop (different numbers of dots lit in the first row will cause changes in tube voltage drop, thus affecting the current passing through the LED tube) on the brightness of the LED display, a column constant current drive circuit can be used in the design. The transistor 8550 and peripheral components can be used to form a column constant current drive circuit, and the transistor can be put in an amplified state by adjusting the 100 kΩ adjustable resistor. At the same time, the collector current is adjusted to 10 mA, so that the current passing through the LED remains unchanged when the corresponding dot matrix is ​​lit.

2.3 Scanning and display working process

By cascading eight 74HC595s, they can share a shift clock SCK and data latch signal RCK. In this way, when the data to be displayed in the first row passes through 8x8=64 SCK clocks, it can be completely moved into the 74HC595. At this time, a data latch signal RCK will be generated to latch the data in the 74HC595, and under the action of the enable signal G, the serial input data is output in parallel, so that the field drive tube corresponding to each output bit is in an amplified or cut-off state; at the same time, the line scan control circuit generates a signal to turn on the first row of scan tubes, which is equivalent to the positive end of the first row of LEDs being connected high. Obviously, the lighting of the first row of LED tubes depends on the latch signal in the 74HC595; in addition, while the first row of LED tubes is lit, the data to be displayed in the second row is moved into the 74HC595, and then latched. At the same time, the line scan control circuit turns off the first row of scan tubes and turns on the second row, so that the second row of LED tubes is lit, and so on. After the sixteenth row is scanned, it returns to the first row. In this way, as long as the scanning speed is high enough, a complete text or image can be formed.

3 Software System Design

The software design flow chart of this system is shown in Figure 5. The display program is designed using the commonly used left shift as an example.

4 Conclusion

Practical applications have proven that this display screen can be used as an information display device. It is used in public places to display information and has the characteristics of stable operation, clear characters, and moderate brightness. If the information to be displayed is relatively simple, the information code can be directly copied into the single-chip microcomputer, and the amount of information displayed can be increased by expanding the storage device externally.

Reference address:Design of 16×64 LED dot matrix display screen based on single chip microcomputer

Previous article:Design of program-controlled constant current source based on STC89C52
Next article:Research on Error Detection Method in Serial Communication of 8051 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号