Scheme demonstration
1 Dot matrix display screen part
Scheme 1: Serial display. This method can display 4 16×16 dot matrix Chinese characters or 8 16×8 dot matrix Chinese characters, characters or numbers at the same time. Each unit of the dot matrix display screen consists of 16 8×8 dot matrix LED display modules, row signal selection decoder 74HC138, driver 74HC245, data shift register 74HC245 and row driver, as shown in Figure 1. The unit display screen can receive data information and command information transmitted by the controller (main control circuit board) or the upper-level display unit module, and can transmit these data information and command information to the next-level display module unit without any changes. Therefore, the display screen can be expanded to more display units to display more content.
Figure 1 Serial display logic structure block diagram
This solution is commonly used in dot matrix display screen systems, and the devices used are also commonly used and easy to buy. However, it has a fatal disadvantage, that is, the refresh speed is not fast enough. If you want to drive a 64-column dot matrix display, the general 51 single-chip will be more difficult, and there will be a more serious flickering and stagnation phenomenon. In addition, to realize functions such as left and right movement of text and adjustment of movement speed, it will bring more difficulties to software design.
Solution 2: Parallel display. The IO port can be expanded through the latch chip to achieve the purpose of controlling the 64 column lines of the LED dot matrix. In the solution, 16 latches 74HC573 are used to form 8 groups of double buffer registers to drive the 8 groups of column lines of the LED dot matrix, and the 4/16 decoder 74HC595 is used to scan the 16 rows of the LED dot matrix. Before sending the data of each row to the LED dot matrix, the data is first sent to the 8 74HC573 of the first level, and then the lock pulse is sent to the 8 74HC573 of the second level, and the data is output to the LED dot array together, thus avoiding the problem of asynchronous display of each row of data. Since parallel data transmission speed is faster than serial data transmission speed, the problem of character flickering is better solved, and the left and right movement of text is also easier to control. In summary, this design finally chose this solution.
2 Display screen control part
Solution 1: Single-machine working mode. A single-chip microcomputer is used to control all functions, including the refresh display, mode setting, time reading, temperature detection, and communication with the host computer of the LED dot matrix display screen. Using only one single-chip microcomputer to control the dot matrix display screen can greatly simplify the circuit, and the software design is also easy to implement. However, the processing power of an AT89S52 single-chip microcomputer is not enough to integrate all functions together. At this time, the internal resources of the CPU of the single-chip microcomputer are already insufficient, which will lead to poor system functions and fail to achieve good performance.
Solution 2: Master-slave working mode. The master-slave single-chip microcomputer working mode is used to control the entire system. One of the single-chip microcomputers is used to control the LED dot matrix display, and the other single-chip microcomputer is used to expand the keyboard, serial port communication with the host computer, temperature measurement, time reading, etc. Compared with the stand-alone working mode, the processing capacity of the master-slave working mode is greatly improved, and the division of labor is clear, and the execution speed is greatly improved. Although the requirements for hardware circuit and software design are relatively high, it also involves the communication problem between the master and slave microcontrollers. However, in order to better achieve various performance indicators, this design adopts this solution.
Hardware circuit design
The overall block diagram of the hardware circuit design of this system is shown in Figure 2.
Figure 2 LED dot matrix display system block diagram
1 System main controller circuit
The system main controller circuit is shown in Figure 3, which is a single-chip minimum system, plus expansion slots and some functional circuits, which determines the working mode and completes related operations through keyboard scanning. It also includes a time chip circuit and a temperature detection circuit, as well as an RS-232 interface circuit with the host computer.
Figure 3 Main controller circuit
The DS1302 used in this design is a circuit with trickle current charging capability. Its main feature is that it uses serial data transmission, can provide programmable charging function for power-off protection power supply, and can turn off the charging function. DS18B20 is a one-line digital temperature sensor; the temperature measurement range is -55℃~+125℃; the temperature measurement resolution can reach 0.0625℃; its working power supply can be introduced at the remote end or generated by parasitic power supply; multiple DS18B20 can be connected in parallel to 3 or 2 lines, and the CPU only needs one port line to communicate with many DS18B20, occupying fewer ports of the microprocessor, which can save a lot of leads and logic circuits. The above features make it very suitable for long-distance multi-point temperature detection system.
2 Dot matrix drive and control circuit
This circuit mainly uses the output dot matrix data sent by the microcontroller to control the 64 column line ends of the LED dot matrix through the I0 port expanded by the latch chip. This design uses 16 latches 74HC573 to form 8 groups of double buffer registers to drive 8 groups of column lines of LED dot matrix, and uses 4/16 decoder 74HC595 to scan 16 rows of LED dot matrix. Before sending the data of each row to the LED dot matrix, the data is first sent to the 8 74HC573 of the first stage, and then a lock pulse is sent to the 8 74HC573 of the second stage to send the data to each column of the LED dot matrix.
Software Design
The software flow of this design is shown in Figure 4.
Figure 4 LED dot matrix display software process
Circuit simulation and test
1 Simulation and program debugging of dot matrix display screen
Proteus7.2 is a commonly used single-chip microcomputer simulation software, and many simulation examples are very similar to actual circuits. In order to ensure that the actual circuit can achieve the expected effect as much as possible and reduce useless work, many circuit module solutions are simulated. The processing and corresponding program design of the dot matrix display are simulated with Proteus and Keil uvision2, aiming to improve the hardware and software solutions of the whole system and improve the system operation efficiency and stability.
In the selection of the dot matrix display method, after constantly modifying the program and serial circuit connection, it is found that the serial method is difficult to realize the right shift function of the subtitles, and it is not convenient to adjust the speed of the subtitle movement. After analysis, it was decided to try the parallel display method. It was found that the circuit of this method is not complicated and brings a lot of convenience to program design, especially it is easy to realize the left and right movement of the subtitles and the setting of the movement speed. The simulation circuit of this system is shown in Figure 5.
Figure 5 Proteus simulation circuit diagram
2 Whole machine test
Download the code HEX file generated by the compiler to the MCU Flash, connect each module, and test the functions of the LED dot matrix display screen one by one.
Conclusion
The display of Chinese characters, letters and numbers required by this design has been realized, and the left and right movement and speed of the text can be controlled. At the same time, the temperature and date and time can be displayed in real time, and the online communication with the host computer is successful. The hardware of the whole machine system is easy to make, and the difficulty lies in software design. This system uses parallel display and uses master-slave MCU to control the entire system, which can greatly reduce the difficulty of software writing and easily achieve various functional indicators.
Previous article:Design of aircraft engine speed measurement system based on single chip microcomputer
Next article:Design of intelligent wireless fire monitoring system based on nRF2401
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- [TI recommended course] #ESD electrostatic protection introduction series video#
- Power supply - What is the principle of BUCK feedback?
- Built-in password keyboard to input numeric variables and jump to the page according to the password
- Smartphone connector overall test solution
- What is an F1-4?
- Design of power amplifier circuit based on MSP430F449 single chip microcomputer
- China's new infrastructure will ignite China's economy after the epidemic
- Selling various low, medium and high-end development boards
- EEWORLD University Hall ---- Zhougong Series Lectures —— Basic Principles of Zhougong PID
- Learn a little about J-Link driver download and JLINK Hex program download