In the application of LED display screens, the ultra-long strip LED screen is a very common form, which is characterized by "extra-long" length and narrow width. There is no clear definition of ultra-long LED display screens at present, and it is more appropriate to define the number of dots in the horizontal direction as ≥2 048.
Take the ultra-long strip LED display composed of 1/4 scan P10 unit board (dot pitch 10 mm) as an example. When the number of dots in the horizontal direction is 2048, its physical size in the horizontal direction is 20.48 m. The number of dots in the width (vertical direction) of the LED screen is generally 16, 24 and 32, and no more than 64 dots. The application is mainly to display a line of Chinese characters in various fonts. In order to ensure the refresh rate, in the control of the ultra-long LED display, it is required to send more data within the specified time. It is difficult for ordinary LED display control cards to achieve control requirements.
Based on the analysis of various existing strip LED display unit board circuits, this paper proposes an LED display control system based on multi-port serial Flash memory. The SPI interface of the microcontroller is used to generate a controllable clock, and the display data in the multi-port serial Flash memory is directly output to the ultra-long strip LED display in "DMA" mode.
1 Commonly used unit board internal serial shift register connection method
Figure 1 shows three common ways to connect serial shift registers inside unit boards. Figure 1 (a) shows the connection relationship between the unit board 74HC595 and the LED light-emitting tube matrix and the simplified circuit. The serial shift registers used inside the LED display unit board are generally 74HC595, MBI5026 or MBI5026 compatible chips, and MBI5026 can be seen as two 74HC595 cascaded chips, which is a constant current source drive mode and is more suitable for LED driving.
Figure 1 (b), (c), and (d) show the connection methods of P10, P16, F3.75, or F5.0 unit boards, respectively.
Figure 1 Three common cell board internal serial shift register connection methods
2 Problems and solutions faced by ultra-long LED displays
At present, a large number of door head screens (strip LED display screens) on the market are the most widely used form of LED display screens. Technically speaking, the horizontal dots of door head screens range from 256 to thousands of dots, and the height generally does not exceed 64 dots. With the improvement of market demand and display accuracy, the demand for ultra-long LED display screens with a length of thousands of dots is increasing. Ordinary LED display screen control cards are difficult to meet the requirements of refresh rate. For example, take the F3.75 LED display screen with a length of 4096 pixels. Assuming the refresh rate is 60 Hz, its SCK clock cycle is at least 106/60/16/4096 = 0.254 μs = 254 ns.
There are two ways to solve the problem of data output of super long LED display screen: one is to select high-performance embedded processor and FPGA chip, which has high control card cost; the other is to cleverly apply special functional components on the microcontroller and optimize the data organization algorithm, which is very low cost. This article adopts the second method, which uses the optimization algorithm to pre-write the data into the multi-port serial Flash memory SST26VF016B, and uses the SPI component of the STC12C5616 microcontroller to generate a high-speed controllable SCK clock, and outputs the display data in the multi-port serial Flash memory directly to the super long strip LED display screen in "DMA" mode, meeting the display requirements of the super long LED display screen.
The height of an ultra-long LED display screen is generally no more than 64 dots. If a 1/16 scan monochrome LED display screen is controlled, the 4-bit data port of the SST26VF016B memory just meets the needs of the data port width of the LED display screen. Figure 2 shows the control timing of the SST26VF016B memory. CS is the chip select terminal of the SST26VF016B memory. All operations on the memory must be performed during the period when CS is low. SCK is the clock line. When in idle mode, the SCK signal can be in a low state (MODE 0) or a high state (MODE 3). SIO (3: 0) is a 4-bit data port. When transmitting data, the high 4 bits of the byte are transmitted first, and then the low 4 bits of the byte are transmitted. From the control timing of the memory, it can be seen that the control of the memory is sent in the order of command word, 24-bit storage address, virtual byte, data byte 0 to data byte N. The command word of the memory can realize functions such as chip erase, sector erase, single-byte read and write, and continuous byte read and write, which can fully meet the requirements of ultra-long LED display screens for memory capacity and control methods.
Figure 2 SST26VF016B memory control timing.
STC12C5616 is a high-speed 1T microcontroller launched by STC. Its clock frequency can reach more than 30 MHz. It integrates a high-speed serial communication interface component (i.e., SPI interface). When the SPI component of STC12C5616 works in master mode, its SPI clock output frequency (fclk) can reach 1/4 times the crystal oscillator frequency (fosc), and its clock phase and clock polarity can be flexibly configured, which not only meets the requirements for SST26VF016B memory control, but also meets the requirements for the clock of the ultra-long LED display.
3. Ultra-long LED display control card circuit design
By utilizing the multi-bit data port memory of the serial Flash memory SST26VF016B and the SPI component of the STC12C5616 microcontroller that can generate a high-speed SCK clock, the display data is bypassed from the serial Flash memory to the LED display screen. The circuit is shown in Figure 3.
Figure 3: Circuit diagram of the extra-long LED display screen control card.
When the dynamic refresh rate of the display reaches 50 times/s, on the 1/16 scan LED display, the display time of one line should be less than 1/50/16 s, that is, 1.25 ms. In the design of the control card, when fosc = 22 MHz, the serial Flash clock frequency fclk = 1/4 fosc = 5.5 MHz, so the time required for 4096 CLK clocks is 4096 × 1/(5.5 × 106) s = 0.744 ms, plus the time for sending memory instructions and addresses using the SQI protocol is also less than 1.25 ms. Therefore, in Figure 3, the external clock of the microcontroller STC12C5616 selects a 22 MHz clock, which can ensure the display of a 4096 ultra-long display screen under the SQI protocol.
The external clock of the microcontroller STC12C5616 selects 22.1184 MHz, which is convenient for precise control of the serial port baud rate; pins P3.0 and P3.1 are UART interfaces, and the communication connection between the control card and the PC is realized through the communication interface chip MAX232 chip; pins P2.0 ~ P2.3 are 4-bit data lines, which are connected to the 4-bit data port of the memory SST26VF016B on the one hand, and connected to the data line of the output interface of the LED unit board after being driven by 74HC245 on the other hand. There are two monochrome LED unit board output interfaces designed on the control card. Interface J1 uses data lines D0 and D1, and interface J2 uses data lines D2 and D3; Pin P1.7 is SPI clock output, and the SPI clock output line is connected to the serial Flash memory SST26VF016B and the clock input of the LED unit board at the same time; Pin P1.4 is the chip select signal of the serial Flash memory SST26VF016B; Pin P3.5 is the data latch signal of the LED unit board; Pin P3.7 is the enable signal output of the LED unit board; Pins P1.0 ~ P1.3 are the row selection signal outputs of the LED unit board; J1 and J2 connectors are used to connect the LED unit board in the height direction of the display screen to meet the 64-point height requirement of the door head screen.
The design of this circuit can flexibly realize three different data access modes between the microcontroller, serial memory and LED unit board, namely:
(1) Normal access between the microcontroller and the memory.
As can be seen from Figure 3, the connection between the microcontroller STC12C5616 and the serial Flash memory SST26VF016B is connected in accordance with the data manual, and normal data access can be achieved. At the same time, the data will also enter the shift register buffer on the LED unit board. However, as long as the data latch RCK on the LED unit board does not receive a valid signal, the data entering the LED unit board is invalid data that is not displayed.
(2) Data communication between the microcontroller and the LED unit board.
Set the MCU pin P1.4 to a high level, that is, invalidate the enable end of the serial Flash memory. At this time, the data port of the memory is in a high-impedance state. The data communication between the MCU and the LED unit board will not be affected by the memory data port, and the MCU data can be output normally to the LED unit board.
(3) Data transmission between the memory and the LED display screen.
First, use the first mode (1). The MCU outputs the command word, storage address and virtual byte to the serial memory first, then sets the data ports P2.0 ~ P2.3 of the MCU to high level, reads the display data from the serial memory through the SPI clock, and enters the LED unit board in "DMA" mode. After reading a row of data, a valid signal is generated on the data latch terminal RCK on the LED unit board, and the row of data can be displayed. When using this mode, be sure to set the pins P2.0 ~ P2.3 of the MCU STC12C5616 to "weak pull-up" mode.
4. Ultra-long LED display display program design
In the hardware circuit design of 1/16 monochrome LED display screen, 74HC595 is connected in direct connection mode. According to the characteristics of direct connection mode, the monochrome display data is optimized and organized in advance, and the organized display data is pre-stored in the serial Flash memory SST26VF016B. As shown in Figure 4, when the microcontroller outputs and displays each line of data, it repeats the order of "output data → send shift pulse → address plus 1". After displaying a line, RCK latches the display and switches the line selection line through ABCD.
Figure 4 1/16 Scanning monochrome F3.75 or F5.0 unit board (64 × 32 dots) connection method.
Taking the LED display screen with 4096 dots in the horizontal direction as an example, the program code for displaying one frame of data is as follows:
woid Display(unsigned long begin_Addr)
{
unsigned char Ln
,Bv = 1;
unsigned int Data_Length,Lw = 4096;
unsigned long Addr;
Data_Length = Bv* Lw
) ;
for (Ln = 0; Ln < 16; Ln + + )
{
Addr = Begin_Addr + Ln* Data_Length;
CS = 0;
SendSQI_Byte(0x0B) ; //send read command
//Send 3 bytes address
SendSQI_Byte((Addr》16)&0xff);
SendSQI_Byte((Addr》8)&0xff);
SendSQI_Byte((Addr&0xff);
SendSQI_Byte((0xff); //send dummy byte
P2 = P2 |0x0f;
SPCTL = 0xd0; // Enable SPI interface
SPDAT = 0xff; //Start the first SPI transmission
Data_Length = (Data_Length 》 3) - 1;
while (Data_Length! = 0)
{ //SPI clock transmits 8 pulses each time
while((SPSTAT&0x80)==0);
SPSTAT = 0x80; // Clear the receive flag
SPDAT = 0xff; // Start SPI transmission
Data_Length -- ;
}
while((SPSTAT&0x80)==0);
SPSTAT = 0x80; // Clear the receive flag
SPCTL = 0x90; //Disable SPI interface
CS = 1; /* disable device */
EN = 0;
RCK = 1; RCK = 0;
PI = ( ( P1 & 0xf0 ) | Ln
) ;
EN = 1;
}
}
When designing the program, the display screen is turned off only when the line is changed to avoid it from producing afterglow, and it is lit at other times. In this program, Bv is the number of groups of 595 used by the data line in the vertical direction; Lw is the number of pixels in the horizontal direction of the LED display screen; Ln is the row number of the data displayed on the current LED display screen. When displaying data, the data output mode of the memory and the LED display screen is adopted. The microcontroller first outputs the "read data" command word "0x0B" to the serial memory, and then outputs the 24-bit address and virtual byte, and then makes the microcontroller data port output a high level, and then the SCK pulse can be output according to the length of the LED display screen. After sending a line of data, the SPI interface is disabled, the RCK latch signal is valid, and it switches to the next line, and continues to output the display data according to the repeated steps.
5 Testing
After testing, the display screen is normal without jitter. The refresh rate is tested with a logic analyzer, as shown in Figure 5 (b). The level width of signal A represents the time required to display one line, and its width is 1.036 16 ms. The time to display one frame is 16 × 1.036 16 ms ≈ 16 ms, so the refresh rate of the LED display screen is 1 / 16 ms = 62.5 Hz. When the refresh rate of the LED display screen is greater than 50 times/s, it can meet the design requirements, so this design can meet the normal display requirements. By testing the SCK signal, as shown in Figure 5 (a), it can be seen that the SCK signal has 8 pulses per group, and the time interval between each group is only 570 ns. This time is mainly consumed in judging the SPI data transmission completion flag and loop control.
Figure 5 LED screen signal test
6 Conclusion
This paper proposes an LED display control system based on multi-port serial Flash memory. The SPI interface of the microcontroller is used to generate a controllable clock, and the display data in the multi-port serial Flash memory is directly output to the ultra-long strip LED display in "DMA" mode.
Its manufacturing cost is low. According to the program in this paper and the timing diagram obtained by the logic analyzer, this method can control a 4 096 × 64 dot matrix monochrome LED display screen, and has a good application prospect in the ultra-long display screen market.
Previous article:LM-80 is not equal to the life of LED lamps/bulbs
Next article:LCD backlight adjustment and driver implementation based on embedded Linux
- 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
- How feasible is it for the United States to skip 5G and go directly to 6G?
- 77 GHz Radar Solutions
- Showing Goods (7) - Open Source Development Board
- New version of IAR installation problems and solutions
- arm assembly instructions WFI and WFE
- IMX6 EK200 RTL8188EUS WIFI AP
- Methods for supporting national encryption algorithms in embedded devices
- Discussion: 5G and the Internet of Things, have they moved your cheese?
- Matlab Machine Learning (English and Chinese subtitles)
- 【NXP Rapid IoT Review】+Preparation for Data Download