In the application of LED display screen, ultra long strip LED screen is a very wide form, which is characterized by “extremely long” length and narrow width. At present, there is no clear definition of ultra long LED display screen. It is more appropriate to define the number of points in its horizontal direction as ≥ 2048.

Taking the ultra long strip LED display screen composed of 1 / 4 scanning P10 unit board (point spacing 10 mm) as an example, when the number of points in the horizontal direction is 2048, its physical size in the horizontal direction is 20.48 M. the number of points in the width (vertical direction) of LED screen is generally 16, 24 and 32 points, no more than 64 points at most. In application, it is mainly Chinese characters that can display a line of various fonts. In order to ensure the refresh rate, in the control of ultra long LED display, it is required to send more data within the specified time. It is difficult for ordinary LED display control card to meet the control requirements.

Based on the analysis of various existing strip LED display unit board circuits, an LED display control system based on multi port serial flash memory is proposed in this paper. The SPI interface of single chip microcomputer is used to generate a controllable clock, and the display data in multi port serial flash memory is directly output to ultra long strip LED display screen in “DMA” mode.

1. Connection mode of internal serial shift register of common unit board

Figure 1 shows three connection modes of internal serial shift registers of common unit boards. Figure 1 (a) shows the connection relationship between the unit board 74HC595 and the LED light emitting tube dot matrix and the simplified representation circuit. The serial shift register used inside the LED display unit board is generally 74HC595, mbi5026 or mbi5026 compatible chip, and mbi5026 can be regarded as composed of two 74HC595 cascades, which is a constant current source driving mode, which is more suitable for LED driving.

Figure 1 (b), (c) and (d) show the connection modes of P10, p16, f3.75 or f5.0 unit boards respectively.

Circuit design of control card based on an ultra long LED display screen

Fig. 1 connection mode of internal serial shift register of three common unit boards

2 problems and solutions of ultra long LED display

At present, a large number of door screen (strip LED display) in the market is the most widely used form of LED display. Technically, the number of points in the horizontal direction of the door head screen ranges from 256 points to thousands of points, and the height generally does not exceed 64 points. With the improvement of market demand and display accuracy, the demand for ultra long LED display with thousands of points is increasing. Ordinary LED display control card is difficult to meet the requirements of refresh rate. Take f3.75 LED display with 4096 pixels in length as an example, set the refresh rate as 60 Hz, and its SCK clock cycle is at least 106 / 60 / 16 / 4096 = 0.254 μ s = 254 ns.

There are two methods to solve the data output of ultra long LED display screen: one is to select high-performance embedded processor and FPGA chip, which has high cost of control card; The second is to skillfully apply the special functional components on the single chip microcomputer and optimize the data organization algorithm, which has a very low cost. The second method is adopted in this paper. The data is pre written into the multi port serial flash memory sst26vf016b through the optimization algorithm. The SPI component of stc12c5616 single chip microcomputer is used to generate a high-speed controllable SCK clock, and the display data in the multi port serial flash memory is directly output to the ultra long strip LED display screen in “DMA” mode, Meet the display requirements of ultra long LED display.

The height of ultra long LED display screen generally does not exceed 64 points. If 1 / 16 scanning monochrome LED display screen is controlled, the 4-bit data port of sst26vf016b memory just meets the needs of LED display screen data port width. Figure 2 shows the control sequence of sst26vf016b memory, CS is the chip selection end of sst26vf016b memory, and all operations on the memory shall be carried out when CS is low level; SCK is a clock line. When in idle mode, SCK signal can be in low level state (mode 0) or high level state (mode 3); SiO (3:0) is a 4-bit data port. During data transmission, the upper 4 bits of the byte are transmitted first, and then the lower 4 bits of the byte are transmitted. It can be seen from the control timing of the memory 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 the functions of chip erase, sector erase, single byte read-write, continuous byte read-write and so on, which can fully meet the requirements of ultra long LED display screen for memory capacity and control mode.

Circuit design of control card based on an ultra long LED display screen

Fig. 2 control sequence of sst26vf016b memory.

Stc12c5616 is a high-speed 1t single chip microcomputer launched by STC company. The 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 the main mode, its SPI clock output frequency (fclk) can reach 1 / 4 times of the crystal oscillator frequency (FOSC), and its clock phase and clock polarity can be flexibly configured to meet the requirements of sst26vf016b memory control and the clock requirements of ultra long LED display screen.

3 circuit design of super long LED display control card

The multi bit data port memory of the serial flash memory sst26vf016b and the SPI component of the stc12c5616 single chip microcomputer can generate a high-speed SCK clock to bypass the display data from the serial flash memory to the LED display screen. The circuit is shown in Figure 3.

Circuit design of control card based on an ultra long LED display screen

Fig. 3 circuit diagram of super long LED display control card.

When the dynamic refresh rate of the display screen reaches 50 times / s, the display time of one line on the 1 / 16 scanned LED display screen shall be less than 1 / 50 / 16 S, i.e. 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, and the time after sending memory instructions and addresses using SQI protocol is also less than 1.25 Ms. therefore, in Figure 3, the 22 MHz clock is selected for the external clock of single chip microcomputer stc12c5616, which can ensure the display of 4096 ultra long display screen under SQI protocol mode.

The external clock of single chip microcomputer stc12c5616 is 22.118 4 MHz, which is convenient for the accurate control of 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; Pins p2.0 ~ p2.3 are 4-bit data lines. On the one hand, the data line is connected to the 4-bit data port of memory sst26vf016b, and on the other hand, it is driven by 74hc245 and connected to the data line of LED unit board output interface. Two monochrome LED unit board output interfaces are designed on the control card. The interface J1 uses data lines d0 and D1, and the 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 clock input of serial flash memory sst26vf016b and LED unit board at the same time; Pin P1.4 is the chip selection signal of serial flash memory sst26vf016b; Pin p3.5 is the data latch signal of LED unit board; Pin P3. 7 is the enable signal output of LED unit board; Pins P1.0 ~ p1.3 are row selection signal output of LED unit board; J1 and J2 connectors are used to connect the LED unit board of the display screen in the height direction to meet the 64 point height requirements of the door head screen.

The circuit design can flexibly realize three different data access modes among single chip microcomputer, serial memory and LED unit board, which are:

(1) Normal access between MCU and memory.

As can be seen from Figure 3, the connection between the single chip microcomputer stc12c5616 and the serial flash memory sst26vf016b is connected with reference to the data manual, which can realize normal data access. At the same time, the data will also enter the shift register buffer on the LED unit board, but as long as the data latch RCK on the LED unit board does not get a valid signal, The data entering the LED unit board is invalid data that is not displayed.

(2) Data communication between MCU and LED unit board.

Set the MCU pin P1.4 to the high level, that is, the enable end of the serial flash memory is invalid. At this time, the data port of the memory is in a high resistance state. The data communication between the MCU and the LED unit board will not be affected by the memory data port, and the data of the MCU can be normally output to the LED unit board.

(3) Data transfer between memory and LED display.

Firstly, the (1) mode is adopted. The single chip microcomputer first outputs the command word, storage address and virtual bytes to the serial memory, then sets all the data ports p2.0 ~ p2.3 of the single chip microcomputer to the high level, reads the display data from the serial memory through the SPI clock, and enters the LED unit board in the “DMA” mode. After reading a line of data, This line of data can be displayed by generating a valid signal on the data latch end RCK on the LED unit board. When using this mode, be sure to set pins p2.0 ~ p2.3 of MCU stc12c5616 to “weak pull-up” mode.

4 program design of ultra long LED display screen

In the hardware circuit design of 1 / 16 monochrome LED display screen, 74HC595 is connected in straight through mode. According to the characteristics of the through mode, the monochrome display data is optimized and organized in advance, and the organized display data is stored in the serial flash memory sst26vf016b in advance. As shown in Figure 4, when the single chip microcomputer outputs and displays each line of data, it is repeated in the order of “output data → send shift pulse → address plus 1”. After one line is displayed, RCK latches and displays, and switches the line strobe line through ABCD.

Circuit design of control card based on an ultra long LED display screen

Figure 4 1 / 16 scanning monochrome f3.75 or f5.0 unit board (64 × 32 points) connection mode.

Taking the number of horizontal points of LED display screen as 4096 points 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) ; / / Read command

// send 3 byte address

SendSQI_ Byte( ( Addr 》 16) &0xff) ;

SendSQI_ Byte( ( Addr 》 8) &0xff) ;

SendSQI_ Byte( ( Addr&0xff) ;

SendSQI_ Byte( ( 0xff) ; / / Send virtual byte

P2 = P2 |0x0f;

SPCTL = 0xd0; / / Allow SPI interface

SPDAT = 0xff; / / Start the 1st SPI transmission

Data_ Length = ( Data_ Length》 3) – 1;

while( Data_ Length! = 0)

{/ / SPI clock transmits 8 pulses at a time

while( ( SPSTAT&0x80) == 0) ;

SPSTAT = 0x80; / / Clear receiving mark

SPDAT = 0xff; / / Start SPI sending

Data_ Length — ;

}

while( ( SPSTAT&0x80) == 0) ;

SPSTAT = 0x80; / / Clear receiving mark

SPCTL = 0x90; / / Disable SPI interface

CS = 1; /* disable devicce * /

EN = 0;

RCK = 1; RCK = 0;

PI = ( ( P1&0xf0) | Ln

) ;

EN = 1;

}

}

When designing the program, only turn off the display screen during line feed to avoid afterglow, and light up the rest of the time. In this program, BV is the number of groups in which 595 data lines are used in the vertical direction; LW is the number of pixels in the horizontal direction of LED display screen; Ln is the data line number displayed on the current LED display. When displaying data, the data output mode of memory and LED display screen is adopted. The single chip microcomputer first outputs the “read data” command word “0x0b” to the serial memory, then outputs 24 bit address and virtual bytes, and then makes the single chip microcomputer data port output high level. SCK pulse can be output according to the length of LED display screen. After sending a line of data, the SPI interface is prohibited, the RCK latch signal is valid, switch to the next line, and continue to output the display data according to the repeated steps.

5 test

After the test, the display screen is normal without jitter. The logic analyzer is used to test its refresh rate. As shown in Figure 5 (b), the level width of signal a represents the time required to display 1 line, its width is 1.036 16 ms, and the time to display 1 frame is 16 Ms × 1. 036 16 ms ≈ 16 ms, so the refresh rate of LED display screen is 1 / 16 Ms = 62.5 Hz. When the refresh rate of 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 one group every 8 pulses, and the time interval between each group is only 570 ns, which is mainly consumed in judging the SPI data transmission completion flag and cycle control.

Circuit design of control card based on an ultra long LED display screen

Figure 5 LED screen signal test

6 Conclusion

This paper presents an LED display control system based on multi port serial flash memory. Using the SPI interface of single chip microcomputer to generate a controllable clock, the display data in multi port serial flash memory is directly output to ultra long strip LED display screen in “DMA” mode.

Its manufacturing cost is low. According to the program in this paper and the sequence diagram obtained by the logic analyzer, this method can control 4096 × 64 dot matrix monochrome LED display has a good application prospect in the ultra long display market.

Responsible editor; zl

Leave a Reply

Your email address will not be published. Required fields are marked *