SPI-based rapid screen refreshing system and method

By multiplexing the SPI interface in the MCU, setting different driving modes for FLASH and TFTs can be achieved, and full duplex transmission is solved, which solves the problem of TFT refresh speed under the MCU cost limit. The use of cheap MCUs can achieve high-performance TFT refresh, which reduces the Cost and improve development efficiency.

CN119066012APending Publication Date: 2024-12-03SHENZHEN NUOTIANHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411100974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, the TFT refresh speed is limited by the cost and function of the MCU, especially when high-priced MCUs with DMA function is not used, the TFT refresh speed cannot be effectively improved.

Method used

Using a fast screen refresh system based on SPI, multiplexed the SPI interface in the MCU, setting different modes and levels for FLASH and TFT drivers respectively to realize full duplex transmission, ensuring that data is directly transmitted from FLASH to TFT. Avoid the process of MCU handling data.

Benefits of technology

The use of cheap MCUs enables SPI full bandwidth transmission, improves the TFT refresh rate, reduces costs, and improves development efficiency, adapts to ordinary SPI and DMA transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066012A_ABST
    Figure CN119066012A_ABST
Patent Text Reader

Abstract

The invention discloses a rapid screen refreshing system and method based on an SPI, and belongs to the field of single-chip microcomputer application. The system comprises an MCU (Microprogrammed Control Unit), a FLASH and a TFT (Thin Film Transistor), a group of SPIs (Serial Peripheral Interface) in the MCU are used as a FLASH driver and are respectively marked as FLASH-CLK, FLASH-MOSI, FLASH-MISO and FLASH-CS; an MOSI pin with the same SPI is used as a TFT (Thin Film Transistor) driver and is recorded as TFT-MOSI, and the TFT-MOSI is physically connected with the FLASH-MISO; and the FLASH-CLK is in physical connection with the TFT-CS. The low-cost MCU is used, SPI full-bandwidth transmission can be achieved no matter whether DMA is carried or not, the low-cost MCU is used for driving the TFT, the effect that the high-performance MCU drives the TFT is achieved, and therefore the TFT refresh rate is guaranteed while the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of single-chip microcomputer applications, and in particular relates to a fast screen refreshing system and method based on SPI. Background Art

[0002] In the TFT refresh project with SPI (serial peripheral interface) type, due to cost constraints, a faster MCU (microcontroller) cannot be used to increase the refresh speed of the TFT;

[0003] According to the SPI protocol, 4 lines are needed to control SPI data transmission, namely: SCK, MOSI, MISO, CS; SCK is the clock, MOSI is the host data transmission line, MISO is the host data reception line, CS is the device chip select line, and the time used for SPI to transmit N bytes of data is T;

[0004] There are currently two ways to drive TFT+FLASH (memory chip) on the market:

[0005] 1: TFT and FLASH share a SPI. MCU reads FLASH data first, and then uses the read data to refresh the screen. Since the whole process requires MCU to move data, the time used is 2.5T;

[0006] 2: TFT uses one SPI, FLASH uses one SPI, MCU reads FLASH data first, and then refreshes the screen with the read data. The whole process takes 2T; if the MCU has DMA (direct memory access) function, then through the end-to-end function of DMA, SPI full bandwidth transmission can be achieved, that is, the time taken is T; but this kind of MCU is generally more expensive. Summary of the invention

[0007] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a fast screen refresh system and method based on SPI, which solves the problems in the prior art.

[0008] The purpose of the present invention can be achieved through the following technical solutions:

[0009] A fast screen refresh system based on SPI includes MCU, FLASH and TFT. A group of SPI in the MCU is used as FLASH driver, which are respectively recorded as FLASH-CLK, FLASH-MOSI, FLASH-MISO and FLASH-CS.

[0010] A MOSI pin of the same SPI is used as a TFT driver, recorded as TFT-MOSI, and TFT-MOSI is physically connected to FLASH-MISO; FLASH-CLK is physically connected to TFT-CS.

[0011] Furthermore, the MCU is a 32-bit MCU with SPI.

[0012] Furthermore, when FLASH is driven solely through SPI, the steps for fast screen refresh are:

[0013] Set TFT-MOSI to floating input state;

[0014] Set SPI to full-duplex mode;

[0015] Set FLASH-CLK, FLASH-MOSI, FLASH-MISO to SPI mode;

[0016] Set FLASH-CS to low level to drive FLASH via SPI.

[0017] Furthermore, when the TFT is driven solely by SPI, the steps for fast screen refresh are:

[0018] Set TFT-MOSI and FLASH-CLK to SPI mode;

[0019] Set FLASH-MOSI and FLASH-MISO to floating mode;

[0020] Set TFT-CS to low level to drive TFT via SPI.

[0021] Furthermore, when the data in FLASH is refreshed into TFT, the steps of fast screen refresh are:

[0022] First, set each SPI IO port to drive TFT mode individually;

[0023] Set TFT-CS to low level;

[0024] Set the refresh parameters of TFT through TFT-MOSI;

[0025] Set TFT-CS to high level to suspend data transmission to TFT;

[0026] Set SPI to single-drive FLASH mode again, and set FLASH-CS to low level;

[0027] Set FLASH to read state;

[0028] Set the RS pin of TFT to high level;

[0029] Read data through FLASH-MISO.

[0030] A fast screen refresh method uses the above-mentioned SPI-based fast screen refresh system. When the FLASH is driven solely by SPI, the steps of fast screen refresh are as follows:

[0031] Set TFT-MOSI to floating input state;

[0032] Set SPI to full-duplex mode;

[0033] Set FLASH-CLK, FLASH-MOSI, FLASH-MISO to SPI mode;

[0034] Set FLASH-CS to low level to drive FLASH via SPI.

[0035] Furthermore, when the TFT is driven solely by SPI, the steps for fast screen refresh are:

[0036] Set TFT-MOSI and FLASH-CLK to SPI mode;

[0037] Set FLASH-MOSI and FLASH-MISO to floating mode;

[0038] Set TFT-CS to low level to drive TFT via SPI.

[0039] Furthermore, when the data in FLASH is refreshed into TFT, the steps of fast screen refresh are:

[0040] First, set each SPI IO port to drive TFT mode individually;

[0041] Set TFT-CS to low level;

[0042] Set the refresh parameters of TFT through TFT-MOSI;

[0043] Set TFT-CS to high level to suspend data transmission to TFT;

[0044] Set SPI to single-drive FLASH mode again, and set FLASH-CS to low level;

[0045] Set FLASH to read state;

[0046] Set the RS pin of TFT to high level;

[0047] Read data through FLASH-MISO.

[0048] An image display device comprises the above-mentioned fast screen refreshing system.

[0049] Beneficial effects of the present invention:

[0050] 1. The present invention uses a cheap MCU, whether or not it has DMA, to achieve full SPI bandwidth transmission, and uses a cheap MCU to drive TFT to achieve the effect of a high-performance MCU driving TFT, thereby reducing costs while ensuring the TFT refresh rate;

[0051] 2. The system of the present invention can be adapted to common SPI, SPI with DMA transmission, and simulated SPI, which greatly improves the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 It is a structural schematic diagram of the fast screen refreshing system based on SPI of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Example 1

[0056] like Figure 1 As shown, a fast screen refresh system based on SPI includes MCU, FLASH and TFT; the GPIO ports of MCU all have multiplexing functions, that is, the same GPIO port has different functions;

[0057] In this embodiment, the MCU is a 32-bit MCU with SPI, and a group of SPI in the MCU is used as a FLASH driver, wherein SPI-CLK is recorded as FLASH-CLK, SPI-MOSI is recorded as FLASH-MOSI, SPI-MISO is recorded as FLASH-MISO, and FLASH-CS is the enable control pin of FLASH;

[0058] A MOSI pin of the same SPI is used as a TFT driver, recorded as TFT-MOSI; and TFT-MOSI and FLASH-MISO are physically connected; FLASH-CLK is physically connected to TFT-CS.

[0059] Example 2

[0060] In this embodiment, a method for performing a fast screen refresh using the fast screen refresh system described in Embodiment 1 is disclosed, specifically comprising:

[0061] 1. When FLASH is driven by SPI alone, the fast screen refresh method includes:

[0062] ① Set TFT-MOSI to floating input state;

[0063] ②Set SPI to full-duplex mode;

[0064] ③Set FLASH-CLK, FLASH-MOSI, FLASH-MISO to SPI mode;

[0065] ④ Set FLASH-CS to low level to drive FLASH through SPI.

[0066] The transmission speed at this time is T.

[0067] 2. When driving TFT alone via SPI, the fast screen refresh method includes:

[0068] ①Set TFT-MOSI and FLASH-CLK to SPI mode;

[0069] ②Set FLASH-MOSI and FLASH-MISO to floating mode;

[0070] ③ Set TFT-CS to low level to drive TFT via SPI.

[0071] The transmission speed at this time is T.

[0072] 3. When refreshing the data in FLASH into TFT, the fast screen refreshing method includes:

[0073] ① First set each SPI IO port to drive TFT mode individually;

[0074] ②Set TFT-CS to low level;

[0075] ③Set the refresh parameters of TFT through TFT-MOSI;

[0076] ④ Set TFT-CS to high level and suspend data transmission to TFT;

[0077] ⑤ Set SPI to drive FLASH mode alone and set FLASH-CS to low level;

[0078] ⑥Set FLASH to read state;

[0079] ⑦ Set the RS pin of TFT to high level, that is, set it to data transmission mode;

[0080] ⑧Read data through FLASH-MISO;

[0081] In the process of reading data, because TFT-MOSI and FLASH-MISO are physically connected, the data in FLASH can be directly transferred to TFT without passing through MCU, so the transmission speed is T.

[0082] In summary, in the above three cases, the transmission speed is T. Compared with the two TFT+FLASH driving methods currently on the market, the refresh speed of TFT is improved without using an expensive MCU (MCU with DMA function).

[0083] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0084] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A fast screen refresh system based on SPI, including MCU, FLASH and TFT, characterized in that: A group of SPI in the MCU is used as FLASH driver, which are respectively recorded as FLASH-CLK, FLASH-MOSI, FLASH-MISO and FLASH-CS; A MOSI pin of the same SPI is used as a TFT driver, recorded as TFT-MOSI, and TFT-MOSI is physically connected to FLASH-MISO; FLASH-CLK is physically connected to TFT-CS.

2. The SPI-based fast screen refresh system according to claim 1, characterized in that: The MCU is a 32-bit MCU with SPI.

3. The SPI-based fast screen refresh system according to claim 1, characterized in that: When FLASH is driven solely through SPI, the steps for fast screen refresh are: Set TFT-MOSI to floating input state; Set SPI to full-duplex mode; Set FLASH-CLK, FLASH-MOSI, FLASH-MISO to SPI mode; Set FLASH-CS to low level to drive FLASH via SPI.

4. The SPI-based fast screen refresh system according to claim 1, characterized in that: When the TFT is driven solely by SPI, the steps for fast screen refresh are: Set TFT-MOSI and FLASH-CLK to SPI mode; Set FLASH-MOSI and FLASH-MISO to floating mode; Set TFT-CS to low level to drive TFT via SPI.

5. The SPI-based fast screen refresh system according to claim 1, characterized in that: When the data in FLASH is refreshed into TFT, the steps of fast screen refresh are: First, set each SPI IO port to drive TFT mode individually; Set TFT-CS to low level; Set the refresh parameters of TFT through TFT-MOSI; Set TFT-CS to high level to suspend data transmission to TFT; Set SPI to single-drive FLASH mode again, and set FLASH-CS to low level; Set FLASH to read state; Set the RS pin of TFT to high level; Read data through FLASH-MISO.

6. A fast screen refreshing method, using the SPI-based fast screen refreshing system according to claim 1 or 2, characterized in that: When FLASH is driven solely through SPI, the steps for fast screen refresh are: Set TFT-MOSI to floating input state; Set SPI to full-duplex mode; Set FLASH-CLK, FLASH-MOSI, FLASH-MISO to SPI mode; Set FLASH-CS to low level to drive FLASH via SPI.

7. A fast screen refreshing method according to claim 6, characterized in that: When the TFT is driven solely by SPI, the steps for fast screen refresh are: Set TFT-MOSI and FLASH-CLK to SPI mode; Set FLASH-MOSI and FLASH-MISO to floating mode; Set TFT-CS to low level to drive TFT via SPI.

8. A fast screen refreshing method according to claim 6, characterized in that: When the data in FLASH is refreshed into TFT, the steps of fast screen refresh are: First, set each SPI IO port to drive TFT mode individually; Set TFT-CS to low level; Set the refresh parameters of TFT through TFT-MOSI; Set TFT-CS to high level to suspend data transmission to TFT; Set SPI to single-drive FLASH mode again, and set FLASH-CS to low level; Set FLASH to read state; Set the RS pin of TFT to high level; Read data through FLASH-MISO.

9. An image display device, characterized in that: A fast screen refreshing system comprising any one of claims 1-5.