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 are parallel output, it obviously cannot meet the requirements. Therefore, the line scan driver in this design uses parallel port output, while the field scan driver uses serial port output. [page]
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 is 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.
Previous article:Keil software simulation and debugging techniques for single chip microcomputers
Next article:Parking device control system based on single chip microcomputer and Modbus protocol
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- What exactly is a sine filter?
- Pingtouge RVB2601 board-GPIO
- [TI recommended course] #DC/DC switching regulator packaging innovation#
- ST60 short-distance, contactless connector evaluation 1: application environment and principle
- Looking for open source enthusiasts to improve the BabyOS open source project
- Can experienced friends recommend some useful power modules?
- What is the appropriate sampling rate for an oscilloscope?
- In what fields are panoramic high-definition video recorders used?
- What is the development trend of machine vision surface defect detection system?
- What does the MCU REFO pin stabilization time mean? How is it related to the connected capacitor?