0 Introduction
This paper designs a dot matrix LED text display screen that is easy to update, expandable, and low-cost. The ways to reduce costs are: ① Use the Bluetooth data transmission function of mobile phones that almost everyone has to update the LED display content, eliminating the cost of professional host computer software and control cards, and making the operation simpler; ② The single display content is 5 to 30 Chinese characters or English letters. Because the display content is small, the expansion circuit can be simplified.
1 System Design
1.1 System composition
The system consists of a smart phone with Bluetooth function and an LED display screen. The LED display screen consists of a single-chip microcomputer, an LED dot matrix module, a font chip, a Bluetooth receiver module, a 5V switching power supply and a 3.3V voltage regulator circuit, as shown in Figure 1. The system works as follows: The user edits the "data" through the notepad of the smart phone and sends it to the Bluetooth receiver module on the display screen via wireless Bluetooth. The main control single-chip microcomputer reads the "data" received by the Bluetooth receiver module and processes it. The "data" consists of "control commands" and "display content", and the two parts of data are separated by a custom feature character. The "control command" is used to set the brightness of the display screen, the speed and direction of the display content; and the single-chip microcomputer finds the corresponding 32-byte display code in the font chip according to the character code of the received "display content" and sends it to the dot matrix screen for display.
Figure 1 System composition
1.2 Working principle of LED dot matrix screen
LED dot matrix display screen can be composed of several LED unit boards according to display needs. The general LED unit board is composed of 2-bit 16 × 16 dot matrix LEDs with a size of 160*320mm2. The working principle of the unit board is as follows.
Each board has 16 rows and 32 columns, and the data is displayed using the traditional row-column scanning method. Usually, in order to reduce flicker and increase the scanning speed, 1/4 scanning is used, that is, 16 rows are divided into 4 4-row groups, and the corresponding rows in the same sequence of 4 4-row groups are selected at the same time each time. In this way, 16 rows of scanning display can be completed by scanning 4 times. Among them, the column control is undertaken by 74HC595, and there are 16 pieces on each unit board, and each piece controls 4 rows and 8 columns of dot matrix small units. The row control is undertaken by a decoder 74LS138, which selects the corresponding rows in the same sequence of 4 4-row groups of the unit board each time. In order to ensure normal current drive (brightness), the output of 74LS138 is driven and amplified by AMP4593. Each unit board has 4 pieces, and each piece drives 4 rows. 16 74HC595s are connected in cascade mode. Since 4 74HC595s are required for every 4 rows and 32 columns, 16 rows and 32 columns are 16. Let the first 4 rows of 4 74HC595s be numbered 1, 2, 3, 4, and the second 4 rows of 4 74HC595s be numbered 5, 6, 7, 8, and so on. The data output end of each piece is connected to the input end of the next piece. The data is serially input from the input end of the first piece. Under the action of the shift pulse, the data is shifted in one by one. After 8 × 16 pulses, the first data shifted in is shifted to the lowest bit of the 16th piece (also the output end of the piece). After all the data are shifted in, a complete content of a board can be displayed. According to this rule, the display software design can be carried out. If the number of words displayed is large, the number of spliced LED unit boards will be large, and the number of shift pulses required to display a complete content of a screen will be large. This display mode requires the main control microcontroller to have a high instruction execution speed, otherwise there will be a flickering feeling. The schematic diagram of the dot matrix unit board is shown in Figure 2.
Figure 2 Schematic diagram of dot matrix unit board
2 Selection of main system modules and circuit design
2.1 Main control chip
2.1.1 Chip selection
In order to meet the display of LED display screen and the expansion of multiple boards, the system main control microcontroller is required to have a faster running speed; a larger storage space is used to store display data, so the C8051F410 of Silicon Corporation of the United States is selected. This chip is a high-performance product, and the FTQP-32 package (9mm*9mm) greatly reduces the volume; due to the use of a streamlined instruction structure, each machine cycle only requires one clock cycle, and the operation speed is greatly accelerated. If the internal clock of 24.5MHz is used, its running speed is about 24 times that of the ordinary 8051 microcontroller working at 12MHz clock; the chip has rich internal resources, built-in watchdog, and can be connected to the debugger through the JTAG interface to facilitate hardware online debugging; the chip contains UART, SPI, I2C and other communication interfaces, which are convenient for connection with peripheral chips; 4 timers/counters make programming more convenient; the built-in 16K/32KFLASH can store about 1K Chinese characters.
2.1.2 Minimum system circuit design
The system has no special requirements for the accuracy and temperature stability of the microcontroller clock. The built-in clock oscillator of the C8051F410 microcontroller can be used directly without an external oscillator. When using it, it should be noted that the chip working power is introduced from the Vregin pin (+ 3.3V), VDD is the internal reference voltage output pin, and VIO is the power input pin when the I/O port is used as a digital pin. When designing the circuit, filtering and decoupling capacitors (4.7μ and 104p) must be placed close to these three pins. P1.0~P1.3 are the control lines CLK, SCLK, R and OE of the display; P1.7, P0.0~P0.2 are the control lines of the font chip, using the SPI interface; P2.0 and P2.1 are the line scan control lines A and B of the display; P0.4 and P0.5 are serial communication lines, connected to the Bluetooth module. These 12 pins need to be configured as digital pins. The minimum system circuit is shown in Figure 3.
Figure 3 C8051F410 MCU minimum system
2.2 Bluetooth module
2.2.1 Module selection
The requirements for selecting Bluetooth modules are: cheap, small, and easy to use. There are many Bluetooth module products that meet the requirements. The design uses the GC-02 Bluetooth module produced by Nanjing Guochun Electric, which is a high-quality CLASS2 Bluetooth module. This Bluetooth module has an object exchange protocol (OPP) file receiving function. As long as it is powered on, it can be recognized by the mobile phone Bluetooth, and can successfully pair and establish a connection to receive files transmitted by the mobile phone Bluetooth.
The GC-02 Bluetooth module has 29 pins and can communicate with the microcontroller through the SPI interface or the UART interface. The microcontroller of this system selects the UART method to communicate with the GC-02. When the Bluetooth module is in standby mode, the paired mobile phone sends files to the Bluetooth module. The unpaired mobile phone needs to be paired first, and the pairing can be done by entering the correct PIN code (i.e. pairing password). The factory PIN code of this Bluetooth module is "1234", and its PIN code can be modified by sending instructions to the Bluetooth module.
2.2.2 Circuit Design
The microcontroller communicates with the serial port (pins 12 and 13) of the Bluetooth module GC-2 through pins P0.4 and P0.5, and the other functions of the Bluetooth module are not used. The connection between the microcontroller and the Bluetooth module is shown in Figure 4.
Figure 4 Connection diagram between MCU and Bluetooth module.
2. 3 Font Chip
2.3.1 Chip Selection
Since the displayed content needs to be changed frequently during use, the method of using text "modulus" to obtain display data is obviously not feasible. Storing the font library in the display circuit or using a font library chip is a feasible solution. The design uses a font library chip and selects the GT21L16S2W standard Chinese character font chip.
GT21L16S2W is a Chinese character library chip with 11 × 12 dot matrix and 15 × 16 dot matrix, supporting GB2312 national standard simplified Chinese characters (including the legal authorization of the National Standardization Committee), ASCII characters and GB2312 and Unicode encoding conversion table. The arrangement format is horizontal and horizontal. According to the address of the character dot matrix in the chip, the character dot matrix information can be continuously read from the address.
Taking 15X16 dot matrix Chinese characters as an example, Chinese character information requires 32 bytes (BYTE 0-BYTE31) to represent, and the dot matrix data is arranged horizontally. Its specific arrangement structure is shown in Figure 5. Each Chinese character is stored in the chip in the form of a Chinese character dot matrix font. Each dot is represented by a binary bit. The dot with 1 can display a bright spot on the screen when displayed, and the dot with 0 is not displayed on the screen. The dot matrix arrangement format is horizontally arranged: that is, the high bit of a byte represents the dot on the left, and the low bit represents the dot on the right. After a row of dots is filled, the next row is arranged. In this way, the dot matrix information is used to display directly on the display according to the above rules, and the corresponding Chinese characters will appear. 15X16 dot matrix Chinese characters are stored in the chip address range of 00000H ~3B7BFH. As long as the internal code of the Chinese character is known, the first address of the Chinese character display data can be calculated.
Figure 5 Chinese character dot matrix arrangement format
2.3.2 Interface circuit
The functions of each pin of the font chip GT21L16S2W are as follows: Pins 1, 2, 5, and 6 are SPI interfaces, where: 1 (CS#) is chip select input, 2 (SO) is serial data output, 5 (SI) is serial data input, and 6 (SCLK) is serial clock.
Pin 7 (HOLD#) is bus suspend, which can be used to suspend data transmission during the period when the chip select signal is valid. The microcontroller communicates with the font chip through pins P0.0 ~ P0.2 and P1.7 to read the display data. The HOLD# pin is suspended, and the Vcc working power supply is 3.3 V. The connection between the microcontroller and the font chip is shown in Figure 6.
Figure 6 Connection diagram between MCU and font chip.
2. 4 Connection between LED dot matrix screen and microcontroller
The dot matrix screen uses the most widely used P10 single red outdoor unit board on the market. This module has the characteristics of high stability, high brightness, uniform color, etc. The scanning mode is 1/4 scan, the control method is simple, which is conducive to optimizing software design. The dot matrix unit can be pieced together as needed, and it is flexible. The connection between the LED dot matrix screen and the single-chip microcomputer is shown in Figure 7. Among them, OE (P1.3) is the enable signal, connected to 74HC138, used for brightness control, and can also be used for display screen blanking. Just adjust its duty cycle to control the change of brightness. ABCD is the line scan signal, A is the lowest bit. If all ABCD signals are used, the maximum range of the control scan is 16 lines. In 1/4 scan, only AB (P2.0 and P2.1) signals are needed. When the line control signal is abnormal, there will be display dislocation, highlight or image overlap.
CLK (P1.0) is a shift pulse, each pulse shifts data in or out one bit. When the clock signal is abnormal, the whole board will be displayed in a disorderly manner. STB (P1.1) is a latch signal, which latches the data in the shift register and displays the data content by lighting the LED through the drive circuit. RI (P1.2) is the input terminal of the display data.
2.5 Power module
The power module consists of a 5 V high-power power supply and a + 3.3 V low-power voltage regulator circuit. The former provides power to the LED screen, and the latter stabilizes the 5V voltage into 3.3 V and provides it to the microcontroller, Bluetooth module and font module. Here, the ASM1117-3.3 chip is selected. The input rated power of the commercially available LED board is about 190 W/m2, the area of each unit board is 160*320 mm2, and the maximum operating current is about 2 A (the power consumption is 10 W at 5 V working voltage). The power of the switching power supply can be selected according to the required area of the LED display. The commonly used switching power supply, with dual MOS tube output, enhanced heat sink and filter capacitor coil, can ensure pure and sufficient current output.
2.6 System overall circuit
This system uses the single-chip microcomputer C8051F410 as the MCU, and the peripheral circuits include a Bluetooth module, a font chip, an LED dot matrix screen and a power module. The system circuit principle is shown in Figure 8.
Figure 8 System schematic diagram.
3 System Software Design
The initialization of the microcontroller includes: ① Clock initialization, select the 24.5MHz internal clock on the chip. ② Pin configuration: Configure P0. 0 ~ P0. 2 as SPI interface (3 lines) to communicate with the font chip; Configure P0. 4 and P0. 5 as serial ports to communicate with the Bluetooth module; Configure P1. 0 ~ P1. 3, P2. 0 and P2. 1 as digital I/O to control the display screen.
③ Initialize interrupts, timers/counters and FLASH related registers. The system software flow is shown in Figure 9.
Figure 9 System software flow
After initialization, the system will actively read the data in the specified address range of FLASH, and convert the data (Unicode character set) to obtain the address code of the GB2312 character set code corresponding to the Unicode data in the font chip, and then send the address code to the font chip to extract the GB2312 character set corresponding to the address, and then convert the GB2312 character set code through the font chip to extract the corresponding 16*16 dot matrix code, and send the code to the microcontroller through the SPI port, and then the microcontroller sends the dot matrix code to the dot matrix screen and controls the dot matrix screen to display the data.
Under normal working conditions, when the mobile phone Bluetooth is paired with the system Bluetooth module, the mobile phone can only be paired successfully after entering the correct PIN code. After the pairing is successful, if the mobile phone uses the notepad software to send data via Bluetooth, the Bluetooth module will receive the data and send it out through the serial port. At this time, the microcontroller receives the data. If the start bit of the valid data is recognized as the flag bit "#", the system will consider the command to be a control command, that is, to control the brightness, speed, and moving direction of the LED display. The format of the control command is defined independently. For example, "#35 left" means: "#" is the control flag, "3" controls the brightness (the control range is 0 - 9, the larger the value, the higher the brightness), "5" controls the speed (the control range is 0 - 9, the larger the number, the slower the speed), and "left" is the direction control bit (left is the moving direction to move to the left, right represents moving to the right, up represents moving up, and down represents moving down). If the start bit of the valid data is not "#", then the data will be assumed to be the new content to be displayed by the LED, and the system will store the data in the specified FLASH address range in sequence, and the new data will be displayed on the screen after reset. It should be pointed out in particular that in order to ensure the reliability of the display screen, the "feeding dog" parameter should be set at an appropriate position in the display cycle program.
4 Conclusion
The system achieves the purpose of updating the display content through the mobile phone, which is convenient and fast. After a group of users, the display performance and control performance are relatively stable. However, in the actual use process, there are also unresolved problems: ① Some mobile phones do not support the Unicode character set format. ② This design is limited to the transmission of display data edited by the smart phone through the notepad, and the notepad editing software used by different mobile phones is not fully compatible. This design is based on the Nokia mobile phone software.
Previous article:On Semi NCL30051 60W LED Driver Solution
Next article:Detailed interpretation and analysis of the driving and application of white light LED
Recommended ReadingLatest update time:2024-11-16 17:53
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- [RISC-V MCU CH32V103 Review] ---Advancing Wiki---GPIO and TIMER
- Android desktop effect simulation based on LVGL
- We dismantled a domestic medical B-ultrasound machine and let's take a look
- 【TI recommended course】#TI millimeter wave radar technology introduction#
- The best way to teach yourself electronics
- A brief discussion on air gap and leakage inductance
- 【GD32L233C-START Review】-3. Successful establishment of Keil development environment and DEMO routine test
- MSP432 MCU takes advantage of real-time operating systems
- M12 Gigabit Ethernet Pinout
- The Impact of IoT on Energy Efficiency