1 Introduction
LED display screen is a new type of information dissemination media that has developed rapidly in the world since the late 1980s. It is a large-scale display system that integrates microelectronics technology, optoelectronics technology, computer technology, and information processing technology. It has gradually become a leader in display media with its bright colors, wide dynamic range, high brightness, long life, and stable working performance. It is widely used in advertising, securities, information dissemination, news release, etc. It is currently a more advanced propaganda display media in the world [1]. This paper proposes a master-slave single-chip microcomputer LED display screen solution. This design uses the AVR single-chip microcomputer's own FLASH ROM and RAM, does not require any external storage circuit, and has a simple circuit structure.
2. System working principle and overall design
2.1 AVR microcontroller
AVR microcontroller is an enhanced RISC (Reduced Instruction Set CPU) high-speed 8-bit microcontroller with built-in Flash. The hardware adopts the Harward structure, which can execute one instruction in one clock cycle, and most instructions are single-cycle instructions. It supports in-system programming ISP, and the MEGA series also supports in-application programming IAP. The built-in FLASH program memory can be erased and written more than 1,000 times, which brings convenience to users' development, production and maintenance. The EPROM can be erased and written 100,000 times, which brings convenience to the preservation of data after power failure. AVR microcontroller has rich on-chip resources, such as RTC, WATCHDOG, A/D converter, PWM, USART, SPI, TWI interface, etc., and the I/O port has strong functions and strong driving ability.
2.2 Working principle of the system
This design uses AVR series single-chip microcomputer ATMEGA16 as the main controller, and uses DS1302 clock chip and 16M external crystal oscillator to provide accurate time standard, very convenient display and calibration time.
The core of Atmega32 has a rich instruction set and 32 general working registers. All registers are directly connected to the arithmetic logic unit (ALU), so that one instruction can access two independent registers at the same time in one clock cycle. 74HC245 memory is used as signal power amplifier. The data playback format is realized through two 74HC595 shift registers. The ATMEGA32 card has 32MFLASH. Users can use the dedicated host computer software to edit the content to be displayed according to the predetermined display format, and send it to the display control card through the RS485 or RS232 interface. After the transmission is completed, the control card can be disconnected from the computer and automatically display the input content according to the mode set by the user, so as to display the content you need through the LED display. The displayed content remains until the next data update.
2.3 Overall design of the system
The LED dot matrix display system consists of a computer, RS-232 communication circuit, a control circuit and an LED dot matrix display circuit. The structural block diagram is shown in Figure 1.
Figure 1 System structure diagram
The host computer converts the image and text into the display code of the display screen, and sends the display information to the control circuit through RS232. The control circuit uses the AT2mega32 microcontroller with 32KB on-chip FLASH ROM and 2KB on-chip RAM, without external memory. If you want to store more display information, you can choose AT2mega64 with 64KB on-chip FLASH ROM or AT2mega128 with 128kB on-chip FLASH ROM, or you can use external memory to increase the storage capacity. The control circuit mainly completes the scrolling and segmentation of the display data, and then sends it to each unit board through the asynchronous serial port. Each unit board is composed of 16 × 32 monochrome dot matrix blocks to form a dot matrix screen. When the control circuit updates the display content of the display unit board, it sends display data to all unit boards one by one according to the address. After updating all sub-module data, it sends a special address word 0xFF as a control word to make all unit boards update the display data at the same time. This can avoid the problem of asynchronous screen updates of each sub-module when the screen is large and the number of unit boards is large. For the 2 × 10 unit boards completed in this design, due to the communication rate limitation, the screen update speed can reach up to 56800 / (129 × 24 + 1) = 18134 frames / s. Since the main control circuit also needs to complete the segmentation of full-screen data and the movement control of display content, its actual frame number is lower than the above value, but it can meet the requirements for ordinary picture display.
3 System Hardware Design
3.1 Selection of main controller
Atmega32 is a low-power 8-bit CMOS microcontroller based on an enhanced AVR RISC architecture. Due to its advanced instruction set and single-clock cycle instruction execution time, Atmega32 has a data throughput of up to 1 MIPS/MHz, which can alleviate the contradiction between power consumption and processing speed in the system.
Atmega32 has 32K bytes of in-system programmable Flash (with simultaneous read and write capabilities, i.e. RWW), 512 bytes of EEPROM, 1K bytes of SRAM, 32 general-purpose I/O lines, 32 general-purpose working registers, a JTAG interface for boundary scan, support for on-chip debugging and programming, three flexible timers/counters (T/C) with compare modes, on-chip/external interrupts, programmable serial USART, a universal serial interface with a start condition detector, a programmable watchdog timer with an on-chip oscillator, an SPI serial port, and six power-saving modes that can be selected by software.
3.2 Unit board display circuit unit
The display drive circuit is composed of RS232 conversion circuit, submodule address identification circuit and dot matrix drive circuit. The RS232 conversion circuit is the same as that in the main board, and also uses MAX485 for level conversion. Since the asynchronous serial port of the microcontroller is used for multi-machine communication and data transmission, the unit module should have an address identification corresponding to its position. The address identification circuit is composed of an 8-bit parallel input and serial output chip 74HC595 and an 8-bit dip switch, so this system can accommodate up to 255 submodules (address 0xFF is used as the control word for updating the submodule display).
The LED dot matrix is driven by dynamic scanning method and realizes 16-level grayscale display. In order to save the time consumption of scanning program in the single-chip program and improve the scanning speed, the display data adopts parallel output method. The driving circuit adopts decoders 74HC138 and 74HC245 to realize row selection and bit selection respectively.
4 System Software Design
System software design includes two parts: upper computer software design and lower computer program design.
The host computer software completes the editing of images and texts, and transmits the display data to the control card through the computer serial interface. The control card receives the data from the host computer and performs self-update of the display data in the FLASH ROM through the program in the internal Boot Loader area. The control card divides the display data and sends it to each unit board, and completes the display data processing in different ways.
4.1 Lower computer program design
The lower computer software design is divided into two functional blocks: the display part and the communication part. The display part adopts a dynamic scanning method to realize the transmission control and display functions of the Chinese characters, images, characters and other data information to be displayed on the display screen. The real-time communication part with the PC mainly uses the microcontroller serial port interrupt to receive and send data information to realize real-time data information transmission with the computer. The program can realize communication with the computer and can easily modify the Chinese characters, images, etc. to be displayed; and the display screen can display Chinese characters or tables according to the display mode you choose. The flow chart of the design program is shown in Figure 2.
Figure 2 System program flow chart
The software system adopts a modular structure, including the main program, display subroutine and serial port interrupt service program. The main program is a sequential structure. After completing the initialization settings of the stack, interrupt and serial port, it cyclically calls the display subroutine and responds to the serial receive or send interrupt instructions; the display subroutine takes out the font from the display buffer, outputs the row selection signal to the P0 port and outputs it through a general logic array 74HC00D, and cooperates with the column scan signal to perform dynamic scanning display; the interrupt service program serial port receives the Chinese character machine code data sent by the PC to achieve real-time communication with the computer. The functions of each part of the program are realized by each module. The program modules are: serial port initialization module, data input module, Chinese character first address calculation module, character fetching module, display module and movement module. The system display flow chart is shown in Figure 3.
Figure 3 System display flow chart
4.2 Design of human-computer interaction interface
The host computer software is developed using the visual programming tool Visual Basic.NET, which mainly completes the image point selection, linear compensation and dot matrix data generation. First, the image file is converted into a monochrome grayscale image with a resolution of 96 × 64 and a color depth of 256 levels. Since the duty cycle/brightness of the duty cycle-driven LED is a logarithmic characteristic, it is necessary to add an exponential characteristic to adjust it to a linear characteristic before it can be delivered to the display system for display.
The communication between PC and unit board is realized through MSComm control. The main interface of the system is shown in Figure 4.
Figure 4 Host computer main interface
5 Conclusion
This system design focuses on the study of monochrome screens. The design of true color LED display screens with different grayscales and the driving of the equipment need further study and discussion. Moreover, the control card used in this design can only control the monochrome display of the display screen. It would be more convenient if it could display two colors or even three colors. The LED display screen can display changing numbers, text, graphics and images. It can be used not only in indoor environments but also in outdoor environments. It has advantages that projectors, TV walls and LCD screens cannot match. LED can even be used in new technologies such as information indicator lights, large screen displays, and backlighting of liquid crystal displays (LCDs). It is one of the display methods for future intelligent transportation systems.
Since the analysis and design of LED display screens are closely related to the actual application environment and application purpose, the requirements for their control systems are also different. If the area of the display screen is large and the amount of information displayed on the screen is extremely large, the amount of data to be transmitted will also increase. How to design a more ideal font preservation method and a compression algorithm for data transmission requires further research and discussion.
Previous article:Research on LED display screen control system based on AVR microcontroller
Next article:Indoor formaldehyde testing system based on 51 single chip microcomputer
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Help max30001 FIFO ECG
- RIGOL FPGA Technology Talent Recruitment Call
- 5G system special business applications
- 【GD32L233C-START Review】MODBUS Test
- Configuration of character overlay chip 90092
- The normalized epidemic situation is still exploited by the virus
- Introduction to ARM SWD Protocol
- Introduction to the mobile station development board: ultra-low power python board
- USB to JTAG
- DSP28335 SCI communication problem summary and problem summary