한국 고건축의 멋과 전통

해성동기와

공지사항 / Q&A / 갤러리 / 자유게시판

갤러리

갤러리

Optimum Design of SPI System for Output Circuit of LED Large Screen

페이지 정보

작성자 Karry 작성일24-07-09 12:11 조회29회 댓글0건

본문

Transforming the output circuit through the SPI system method can greatly make the original control system meet the requirements of high-speed data output. Although the example given in this article is based on the application of large LED screens, it is also of reference and application significance in LCD or other systems that require high-speed output of data.

In practical application, it is suggested that the original system should be considered to carry out hardware circuit modification first. If the display requirements still cannot be met, then consider replacing the high-speed microprocessor and replacing the output circuit with FPGA/CPLD devices. This paper takes the control circuit of LED large screen as an example, and proposes a method to improve the output speed of display data in the transformation of hardware circuit.

Based on the research of the current LED large screen control circuit, a method to improve the output speed is proposed. The principle and circuit diagram of this method are given in this paper, and the implementation process of data organization and display under different counting methods is discussed. If this method is combined with the transformation of FPGA/CPLD and the use of higher-frequency single-chip microcomputers, the performance of the large-screen control circuit will be further improved. The modified circuit can send display data at a frequency as high as 1/4 of the main frequency of the single-chip microcomputer. The article explains the matters that should be paid attention to when using this method.

Optimizing Principle of Data Output Circuit

According to the display principle of the LED large screen, the process of displaying a data on the LED large screen is divided into two steps: reading the data from the memory and sending it to the LED board for display. This process needs to generate the following control signals: data address sent to memory, memory read signal, latch opening and row signal in LED unit board, SCK shift of HC595, RCK latch, E enable signal, etc. The generation of these necessary signals adds time to the data display process. If the signals can be multiplexed, the delay in this process will be reduced. In the LED display system, the method of storing the display data in the external ROM/RAM by row is an example. This method sets the high bit of the memory and connects it to the row control line of the LED. The data is stored by row, and after being sent to the data address, the data is read by row, and the row control signal is turned on at the same time. The following signal multiplexing scheme is also based on a similar principle.

Optimum Design of SPI System for Output Circuit of LED Large Screen

When examining the MOVX command for reading external memory, it is found that the read signal (RD # ) can be generated when the command is executed, that is, not only does it not need to generate a read signal (RD # ) when reading the external memory, but this signal can also be supplied to the lock The register 74HC273 and the shift signal SCK on the LED board are used. It should be noted here that the SCK signal is sent out after the data is read, so the RD # signal cannot be directly used as the SCK signal, and must be delayed (the minimum delay must be slightly greater than the read and write time tRC of the RAM and the data of the 74HC273 latch delay tTL sum of H).

However, when continuously reading a block of memory data, it is necessary to generate new addresses through the program and assign them to the data port, and these addresses are all sequentially changed. Based on this feature, a counter circuit is designed to store the initial address when reading data, and the data can be continuously read out as long as the stored address of the counter is sequentially increased by using the externally supplied pulse.

The ALE pin of the single-chip microcomputer or the working mode of the serial port will also generate pulses of a certain frequency, but the pulse frequency generated in the SPI mode is not as high, and the use of these two methods has certain restrictions, and it is more convenient to start the SPI mode. Serial Peripheral Interface (Serial Peripheral Interface, SPI) bus system is a synchronous serial peripheral interface, which was first defined by Motorola on its MC68HCXX series processors. The SPI system has 4 I/O pins, which are serial clock SPSCK, master input/slave output data line MISO, master output/slave input data line MOSI and low effective slave selection data line SS.SP2SCK for Synchronous data is transferred from the MOSI input and the MISO output. Through the setting of the SPI control register SPCR, the frequency of SPSCK can reach 1/4 of the oscillator frequency ( fOSC ) at the highest.

Because the SPI mode can easily generate the advantages of higher frequency pulses, that is, SPSCK is used as the pulse of the counter, and the counter is used to generate continuously changing addresses for the memory to realize high-speed readout of data. And the SPSCK signal can be used as the SCK shift signal for the LED at the same time after conversion and delay processing.

Optimum Design of SPI System for Output Circuit of LED Large Screen

The implementation process of SPI application

From the above, we can get the inspiration: in the design of LED control circuit, the data can be read by means of SPI mode, that is, adding a piece of FLASH memory in SPI mode, on the one hand, important files can be saved, on the other hand, the data generated by SPSCK can be used The signal, through the counter circuit, realizes high-speed reading of data from the memory, and multiplexes this signal to generate a control signal for screen display. After the first address of the output data is given and the SPI is started, this method enables the process of data readout to screen display to be carried out automatically, and the full hardware method of the same signal source greatly reduces the connection when generating each control signal separately in the past delay. Figure 3 is an example of the application of SPI in the 62.5mm Soft LED Mesh Curtain large screen control circuit.

Optimum Design of SPI System for Output Circuit of LED Large Screen

The number of cascaded counters is determined according to the capacity of RAM, that is, the number of address lines. The microprocessor is connected to the SPI serial memory through the driver, and the driver can choose 7407 or 7417 models. RM_MODE is used to distinguish different read and write operation modes. When RM_MODE = 1, it is a common way to read and write external memory. When RM_MODE = 0, the host can be used as the master device, and the serial FLASH memory can be used as the slave device. The two communicate through SPI. The SPSCK signal performs high-speed read data operations on the memory. At the same time, the SPSCK signal can be used as the SCK shift signal for the LED after conversion and delay processing. At the input end of the counting pulse, jumpers can be used to select the addition and subtraction methods. When the pulse is connected to the UP terminal of the counter, it is the counting up mode, and when it is connected to the DOWN, it is the counting down mode. Figure 3 can also be expanded and connected to multiple sets of counters and multiple sets of RAM.

The use of the down counter method greatly enhances the flexibility of data output. In the LED large-screen display, the addition and subtraction counters are used together to double the display length of the output data of the same control card. When using the down counter method, in order to be consistent with the graphics displayed on the large LED screen when using the up mode, the data of the RAM connected to the down counter must be exchanged between the upper and lower half screens, and the output must be in the program. To change the starting point of the data, the given row control signal (RCK) should also be processed in reverse order (see Figure 4).

Optimum Design of SPI System for Output Circuit of LED Large Screen

Precautions when using this method

When using this method, please pay attention that the reading and writing speed of the counter and RAM chip must match the SPSCK. The rate of the SPI method is relatively high, and the higher the reading speed of each device in the circuit, the smaller the probability of data error.

In addition, there are other reasons that may cause errors in reading data. For example, improper software programming causes the data address to exceed the RAM space, and the circuit design does not pay attention to the impact of heat generation on peripheral devices and wiring when the counter is operating at high speed.

When using the SPSCK signal to read the external memory, overflow errors in SPI master and slave modes will also occur, that is, when multiple data are continuously transmitted, the latter data overwrites the previous data. The reason for this error is that the transfer flag SPIF of the slave device has a certain lag relative to the transfer flag SPIF master of the master device. When the master device continuously sends data, it will cause the transfer flag of the slave device and the next data of the master device. The transfer flags are overlapped, and using SPSCK to trigger the counter to increase the address to read data, the first received data will also be overwritten.

This transmission error can be improved by means of software and hardware. In the design of this article, the following solution is adopted in the software writing: first start the SPI mode, and then enter the counter to read the parallel RAM, wasting a sequence. Or when storing data in RAM, all of them are stored in the last address unit, and then the pulse generated by SPI is used to read RAM, and the correct data can be obtained.

Theoretically, the method in this paper can make the output speed of display data as high as 1/4 of fOSC, but it is limited by the parameters of output circuit devices such as RAM and latches in practice. The rate setting of SPSCK should be determined according to the parameters of the selected RAM, that is, it should meet the minimum address valid time and data valid time requirements of the RAM.

Optimum Design of SPI System for Output Circuit of LED Large Screen

In the context of increasing data output speed requirements for large LED screens and other display systems, in the current process of transforming control equipment, the preferred method is to replace the microprocessor with a higher speed, and it is often easy to tap the potential of the hardware circuit. ignored.

댓글목록

등록된 댓글이 없습니다.

Copyright ⓒ 2016 동기와.한국/해성동기와.한국 All Rights Reserved.