Scanning control device and scanning control method for touch panel and touch chip
Through the two-level analysis scanning control scheme, the control signal generation circuit of the touch chip is simplified, and flexible scanning strategy adjustment for various touch modes is realized, which solves the problems of insufficient complexity and flexibility of scanning control in the existing technology and improves the accuracy and adaptability of scanning control.
Patent Information
- Application Number
- CN202511189631.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-25
AI Technical Summary
The existing touch chip scanning control method is difficult to achieve flexible scanning strategy adjustment when facing multiple touch modes, resulting in complex and inflexible design of the control signal generation circuit, which cannot meet the compatibility requirements of diverse scenarios.
A two-level parsing scanning control scheme is adopted. The microprocessor selects the scanning scheme, the descriptor parser parses the descriptor linked list to generate a scanning task sequence, and the control signal generating circuit generates the scanning control signal, which simplifies the control signal generating circuit structure.
It realizes flexible configuration of scanning schemes, simplifies the control signal generation circuit, can dynamically adjust the scanning strategy to meet the complex scene requirements of different touch methods, and improves the accuracy and flexibility of scanning control.
Smart Images

Figure CN120669876A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of touch panel control, and in particular to a scanning control device, a scanning control method and a touch chip for a touch panel. Background Art
[0002] Touch display devices are widely used in applications such as tablet computers and in-vehicle displays. They have both display and touch functions. Touch panels can support multiple touch modes, such as convenient finger touch and high-precision active capacitive pen operation, to meet users' diverse input needs in different scenarios.
[0003] When using an active capacitive stylus, the touch chip and the stylus communicate bidirectionally. After receiving the uplink signal, the stylus sends a downlink signal to the touch chip at a specified time. The touch chip demodulates the received data packet to obtain information such as the stylus's pressure sensing value, button status, and battery status. Different capacitive stylus protocols have different arrangements for uplink and downlink time slots. In the case of mixed touch using a finger and an active capacitive stylus, the scanning phase for the capacitive stylus and the scanning phase for the finger touch need to be combined. The scanning strategy also needs to be dynamically adjusted as the stylus approaches, contacts, and leaves the touch panel. To support the touch panel's various touch modes, high requirements are placed on the touch chip's scanning control complexity and timing accuracy.
[0004] In existing touch-control chips, two common scan control methods exist. The first utilizes the microcontroller unit (MCU) within the touch-control chip, using a timer to generate a timed interrupt. The MCU activates the touch-control scanning circuit within the interrupt request program code to generate a scan signal. However, because the MCU also performs signal processing and computation, it cannot respond to the timed interrupt in a timely manner. The second method utilizes digital circuits to implement a fixed scan sequence for the entire scan strategy within a finite state machine, achieving precise timing. However, directly generating a fixed scan sequence for the entire scan strategy results in an overly complex and inflexible design for the control signal generation circuit, making it difficult to adapt to scenarios requiring flexible modification of the scan scheme. Summary of the Invention
[0005] In view of the above problems, the purpose of the present invention is to provide a scanning control device, a scanning control method and a touch chip for a touch panel, wherein the scanning scheme is analyzed at two levels to respectively realize time slot control and generate scanning control signals in the scanning phase and the non-scanning phase, so as to flexibly configure the scanning scheme and simplify the circuit structure of the control signal generating circuit.
[0006] According to one aspect of the present invention, a scanning control device for a touch panel is provided, comprising: a microprocessor, which selects a scanning scheme according to a touch state; a descriptor parser, connected to the microprocessor, and configured to parse a descriptor linked list according to the scanning scheme to generate a scanning task sequence; and a control signal generating circuit, connected to the descriptor parser, and configured to parse the scanning task sequence to generate a scanning control signal.
[0007] Optionally, the descriptor linked list includes multiple descriptors connected in series through address pointers, and the multiple descriptors are selected from any one of the following: a time control descriptor, used to define the time slots of the scanning phase and the non-scanning phase; a touch scanning descriptor, used to define the scanning task sequence; a process control descriptor, used to execute branch control of different scanning modes.
[0008] Optionally, the descriptor linked list adopts a word-aligned linear address layout, each descriptor consists of 1-4 consecutive 32-bit words, and the first word contains a 4-bit descriptor type field and an interrupt enable flag.
[0009] Optionally, the descriptor parser includes: a finite state machine, for sequentially reading and parsing the descriptor linked list; a counter, including a down-counting counter and an up-counting counter, for performing down-timing or up-timing according to the time control descriptor.
[0010] Optionally, the time control descriptor includes a timing descriptor, a delay descriptor and a wait descriptor, the down-counting counter loads the initial value corresponding to the load data in the timing descriptor and starts counting down to realize downward timing, and the next initial value is not reloaded until the count value is zero, and the descriptor parser executes the parsing of the next descriptor after the down-counting counter is loaded with the initial value each time, so as to realize the time slot control of the scanning phase and the non-scanning phase; the delay descriptor is used to insert a predetermined delay between adjacent scanning phases, and the up-counting counter is counted when the delay descriptor starts to be executed. The counter starts counting up from zero until it reaches a first preset value, returns a signal indicating that the delay is completed, and the descriptor parser proceeds to parse the next descriptor; the counter counting up starts counting up from zero while the waiting descriptor starts to execute, so as to realize upward timing, and stops counting when it receives a trigger from an external event, returns a signal indicating that the waiting is successful, and the descriptor parser proceeds to parse the next descriptor; or the counter counting up still does not receive a trigger from an external event when the count value reaches a second preset value corresponding to the load data in the waiting descriptor, returns a signal indicating that the waiting is timed out, and the descriptor parser proceeds to parse the next descriptor.
[0011] Optionally, the flow control descriptor includes: a termination descriptor, used to instruct the descriptor parser to stop parsing and trigger an interrupt; and a comparison descriptor, used to compare the value of a specified address in the data address space with a preset threshold, and select the address pointer of the next descriptor according to the comparison result to realize a branch jump.
[0012] Optionally, the touch scan descriptor includes: a task field for defining a scan task sequence; an increment field for instructing the control signal generating circuit to automatically increment the scan sequence number and continuously execute multiple scan commands according to the same scan mode; and a shared field for indicating shared setup time and / or recovery time between adjacent scan stages.
[0013] Optionally, multiple scanning tasks are defined in the task field, and each scanning task includes: a scanning mode subfield, used to define any one of the following basic scanning modes: active pen row scanning, active pen column scanning, active pen noise scanning, finger row scanning, finger column scanning, finger noise scanning, finger group scanning, active pen uplink sending, short circuit detection scanning; a scanning sequence number subfield, used to define the touch electrode group number corresponding to the scanning command; and a scanning behavior subfield, used to define any one of the following scanning behaviors: capacitance compensation value preparation, capacitance compensation value update, and scan execution.
[0014] Optionally, the control signal generating circuit includes: a channel selection signal generating module, which is used to generate a channel selection signal of the multiplexer according to the scanning task sequence; an integral control signal generating module, which is used to generate an integral control signal of the analog front-end circuit, control the charging and discharging of the capacitor, so as to realize the conversion of charge to voltage; a capacitor compensation preparation module, which is used to read and preload the compensation value from the capacitor compensation value address space before executing the scanning command; a capacitor compensation update module, which is used to latch the preloaded compensation value to the capacitor compensation module at the beginning of the scanning task; and a data statistics storage module, which is used to write the detection data output by the analog-to-digital converter of the analog front-end circuit into the detection data storage address space and perform statistical operations.
[0015] According to another aspect of the present invention, a scanning control method for a touch panel is provided, comprising: selecting a scanning scheme according to the touch state of the touch panel; obtaining a descriptor linked list according to the scanning scheme, and performing a first-level parsing of the descriptor linked list to generate a scanning task sequence; and performing a second-level parsing of the scanning task sequence to generate a scanning control signal.
[0016] Optionally, the descriptor linked list includes multiple descriptors connected in series through address pointers, and the multiple descriptors are selected from any one of the following: a time control descriptor, used to define the time slots of the scanning phase and the non-scanning phase; a touch scanning descriptor, used to define the scanning task sequence; a process control descriptor, used to execute branch control of different scanning modes.
[0017] Optionally, the descriptor linked list adopts a word-aligned linear address layout, each descriptor consists of 1-4 consecutive 32-bit words, and the first word contains a 4-bit descriptor type field and an interrupt enable flag.
[0018] Optionally, the first level parsing includes: using a finite state machine to sequentially read and parse the descriptor linked list; using a counter to perform down-timing or up-timing to complete the time slot control defined by the time control descriptor.
[0019] Optionally, the time control descriptor includes a timing descriptor, a delay descriptor and a wait descriptor, and parsing the timing descriptor includes: using a down-counting counter to load the initial value corresponding to the load data of the timing descriptor and start counting down, and reloading the next initial value until the count value reaches zero, and after the down-counting counter loads the initial value each time, the descriptor parser executes the parsing of the next descriptor to realize the time slot control of the scanning phase and the non-scanning phase; parsing the delay descriptor includes: using an up-counting counter to count up from zero until the count value reaches a first The method comprises the steps of: using an up-counting counter to count up from zero when the wait descriptor starts to be executed, stopping counting when an external event is triggered, returning a signal of successful waiting, and then parsing the next descriptor; or using an up-counting counter to return a signal of waiting timeout after not receiving a trigger of an external event when the up-counting count value reaches a second preset value corresponding to the load data in the wait descriptor, and parsing the next descriptor.
[0020] Optionally, the process control descriptor includes: a termination descriptor, used to indicate stopping parsing and triggering an interrupt; a comparison descriptor, used to compare the value of a specified address in the data address space with a preset threshold, and select the address pointer of the next descriptor according to the comparison result to realize a branch jump.
[0021] Optionally, the touch scan descriptor includes: a task field for defining a scan task sequence; an increment field for indicating automatic increment of the scan sequence number and continuous execution of multiple scan commands under the same scan mode; and a share field for indicating shared setup time and / or recovery time between adjacent scan stages.
[0022] Optionally, the task field defines multiple scanning tasks, each scanning task includes: a scanning mode subfield, used to define any one of the following basic scanning modes: active pen row scanning, active pen column scanning, active pen noise scanning, finger row scanning, finger column scanning, finger noise scanning, finger group scanning, active pen upstream sending, short circuit detection scanning; a scanning sequence number subfield, used to define the touch electrode group number corresponding to the scanning command; a scanning behavior subfield, used to define any one of the following scanning behaviors: capacitance compensation value preparation, capacitance compensation value update, and scan execution.
[0023] Optionally, the second-level analysis includes: generating a channel selection signal for the multiplexer according to the scanning task sequence; generating an integral control signal for the analog front-end circuit to control the charging and discharging of the capacitor to achieve charge-to-voltage conversion; before executing the scanning command, reading the compensation value from the capacitor compensation value address space and preloading it; at the start of the scanning task, latching the preloaded compensation value into the capacitor compensation module; writing the detection data output by the analog-to-digital converter of the analog front-end circuit into the detection data storage address space and performing statistical operations.
[0024] According to another aspect of the present invention, a touch control chip is provided, which integrates the above-mentioned scanning control device.
[0025] The scanning control device according to an embodiment of the present invention performs a two-level analysis of the scanning scheme. By encapsulating the aforementioned basic scanning patterns into descriptors and establishing linked lists of descriptors for different scanning strategies, this decoupling of the scanning strategy from the hardware structure of the control signal generation circuit can be achieved, thereby enabling flexible configuration of the scanning scheme. Compared to existing schemes in which the control signal generation circuit directly generates a fixed scanning sequence for the entire scanning strategy, the scanning control scheme of the present invention requires only a small number of configuration parameters to parse the scanning task sequence, thereby simplifying the circuit structure of the control signal generation circuit.
[0026] In a preferred embodiment, the descriptor parser uses a finite state machine to parse multiple descriptors in the descriptor linked list, uses a counter to perform downward timing to achieve time slot control of the scanning phase and the non-scanning phase, and performs upward timing to insert a predetermined delay between adjacent scanning phases or wait for the occurrence of external events, thereby realizing complex timing control of the scanning phase and achieving precise frame period and intra-frame time allocation.
[0027] In a preferred embodiment, the descriptor parser compares the statistical results of touch scans (the values at specified addresses in the data address space) with a preset threshold. Based on the comparison results, the address pointer for the next touch scan descriptor is selected to implement branching control for different scan modes, thereby dynamically adjusting subsequent scan modes and enabling real-time modification of scan plans. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which: Figure 1 shows a schematic structural diagram of a touch control system; Figures 2a to 2c Shows the scanning strategy for mixed touch detection of finger and active capacitive pen in touch control system; Figure 3 A schematic circuit diagram of a capacitance detection channel in a touch control system is shown; Figure 4 A schematic block diagram showing a scanning control device according to a first embodiment of the present invention; Figure 5 Show Figure 4 The circuit schematic diagram of the descriptor parser in the scan control device shown; Figure 6a and Figure 6b Show Figure 5 The working waveform of the descriptor parser shown is when the counter counts down; Figure 7a and Figure 7b Show Figure 5 The working waveform of the descriptor parser shown is when the counter counts up; Figure 8 shows a schematic data structure of a time control descriptor; Figure 9 shows a schematic data structure of a flow control descriptor; Figure 10 shows a schematic data structure of a touch scan descriptor; Figure 11 shows a scanning control signal waveform diagram of a finger column scanning mode represented by a touch scanning descriptor; Figure 12 shows a scanning control signal waveform diagram of a finger group scanning mode represented by a touch scanning descriptor; Figure 13 shows a scanning control signal waveform diagram of a combination of a finger group scanning mode and a finger column scanning mode represented by a touch scanning descriptor; Figure 14 A dynamic data structure showing descriptor linkage; Figure 15 A flow chart of a touch panel scanning control method according to a second embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] The present invention will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, identical elements are represented by similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale. In addition, some well-known parts may not be shown.
[0030] Figure 1 Figure 1 shows a schematic diagram of the structure of a touch control system 100. The touch control system includes a touch panel 110, multiple touch chips 120, and multiple signal lines 101 connecting the touch panel 110 and the touch chips 120. The touch panel 110 includes multiple touch electrodes 102, typically made of a transparent conductive material (such as indium tin oxide (ITO)). Each electrode measures approximately 5 mm x 5 mm. The signal lines 101 are used to transmit touch drive signals and collect touch sensing signals.
[0031] In practical applications, the touch control system 100 is integrated with the display system to form a display touch device. As the size of the display panel increases, the size of the touch panel 110 also increases accordingly, and the number of touch electrodes 102 increases accordingly. A single touch chip 120 can only support a limited number of capacitive detection channels. In large-scale applications such as tablet computers or in-vehicle displays, two or more touch chips 120 are typically required, working in cascade to achieve complete detection coverage of the entire touch panel.
[0032] The touch panel 110 supports multiple touch modes, including touch operations by a finger 103 and touch operations by an active capacitive stylus 104. To detect finger touch operations, the touch chip 120 provides a drive signal to the touch electrode 102 and detects changes in capacitance on the touch electrode 102. To detect touch operations by an active capacitive stylus, the touch chip 120 transmits an uplink communication signal to the active capacitive stylus 104 via the touch electrode 102. This signal is encoded using Direct Sequence Spread Spectrum (DSSS) technology to enhance anti-interference capabilities and communication reliability. After receiving the uplink signal, the active capacitive stylus 104 returns a downlink signal through the touch panel 110 within a specific time window according to a preset protocol. This downlink signal uses binary phase shift keying (BPSK) or quadrature phase shift keying (QPSK) modulation to transmit data such as pressure sensing values, button status, and battery status. After receiving the downlink signal, the analog front end (AFE) of the touch chip 120 extracts the data packet content through the demodulation module and transmits the parsed data to the microcontroller unit (MCU) for subsequent processing.
[0033] Figures 2a to 2c The scanning strategy for mixed touch detection of finger and active capacitive pen in a touch system is shown.
[0034] In a touch system with hybrid touch detection, different active pen protocols have different requirements for uplink and downlink signal timings. Finger touch scanning must be dynamically coordinated with the active pen communication timings. The touch chip 120 adjusts the scanning timing in real time to avoid signal conflicts as the active pen approaches, contacts, and leaves the touch panel 110. For example, when the active capacitive stylus 104 is in contact, the touch chip 120 prioritizes the downlink signal reception window. Simultaneously, it uses time division multiplexing (TDM) technology to complete capacitive finger touch detection during non-communication periods, thereby achieving simultaneous touch positioning and active pen communication.
[0035] However, due to significant differences in hardware architecture, communication protocols, and parameter configurations among different manufacturers, touchscreen chips must adapt to diverse scanning strategy requirements. For example, the uplink communication slot of an active pen can experience millisecond-level timing offsets depending on protocol versions. The electrode drive frequency for finger scanning must be dynamically adjusted based on the panel material characteristics, and the sampling period for noise detection must match the characteristics of environmental interference. These differences make traditional fixed-time scanning control solutions difficult to meet compatibility requirements in complex scenarios.
[0036] The inventors have noticed that in a touch control system, different scanning strategies are composed of a plurality of scanning phases, and each scanning phase can be defined as a corresponding basic scanning mode.
[0037] See also Figure 2a In the touch panel's detection state, each scan frame consists of a continuous pen-up transmission phase, a finger scanning phase, a pen-down detection phase, a noise detection phase, and a blank phase. This scanning strategy is used to detect whether a touch operation is present. Since there is a blank phase in the scan frame, it can achieve power conservation.
[0038] See also Figure 2b When a hand scan or pen hover is detected, each scan frame consists of a repeated pen-up transmission phase, a finger scan phase, and a pen-down detection phase. This scanning strategy prioritizes the finger scan phase during scan frame timing; that is, the finger scan phase's time slot is longer than the pen-up transmission phase and the pen-down detection phase. This scanning strategy ensures the high response speed required for finger touch while simultaneously detecting the presence of an active capacitive stylus touch operation.
[0039] See also Figure 2cWhen both hand scanning and pen contact are detected, each scan frame consists of a repeated pen uplink transmission phase, a finger scanning phase, and a pen downlink detection phase, with a noise detection phase inserted into the scan frame. The scan frame time allocation in this main scanning strategy still prioritizes the finger scanning phase, but the time slot of the pen downlink detection phase is extended relative to the pen hovering state, and the time slot of the finger scanning phase is correspondingly reduced. This scanning strategy can meet the response speed requirements of both finger touch and active capacitive pen touch.
[0040] The inventors propose encapsulating the aforementioned basic scan patterns into descriptors and establishing linked lists of descriptors for different scan strategies. This decoupling can be achieved by decoupling the scan strategy from the hardware structure of the control signal generation circuit, thereby enabling flexible configuration of the scan scheme. Furthermore, a two-level parsing of the linked list of descriptors is performed. For example, a finite state machine is used to perform the first-level parsing of the time control descriptor to implement time slot control during the scanning and non-scanning phases, and a control signal generation circuit is used to perform the second-level parsing to generate the scan control signal. This allows for precise frame period and intra-frame time allocation, while simplifying the circuit structure of the control signal generation circuit.
[0041] Figure 3 The schematic circuit diagram of the capacitance detection channel in the touch control system is shown in FIG. The capacitance detection channel 10 includes a multiplexer (MUX), an analog front-end circuit (AFE), and an analog-to-digital converter (ADC).
[0042] See also Figure 1 and Figure 3 The equivalent circuit of the multiple touch electrodes 102 in the touch panel 110 is represented by a capacitance Cf or Cp, which respectively represents the capacitance change caused by a finger touch and the inherent capacitance of the touch panel.
[0043] Multiple touch electrodes 102 are connected to a multiplexer MUX in the touch chip 120 via multiple signal lines 101. The multiplexer MUX includes multiple single-pole triple-throw switches S1, which selectively connect the touch electrodes 102 to the analog front-end circuit (AFE), receive the stimulus signal Vstim, or connect to ground based on a channel selection signal. The single-pole triple-throw switches S1 can be implemented using MOS transistors, which function as switches to achieve on / off control.
[0044] In the self-capacitance detection scheme, multiple touch electrodes 102 are individually scanned, and the presence of a finger is determined by measuring the change in their capacitance to ground. A multiplexer (MUX) connects the selected touch electrodes 102 to the analog front-end circuit (AFE) and connects the unselected touch electrodes 102 to ground or receive the stimulation signal (Vstim).
[0045] In the mutual capacitance detection scheme, multiple touch electrodes 102 are arranged in pairs of transmitting electrodes Tx and receiving electrodes Rx. A multiplexer MUX provides an excitation signal Vstim to the selected transmitting electrode, connects the selected receiving electrode to the analog front-end circuit AFE, and grounds the unselected transmitting and receiving electrodes.
[0046] The analog front-end circuit (AFE) includes a capacitance compensation module 11, an operational amplifier 12, a buffer 13, a feedback capacitor Cfb, and a second switch S2 and a third switch S3. The second switch S2 is connected to the inverting input of the operational amplifier 12 and is used to provide the touch electrode signal selected by the multiplexer MUX to the inverting input of the operational amplifier 12. The capacitance compensation module 11 receives a capacitance compensation value and generates a corresponding capacitance compensation signal based on the position of the selected touch electrode to compensate for the parasitic capacitance of the touch electrodes at different locations. The feedback capacitor Cfb and the third switch S3 are connected in parallel between the inverting input and output of the operational amplifier 12.
[0047] The analog front-end circuit AFE receives the integral control signal and is used to control the switching states of the second switch S2 and the third switch S3 to control the charge and discharge of the capacitor Cfb, convert the charge on the capacitor into a voltage, and measure the capacitance by measuring the change in voltage.
[0048] In the self-capacitance detection scheme, the non-inverting input of the operational amplifier 12 is grounded. The touch electrode signal is directly integrated to generate the detection signal Vout. In the mutual capacitance detection scheme, the non-inverting input of the operational amplifier 12 receives the stimulation signal Vstim. The differential signal between the touch electrode signal and the stimulation signal Vstim is integrated to generate the detection signal Vout.
[0049] Buffer 13 performs impedance matching and signal amplification on the detection signal Vout to ensure the integrity of the analog signal during transmission. For example, the buffer employs a unity-gain amplifier structure, with its input connected to the output of operational amplifier 12 and its output connected to the input of the analog-to-digital converter (ADC). Buffer 13 effectively isolates the loading effect on the front-end integration circuit during subsequent ADC sampling, preventing signal distortion caused by a mismatch between the signal source's internal resistance and the ADC's input impedance.
[0050] The analog-to-digital converter ADC performs analog-to-digital conversion on the detection signal Vout to obtain detection data.
[0051] In the above-mentioned capacitance detection channel, a time-division multiplexing method is adopted so that the plurality of touch electrodes 102 can share the front-end circuit AFE and the analog-to-digital converter ADC.
[0052] Figure 4A schematic block diagram of a scan control device according to a first embodiment of the present invention is shown. The scan control device 20 includes a microprocessor 21, a descriptor parser 22, a control signal generating circuit 23, a configuration module 24, and a data address space 25, all connected via a high-performance system bus (e.g., ARM's AHB bus).
[0053] The descriptor linked list address space, the capacitance compensation value address space and the detection data storage address space are allocated in the data address space 25 .
[0054] The descriptor list address space uses a word-aligned linear address layout for storage. The capacitance compensation value address space stores a list of compensation values associated with touch electrode locations. The detection data storage address space stores detection data obtained by the analog-to-digital converter (ADC) in the capacitance detection channel.
[0055] The descriptor storage structure consists of one to four consecutive 32-bit words. The first word (Word0) contains a 4-bit encoding field (bits 31 to 28) that identifies the descriptor type, such as TIMER, WAITN, or SCAN. Bit 27 is set to the interrupt enable flag (I). When this bit is high, the descriptor parser triggers an MCU interrupt request (IRQ) through hardware signals after completing the corresponding operation for that descriptor. The last word (WordN) stores the physical address pointer of the next descriptor. This pointer points to the first word address of another descriptor, thus forming a chain structure.
[0056] In the scanning control device 20, the microprocessor 21 selects a scanning scheme according to the touch state of the touch panel. For example, Figure 2a 、 Figure 2b and Figure 2c One of the scanning schemes shown.
[0057] The descriptor parser 22 obtains the corresponding descriptor linked list according to the scanning scheme, performs the first-level parsing of the scanning scheme, implements the time slot control of the scanning phase and the non-scanning phase according to the time control descriptor, and parses the touch scanning descriptor into a scanning task sequence.
[0058] Specifically, the descriptor parser 22 includes a control module, an up-counting module, a down-counting module, a comparison logic module, a decoding module, and a buffer management module.
[0059] In the descriptor parser 22, the control module parses the descriptor linked list to generate a scan task sequence. The descriptor linked list includes multiple descriptors connected in series via address pointers. These descriptors include any one of the following: time control descriptors (TIMER, WAITN, WAITX), flow control descriptors (TMNT, COMP), and touch scan descriptors. The touch scan descriptors define the scan task sequence, the time control descriptors control the time slots between the scan and non-scan phases, and the flow control descriptors execute branch control for different scan modes.
[0060] The down-counting module builds a tick clock domain based on a stable clock source such as an external quartz crystal oscillator, a phase-locked loop, or an oscillator, and uses a down-counting method to achieve the precise time limit defined by the timing descriptor TIMER. The up-counting module builds a tick clock domain based on the above stable clock source and uses an up-counting method to achieve the precise delay time defined by the delay descriptor WAITN and the precise wait time defined by the wait descriptor WAITX.
[0061] The comparison logic module accesses the specified address in the detection data address space through the AHB bus, performs numerical calculations on the value of the read detection data and the preset threshold in the descriptor, and selectively jumps to the linked list branch address based on the comparison result.
[0062] The decoding module identifies the descriptor type by parsing the 31-28 bit encoding field of the first word of the descriptor and extracts the interrupt enable flag bit I. When this bit is valid and the current descriptor is executed, the MCU interrupt request is triggered through a hardware signal.
[0063] The buffer management module is responsible for data interaction between the AHB bus and the FIFO buffer, and supports register configuration updates and data migration operations.
[0064] The control signal generating circuit 23 analyzes the scanning task sequence to generate the scanning control signal of the capacitance detection channel, including Figure 3 The channel selection signal of the multiplexer MUX, the capacitance compensation value and the integration control signal of the analog front-end circuit AFE are shown.
[0065] Specifically, the control signal generating circuit 23 includes a channel selection signal generating module, an integral control signal generating module, a capacitance compensation preparation module, a capacitance compensation updating module, and a data statistics storage module.
[0066] The channel selection signal generation module generates channel selection signals for the multiplexer MUX based on the scan task sequence. There are two types of channel selection signals: SEL_RX and SEL_STIM. The SEL_RX signal is used to select the receiving electrode, and the SEL_STIM signal is used to select the transmitting electrode to apply the stimulation signal Vstim.
[0067] The integration control signal generation module generates an integration control signal for the analog front-end circuit (AFE) based on the scan task sequence. This signal is used to control the timing of the second switch S2 and the third switch S3. During the integration phase, S2 is closed and S3 is open, allowing the operational amplifier 12 and the feedback capacitor Cfb to form an integration circuit. During the reset phase, S2 is opened and S3 is closed to discharge the feedback capacitor Cfb. The charge-to-voltage conversion process is achieved by charging and discharging the capacitor Cfb.
[0068] The capacitance compensation preparation module reads the compensation parameters for the corresponding touch electrodes from the capacitance compensation value address space based on the capacitance compensation value address in the descriptor and preloads them into the compensation registers through a capacitance compensation preparation operation. At the start of a scan task, the capacitance compensation update module latches the preloaded compensation values into capacitance compensation module 11 and dynamically adjusts the equivalent value of feedback capacitor Cfb to eliminate parasitic capacitance differences among the touch electrodes.
[0069] The data statistics storage module receives the detection data output by the analog-to-digital converter ADC, writes the detection data storage address space according to the storage address specified by the descriptor, and calculates the state parameters of the touch panel through the data statistics storage module, including the maximum value, average value and noise intensity of the capacitance value.
[0070] Configuration module 24 is used to set configuration parameters for control signal generation circuit 23. For example, these parameters include adjusting the timing parameters of the integral control signal, modifying the mapping relationship between the capacitance compensation value address space, and configuring the sampling window length of the data statistics storage module. Due to the dynamic configuration capability of configuration module 24 for control signal generation circuit 23, the scanning control device 20 can load parameter sets that match the active pen protocol and adapt to the physical characteristics of different touch panels.
[0071] Furthermore, the configuration module 24 obtains the touch panel status parameters from the data statistics storage module of the control signal generation circuit 23. The microprocessor 21 analyzes the touch panel status parameters obtained from the configuration module 24 via the AHB bus to obtain the touch status of the touch panel. In addition, when the descriptor parser 22 performs the subsequent comparison descriptor COMP, it also typically obtains the status parameters from the configuration module 24 via the AHB bus.
[0072] Figure 5 Show Figure 4The schematic circuit diagram of the descriptor parser in the scan control device is shown. The descriptor parser 22 includes a finite state machine (FSM) and a counter (CNT). The FSM, for example, is located in the control module and is used to sequentially read and parse the descriptor list. The counter (CNT) includes two sets of counters: one set is a down-counting counter that uses down-counting to implement down-time, and the other set is an up-counting counter that uses up-counting to implement up-time.
[0073] The down-counting module builds a tick clock domain based on the aforementioned stable clock source, including a down-counting counter (tick dn cnt). This down-counting method is used to achieve the precise duration defined by the timing descriptor TIMER. The up-counting module builds a tick clock domain based on an external crystal oscillator, including an up-counting counter (tick up cnt). This up-counting method is used to achieve the precise delay defined by the delay descriptor WAITN and the precise wait defined by the wait descriptor WAITX.
[0074] Figure 5 The following example uses a down-counting counter. The timer descriptor TIMER uses a down-counting counter (tick dn cnt), which can count up to 0x7FF_FFFF cycles. The timer descriptor TIMER specifies a specific time (the time it takes to count down from an initial value to 0). Upon receiving the timer descriptor, the finite state machine (FSM) parses it. As long as the down-counting counter (tick dn cnt) is idle, it loads the initial value corresponding to the payload data in the timer descriptor and returns a "load completed" signal, resuming the countdown from the initial value. After each initial value is loaded, the descriptor parser can proceed to parse the next descriptor. However, after loading the initial value and starting counting, if the count is not zero, a new initial value cannot be loaded. The next initial value will not be loaded again until the count reaches 0. In other words, the descriptor parser cannot proceed to the next counting process until the current counting process is completed. However, it can proceed with tasks represented by other descriptor types, such as scanning, branching (or copying). The count command corresponding to the next timing descriptor, TIMER, can then only load the next initial value after the previous count command has finished counting down to 0. That is, after the initial value corresponding to the timing descriptor TIMER has been loaded by the down-counting counter, the descriptor parser can proceed to parse the next descriptor. If the count value has not reached zero, it will not be reloaded. Therefore, the descriptor parser must wait for the down-counting countdown to end and reload before executing the next descriptor parsing. This implements time slot control and ensures a continuous and tight countdown.
[0075] Combine Figure 6a If the parsing of the next timing descriptor TIMER is completed (the t_timer_rld_req signal is received) before the counting of the previous timing descriptor TIMER ends, the descriptor parser needs to wait for the previous counter to count down to 0, then reload the new initial value, return the t_timer_rld_ack signal (loading completion signal), and start a new round of counting and descriptor parsing. During the entire counter loading process, data preparation is performed in the tick clock domain. The tick dn cnt can decrement or reload the count value at each tick clock edge, so the timing descriptor can be used to accurately control the time slot length. See Figure 6b In abnormal circumstances, the following situation may occur: when tick dncnt counts down to 0, it still does not receive the t_timer_rld_req signal sent from the ahb clock domain and processed by the synchronization logic. In this case, the "timer run over" flag needs to be set, indicating that within the time range specified by the timing descriptor TIMER, an error occurred in the descriptor parser's parallel processing and execution of other descriptors, resulting in the task not being completed within the specified time.
[0076] Both the delay descriptor WAITN and the wait descriptor WAITX use an up-counting counter (tick-up counter) with a maximum count of 0xFF_FFFF cycles. Because both commands call the same tick-up counter, they can only be executed sequentially. The delay descriptor WAITN is used to insert a predetermined delay between adjacent scan phases, achieving this delay by counting up. The wait descriptor WAITX also implements a wait by counting up, awaiting an external event to trigger the stop count. Because the descriptor parser operates in the AHB clock domain of the system bus and the tick-up counter operates in the tick clock domain, the t_waitn_req / t_waitx_req signals sent from the AHB clock domain to the tick clock domain, as well as the h_waitn_ack / h_waitx_ack / h_waitx_tout signals sent from the tick clock domain to the AHB clock domain, require synchronization logic to synchronize signals in the asynchronous clock domain. This can cause the control times of the WAITN and WAITX descriptors to be slightly longer than the specified times.
[0077] See also Figure 7a, the upward counting counter tick up cnt completes the delay time specified by the delay descriptor WAITN according to the two signals t_waitn_req and t_waitn_ack. That is, after the delay descriptor WAITN is parsed, the upward counting counter first obtains the first preset value corresponding to the load data in the delay descriptor WAITN, and counts upward from zero until it reaches the first preset value to complete the delay, and returns the "delay completion" signal, which corresponds to the t_waitn_ack signal. After that, the descriptor parser executes the parsing of the next descriptor. Similarly, after the parsing of the wait descriptor WAITX is completed, the upward counting starts after the t_waitx_req signal is valid. The upward counting counter first obtains the second preset value corresponding to the load data of WAITX in the wait descriptor, and counts upward from zero, that is, the count value accumulates from 0 toward the second preset value to achieve upward timing. During this process, if the t_ext_evt_sync signal is received, it means that the specified external event has been received. That is, in the process of counting up from zero, when the external event triggers, the up-counting is stopped in advance, and the t_waitx_ack signal is returned, that is, the "wait success" signal is returned, and the parsing of the next descriptor is continued. Figure 7b If the up-counting counter does not receive the t_ext_evt_sync signal from the tick clock domain during the entire waiting time from zero to the second preset value, indicating that no external event has been triggered, the t_waitx_tout signal is returned, indicating a "wait timeout" signal, an error flag is recorded, and the descriptor parser continues to parse the next descriptor. Note that t_waitx_tout and t_waitx_ack are mutually exclusive; only one signal can be generated and synchronized to the ahb clock domain to return the waiting result to the descriptor parser.
[0078] The two descriptors for counting up are executed sequentially, which does not cause conflicts when using the counter for counting up. The first preset value and the second preset value are set according to actual needs and can be the same or different.
[0079] Figure 8 Shows a schematic data structure of a time control descriptor.
[0080] In this example, the time control descriptor includes a timing descriptor TIMER, a delay descriptor WAITN, and a wait descriptor WAITX.
[0081] The timing descriptor TIMER consists of two words, including: a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, a 27-bit valid data field PAYLOAD, and the address field ptr_next (pointer next) of the last word (WordN).
[0082] The initial value of the down count is stored in the valid data field PAYLOAD of the timing descriptor TIMER.
[0083] The delay descriptor WAITN and wait descriptor WAITX are composed of 2 words respectively, including: 4-bit descriptor type field CMD, 1-bit interrupt enable flag I, 3-bit control option field CMD_OPT, 24-bit valid data field PAYLOAD, and the address field ptr_next (pointer next) of the last word (WordN).
[0084] The count value corresponding to the predetermined delay is stored in the valid data field PAYLOAD of the delay descriptor WAITN, and the preset value for counting up is stored in the valid data field PAYLOAD of the wait descriptor WAITX.
[0085] Figure 9 Shows a schematic data structure of a flow control descriptor.
[0086] In this example, the flow control descriptor includes a termination descriptor TMNT and a comparison descriptor COMP. The termination descriptor TMNT is used to instruct the descriptor parser 22 to stop parsing and trigger an interrupt. The comparison descriptor COMP is used to compare the value of a specified address in the data address space with a preset threshold and, based on the comparison result, select the address pointer of the next descriptor to implement a branch jump.
[0087] The termination descriptor TMNT consists of 1 word, which includes: a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag bit I, and a 27-bit reserved field Rsvd.
[0088] The termination descriptor TMNT indicates that the descriptor parser needs to stop working, and usually the mark of the interrupt enable flag bit 1 is set. After executing this descriptor, an interrupt request is sent to the microprocessor 21.
[0089] The comparison descriptor COMP consists of 4 words, including: a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, a 3-bit reserved field Rsvd, a 24-bit A address field, a 32-bit first descriptor physical address pointer, a 32-bit B data field, and a 32-bit second descriptor physical address pointer.
[0090] When descriptor parser 22 parses the comparison descriptor COMP, it accesses the data address space based on the A address field to obtain the value of A, directly obtains the value of B from the B data field, and then compares A with B, where B is the preset threshold mentioned above. If A is less than B, the first descriptor physical address pointer is selected as the next descriptor physical address pointer. If A is greater than or equal to B, the second descriptor physical address pointer is selected as the next descriptor physical address pointer. Thus, the comparison descriptor COMP can implement branching and jump functions.
[0091] Figure 10 FIG. 4 shows a schematic data structure of a touch scan descriptor.
[0092] In this example, the touch scan descriptor SCAN consists of 3 words, including: a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, a 3-bit control option field CMD_OPT, a 2-bit shared field SHARE, a 2-bit reserved field Rsvd, a 4-bit increment field INC, a 3-bit reserved field Rsvd, a 13-bit first task field JOB_1ST, a 3-bit reserved field Rsvd, a 13-bit third task field JOB_3RD, a 3-bit reserved field Rsvd, a 13-bit second task field JOB_2ND, and the address field ptr_next (pointer next) of the last word (WordN), which is used to store the next descriptor physical address pointer.
[0093] 1) Task field JOB in touch scan descriptor SCAN The task field of the touch scan descriptor SCAN defines a scan task sequence and includes the first task field JOB_1ST, the second task field JOB_2ND, and the third task field JOB_3RD. Each task field contains multiple scan tasks, each of which includes multiple subfields: the scan mode subfield CMD_SC, the scan action subfield CMD_EXE, and the scan sequence subfield CMD_ID. The touch scan descriptor SCAN defines a scan task sequence for scan commands. Depending on the contents of the three task fields, the scan task sequence can include at least one of the first through third tasks.
[0094] In the subfields of the task field, the scan mode subfield CMD_SC defines the basic scan mode for a scan phase within a scan frame. In a touch system that supports hybrid touch, the scan mode subfield CMD_SC defines nine basic scan modes: active pen row scan (PR), active pen column scan (PC), active pen noise scan (NP), finger row scan (FR), finger column scan (FC), finger noise scan (NF), finger group scan (GS), active pen uplink transmission (UP), and short circuit detection scan (SD).
[0095] In the subfields of the aforementioned task field, the Scan Sequence Number subfield (CMD_ID) defines the touch electrode group number corresponding to a scan command during the scan phase. Within multiple scan tasks within a single scan command, different group numbers can be assigned to different scan tasks. The Scan Sequence Number subfield (CMD_ID) is used to set the real-time scan parameters of the control signal generation circuit, including the channel selection signal (SEL_RX signal / SEL_STIM signal), the read address of the capacitance compensation value address space, and the write address of the detection data storage space.
[0096] In the subfields of the task field, the scan action subfield CMD_EXE defines the scan action for a scan command during the scan phase. A scan command is a sequence of up to three scan tasks, each of which executes a scan action, including capacitor compensation value preparation (SFT) (cneg shift), capacitor compensation value update (LAT) (cneg latch), and scan execution (EXE) (scan_exe).
[0097] See also Figure 3 and Figure 4 Before executing each scan command, the capacitance compensation update module in the control signal generating circuit 23 latches the preloaded compensation value into the capacitance compensation module 11 of the capacitance detection channel 10 at the beginning of the scan task. During the execution of each scan command, the channel selection signal generated by the control signal generating circuit 23 is used to control the switching action of the second switch S2 and the third switch S3 in the multiplexer MUX, selectively connecting each touch electrode 102 to the analog front-end circuit AFE, and completing the discharge process at the same time. Then, the integration control signal generated by the control signal generating circuit 23 is used to control the switching action in the analog front-end circuit AFE to control the integration and reset timing. At the same time, the analog-to-digital converter ADC of the capacitance detection channel 10 converts the detection signal into detection data, which is finally stored in the detection data storage address space. After the capacitance compensation value is updated, preparations for the capacitance compensation value required for the next scan can be made.
[0098] When the scan mode subfield CMD_SC of the touch scan descriptor SCAN is finger column scan FC, in the third finger column scan, the following scan commands can be simultaneously issued to the control signal generating circuit: The first task: Update the capacitance compensation value of the third finger column scan: CMD_SC = FC, CMD_ID = 3, CMD_EXE = LAT.
[0099] The second task: Finger column scan The third scan execution: CMD_SC = FC, CMD_ID = 3, CMD_EXE = EXE.
[0100] The third task: Prepare the capacitance compensation value for the fourth finger column scan: CMD_SC = FC, CMD_ID = 4, CMD_EXE = SFT.
[0101] See also Figure 11 The touch scan descriptor SCAN uses the scanning mode CMD_SC of finger column scanning FC. The descriptor parser 22 parses the descriptor linked list of touch descriptors and generates a series of scan commands. Each scan command drives a corresponding column of touch electrodes 102 to perform a finger column scan. Repeating the finger column scan multiple times can scan the entire screen.
[0102] exist Figure 11 In the figure, the scan control signals include channel selection signals (corresponding to SEL_RX<0:4> and SEL_STIM<0:4>), as well as a channel ground signal SEL_VCOM. These signals are used to set the on / off states of multiple single-pole, triple-throw switches S1 in the multiplexer MUX, selecting touch electrodes 102 column by column for connection to the analog front-end circuit AFE. The scan control signals also include a stimulus signal Vstim and detection data ADC_DAT. For example, if a touch panel includes five columns of touch electrodes 102, a descriptor linked list consisting of five touch descriptors can be used to obtain capacitance detection signals for each of the five columns of touch electrodes 102 during the finger touch scan time, thereby determining the finger's position on the touch panel.
[0103] See also Figure 12 , the scan mode CMD_SC of the touch scan descriptor SCAN is finger group scan GS. The descriptor parser 22 parses the descriptor linked list composed of touch descriptors to generate continuous scan commands. Each scan command is used to connect multiple columns of touch electrodes 102 together in the capacitance detection channel to form multiple groups. The multiple columns of touch electrodes 102 are driven to perform finger group scans. Repeating the finger group scan multiple times or only performing one finger group scan can achieve the position scan of the entire screen. Using group scanning can achieve the acquisition of the capacitance change value on the screen in a shorter time, and simply confirm whether a finger is touching the touch panel, but it cannot distinguish the specific finger position in detail.
[0104] exist Figure 12In the example, the scan control signals include channel selection signals (corresponding to SEL_RX<0:4> and SEL_STIM<0:4> in the figure), as well as a channel ground signal SEL_VCOM, which are used to set the on / off states of multiple single-pole triple-throw switches S1 in the multiplexer MUX, thereby connecting multiple columns of touch electrodes 102 to the analog front-end circuit AFE. The scan control signals also include a stimulus signal Vstim and detection data ADC_DAT. For example, if a touch panel includes five columns of touch electrodes 102, using a descriptor linked list consisting of one touch descriptor, capacitance detection signals for all five columns of touch electrodes 102 can be obtained within the grouped touch scan time, thereby determining whether a finger is in contact with the touch panel.
[0105] 2) Increment field INC in touch scan descriptor SCAN Based on the application of the control signal generation circuit, an increment field INC is provided within the touch scan descriptor SCAN to instruct the control signal generation circuit 23 to automatically increment the scan sequence number. This allows multiple scan commands to be executed consecutively using a single touch scan descriptor SCAN according to the same scan mode. When the scan mode subfield CMD_SC of the touch scan descriptor SCAN is set to "finger column scan FC" and the scan action subfield CMD_EXE is set to "scan execute EXE," the increment field INC is set to 4. After receiving a single touch scan descriptor SCAN, the control signal generation circuit 23 automatically increments the scan sequence number subfield CMD_ID and automatically loads the new capacitance compensation value, generating scan control signals for five scans, equivalent to sequentially executing the following five scan commands.
[0106] 0. Capacitance compensation value update + finger column scan 0 scan execution + finger column scan 1 capacitance compensation value preparation; 1. Update capacitance compensation value + execute scanning of finger column scan 1 + prepare capacitance compensation value of finger column scan 2; 2. Update capacitance compensation value + execute scanning of finger column scan 2 + prepare capacitance compensation value of finger column scan 3; 3. Update capacitance compensation value + execute scanning of finger column scan 3 + prepare capacitance compensation value of finger column scan 4; 4. Capacitance compensation value update + finger column scan 4 scan execution + finger column scan 0 capacitance compensation value preparation.
[0107] By using the incrementing field INC in the touch scan descriptor SCAN to parse a single touch scan descriptor to implement column-by-column scanning, the maintenance of the touch scan descriptor SCAN can be greatly simplified, and the preparation time and ending time required for the control signal generating circuit to execute multiple scan commands separately can be saved.
[0108] 3) Shared field SHARE in touch scan descriptor SCAN See also Figure 11 and Figure 12 In the waveform of the scan control signal, for any single scan phase, in addition to the scan time, a setup time is required at the beginning and a recovery time is required at the end.
[0109] However, when arranging multiple scan phases of different scan modes consecutively, it is sometimes possible to save the setup time corresponding to the scan's discharge preparation and the recovery time at the end. Therefore, a shared field, SHARE, is added to indicate that the setup time and / or recovery time are shared between adjacent scan phases. The setup time cannot be omitted in the first scan phase, and the recovery time cannot be omitted in the last scan phase. This allows the scan control logic to obtain flexible scan command combinations based on different touch scan descriptor SCAN combinations.
[0110] like Figure 13 As shown, taking the combination of finger group scanning GS and finger column scanning FC as an example, using SHARE = FIRST / AMONG / LAST in the descriptor chain table of the two scanning stages can flexibly save the setup time and recovery time of the adjacent scanning stages. Specifically, compared to Figure 11 and Figure 12 , saving the recovery time in the finger group scanning stage and the setup time in the finger column scanning stage, and the two scanning stages share the same setup time and the same recovery time.
[0111] Figure 14 Dynamic data structure showing descriptor linkage.
[0112] like Figure 14 As shown, the first touch scan descriptor is referred to as the first touch scan descriptor SCAN. The scan mode subfield CMD_SC in the first touch scan descriptor SCAN is "finger group scan GS," and its address pointer points to the comparison descriptor COMP. After the scan command in the first touch scan descriptor SCAN is executed, the descriptor parser 22 compares the maximum value in the statistical results of the group touch scan (corresponding to the value at the specified address in the data address space) with the finger detection threshold (corresponding to the preset threshold). Based on the comparison result, the address pointer of the next touch scan descriptor SCAN is selected to implement branch control for different scan modes, thereby dynamically adjusting the subsequent scan mode.
[0113] If the maximum value in the statistical results of the previous group touch scan is found to be greater than the finger detection threshold, the touch panel is determined to be in the state of a finger touch. The next touch scan descriptor is the second touch scan descriptor SCAN. The scan mode subfield CMD_SC in the second touch scan descriptor SCAN is the finger column scan FC, and its address pointer points to the third touch scan descriptor SCAN. The scan mode subfield CMD_SC in the third touch scan descriptor SCAN is the finger group scan GS. The descriptor chain consisting of the first to third touch scan descriptors defines the scanning strategy of finger group scan GS + finger column scan FC + finger group scan GS, wherein the finger group scan GS is used to obtain the rough position of the finger, and the finger column scan FC is used to obtain the exact position of the finger.
[0114] If the maximum value in the statistical results of the previous group touch scan is found to be less than the finger detection threshold, the touch panel is determined to be in a no-touch state. The next touch scan descriptor is the fourth touch scan descriptor SCAN. The scan mode subfield CMD_SC in the fourth touch scan descriptor SCAN is a finger noise scan NF. The descriptor chain consisting of the first and fourth touch scan descriptors defines a scanning strategy of finger group scan GS + finger noise scan NF. Finger group scan GS is used to quickly detect whether the touch panel is in a touch state, and finger noise scan NF is used to obtain ambient noise baseline data to optimize subsequent scanning strategies.
[0115] Figure 15 A flow chart of a touch panel scanning control method according to a second embodiment of the present invention is shown.
[0116] In step S11 , a scanning scheme is selected according to the touch state of the touch panel.
[0117] In this step, the microprocessor detects the current state of the touch panel in real time, such as finger touch, active pen hovering, active pen contact or noise level, and dynamically selects one from several preset scanning schemes based on this, and determines the starting address of the corresponding descriptor linked list.
[0118] In step S12, a descriptor linked list is obtained according to the scanning plan, and a first-level parsing is performed on the descriptor linked list to generate a scanning task sequence.
[0119] The descriptor parser obtains the descriptor linked list and reads each descriptor consisting of one to four 32-bit words in sequence through the address pointer. The 4-bit descriptor type field in the first word indicates the type of descriptor. If it is a time control descriptor, a down-counting counter is used to count down from the initial value corresponding to the payload data to zero to precisely control the time slot of the current scan phase. An up-counting counter is used to count up to a set count value to insert a fixed delay between adjacent phases. Alternatively, an up-counting counter is used to count from zero to the preset value corresponding to the payload data, waiting for an external event to trigger or ending the wait after the count is completed. If it is a touch scan descriptor, the task field is extracted and one or more scan tasks are generated based on the scan mode subfield, scan sequence subfield, and scan action subfield. When the increment field is valid, the scan sequence number is automatically incremented to continuously execute the same scan mode. When the share field is valid, adjacent scan tasks share the setup time and / or recovery time, ultimately arranging all parsed scan tasks into a scan task sequence. If it is a flow control descriptor, parsing is stopped and an interrupt is triggered to end the flow when a terminate descriptor appears. Alternatively, when a compare descriptor appears, the value of a specified address in the data address space is read and compared with a preset threshold. Based on the comparison result, the descriptor jumps to a new descriptor address to implement branch control.
[0120] In step S13 , a second level analysis is performed on the scan task sequence to generate a scan control signal.
[0121] The control signal generation circuit performs a second-level analysis of the scan task sequence. The channel selection signal required by the multiplexer is generated according to the scan mode and scan sequence number in the scan task. The integration control signals such as start, stop, or reset of the analog front-end integrator are output according to the scan mode and integration time parameters. Before the scan command is executed, the capacitance compensation preparation module reads the corresponding compensation value from the capacitance compensation value address space and preloads it. At the beginning of the current scan task, the capacitance compensation update module latches the preloaded compensation value into the capacitance compensation module. After the analog-to-digital converter outputs the detection data, the data statistics storage module writes the detection data into the detection data storage address space and performs operations such as averaging and peak statistics.
[0122] The scanning control method of this embodiment is based on the above-mentioned scanning control device, so the contents already introduced in the above-mentioned embodiments will not be repeated here, but those skilled in the art can apply the working principles in the above-mentioned embodiments to the scanning control method of this embodiment.
[0123] While the embodiments of the present invention are described above, these embodiments do not exhaustively describe all details and do not limit this application to specific embodiments. Obviously, many modifications and variations are possible based on the above description. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better utilize the present invention and its modifications and uses. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A scanning control device for a touch panel, comprising: a microprocessor, wherein the microprocessor selects a scanning scheme according to a touch state; a descriptor parser, connected to the microprocessor, for parsing the descriptor linked list according to the scanning scheme to generate a scanning task sequence; as well as The control signal generating circuit is connected to the descriptor parser and is used for parsing the scanning task sequence to generate a scanning control signal.
2. The scanning control device according to claim 1, wherein: The descriptor linked list includes multiple descriptors connected in series through address pointers, and the multiple descriptors are selected from any one of the following: Time control descriptor, used to define the time slots of the scanning phase and the non-scanning phase; Touch scan descriptor, used to define the scan task sequence; Flow control descriptors are used to perform branch control in different scan modes.
3. The scanning control device according to claim 2, wherein: The descriptor linked list adopts a word-aligned linear address layout, and each descriptor consists of 1-4 consecutive 32-bit words, with the first word containing a 4-bit descriptor type field and an interrupt enable flag.
4. The scanning control device according to claim 2, wherein: The descriptor parser includes: A finite state machine, configured to sequentially read and parse the descriptor linked list; The counter includes a down-counting counter and an up-counting counter, and is used for performing down-timing or up-timing according to the time control descriptor.
5. The scanning control device according to claim 4, wherein: The time control descriptor includes a timing descriptor, a delay descriptor and a wait descriptor. The down-counting counter is loaded with an initial value corresponding to the payload data in the timing descriptor and starts counting down to implement down timing. The next initial value is then reloaded until the count value reaches zero. After the down-counting counter is loaded with the initial value each time, the descriptor parser performs parsing of the next descriptor to implement time slot control in the scanning phase and the non-scanning phase. The delay descriptor is used to insert a predetermined delay between adjacent scanning phases. When the delay descriptor starts to be executed, the up-counting counter starts counting up from zero until it reaches a first preset value and returns a signal indicating that the delay is completed. The descriptor parser then proceeds to parse the next descriptor. The upward counting counter also starts counting upward from zero when waiting for the descriptor to start executing, so as to realize upward timing, and stops counting when receiving the trigger of the external event, returns a signal of waiting success, and the descriptor parser performs parsing of the next descriptor; Or, when the count value of the upward counting counter reaches the second preset value corresponding to the load data in the waiting descriptor, the counter still does not receive the trigger of the external event, and returns a waiting timeout signal, and the descriptor parser performs parsing of the next descriptor.
6. The scanning control device according to claim 4, wherein: The process control descriptor includes: A termination descriptor, used to instruct the descriptor parser to stop parsing and trigger an interrupt; and The comparison descriptor is used to compare the value of the specified address in the data address space with a preset threshold, and select the address pointer of the next descriptor according to the comparison result to implement a branch jump.
7. The scanning control device according to claim 4, wherein: The touch scan descriptor includes: Task field, used to define the scanning task sequence; an increment field, used to instruct the control signal generating circuit to automatically increment the scan sequence number and continuously execute multiple scan commands according to the same scan mode; and The shared field is used to indicate that the setup time and / or recovery time are shared between adjacent scanning phases.
8. The scanning control device according to claim 7, wherein: In the Task field, define multiple scan tasks. Each scan task includes: The scan mode subfield is used to define any one of the following basic scan modes: active pen row scan, active pen column scan, active pen noise scan, finger row scan, finger column scan, finger noise scan, finger group scan, active pen uplink transmission, and short circuit detection scan; The scan sequence number subfield is used to define the touch electrode group number corresponding to the scan command; and The scan behavior subfield is used to define any one of the following scan behaviors: capacitance compensation value preparation, capacitance compensation value update, and scan execution.
9. The scanning control device according to claim 1, wherein: The control signal generating circuit comprises: a channel selection signal generating module, configured to generate a channel selection signal for a multiplexer according to the scanning task sequence; An integral control signal generating module is used to generate an integral control signal for the analog front-end circuit, control the charging and discharging of the capacitor, and realize the conversion from charge to voltage; A capacitance compensation preparation module is used to read and preload the compensation value from the capacitance compensation value address space before executing the scan command; a capacitance compensation update module, configured to latch the preloaded compensation value into the capacitance compensation module at the start of a scanning task; and The data statistics storage module is used to write the detection data output by the analog-to-digital converter of the analog front-end circuit into the detection data storage address space and perform statistical operations.
10. A scanning control method for a touch panel, characterized in that: include: Select a scanning scheme according to the touch status of the touch panel; Acquire a descriptor linked list according to the scanning scheme, and perform a first-level analysis on the descriptor linked list to generate a scanning task sequence; A second level analysis is performed on the scanning task sequence to generate a scanning control signal.
11. The scanning control method according to claim 10, wherein: The descriptor linked list includes multiple descriptors connected in series through address pointers, and the multiple descriptors are selected from any one of the following: Time control descriptor, used to define the time slots of the scanning phase and the non-scanning phase; Touch scan descriptor, used to define the scan task sequence; Flow control descriptors are used to perform branch control in different scan modes.
12. The scanning control method according to claim 11, wherein: The descriptor linked list adopts a word-aligned linear address layout, and each descriptor consists of 1-4 consecutive 32-bit words, with the first word containing a 4-bit descriptor type field and an interrupt enable flag.
13. The scanning control method according to claim 11, wherein: The first level of analysis includes: Using a finite state machine to sequentially read and parse the descriptor linked list; The counter is used to perform down-clocking or up-clocking to complete the time slot control defined by the time control descriptor.
14. The scanning control method according to claim 13, wherein: The time control descriptor includes a timing descriptor, a delay descriptor and a wait descriptor. Parsing the timing descriptor includes: using a down-counting counter to load an initial value corresponding to the payload data of the timing descriptor and starting to count down, and reloading the next initial value until the count value reaches zero, and the descriptor parser performs parsing of the next descriptor after the down-counting counter is loaded with the initial value each time, so as to realize time slot control in the scanning phase and the non-scanning phase; Parsing the delay descriptor includes: using an up-counting counter to count up from zero until the count value reaches a first preset value, returning a signal indicating that the delay is completed, and then parsing the next descriptor to insert a predetermined delay between adjacent scanning phases; Parsing the wait descriptor includes: using an upward counting counter to count upward from zero when the wait descriptor starts to execute, stopping counting when a trigger of an external event is received, and returning a signal of successful waiting before parsing the next descriptor; or using an upward counting counter to return a signal of wait timeout after not receiving a trigger of an external event when the upward counting value reaches a second preset value corresponding to the load data in the wait descriptor.
15. The scanning control method according to claim 13, wherein: The process control descriptor includes: Termination descriptor, used to indicate the end of parsing and trigger an interrupt; The comparison descriptor is used to compare the value of the specified address in the data address space with a preset threshold, and select the address pointer of the next descriptor according to the comparison result to implement a branch jump.
16. The scanning control method according to claim 13, wherein: The touch scan descriptor includes: Task field, used to define the scanning task sequence; Incremental field, used to indicate that the scan sequence number is automatically incremented and multiple scan commands are executed continuously in the same scan mode; The shared field is used to indicate that the setup time and / or recovery time are shared between adjacent scanning phases.
17. The scanning control method according to claim 16, wherein: The task field defines multiple scan tasks, each of which includes: The scan mode subfield is used to define any one of the following basic scan modes: active pen row scan, active pen column scan, active pen noise scan, finger row scan, finger column scan, finger noise scan, finger group scan, active pen uplink transmission, and short circuit detection scan; The scan sequence number subfield is used to define the touch electrode group number corresponding to the scan command; The scan behavior subfield is used to define any one of the following scan behaviors: capacitance compensation value preparation, capacitance compensation value update, and scan execution.
18. The scanning control method according to claim 10, wherein: The second level of analysis includes: generating a channel selection signal for a multiplexer according to the scan task sequence; Generates the integral control signal of the analog front-end circuit to control the charging and discharging of the capacitor to achieve charge-to-voltage conversion; Before executing the scan command, the compensation value is read from the capacitance compensation value address space and preloaded; At the beginning of the scanning task, the preloaded compensation value is latched into the capacitance compensation module; The detection data output by the analog-to-digital converter of the analog front-end circuit is written into the detection data storage address space and statistical operations are performed.
19. A touch control chip, integrated with the scanning control device according to any one of claims 1 to 9.
Citation Information
Patent Citations
Touch detection method and touch module
CN107515696A
Implementation method and device of multi-core cooperative controller
CN114924855A
Descriptor management method
CN116185891A
Flash memory controller and method thereof for accessing flash memory particles
CN116185892A
Input apparatus and program
US20190121494A1