Scanning control device, scanning control method and touch chip for touch panel
The two-level analytical scanning control scheme simplifies the control signal generation circuit structure of the touch chip, enables flexible scanning strategy adjustment and precise frame period management, and solves the problems of insufficient complexity and flexibility of scanning strategies in existing technologies.
Patent Information
- Application Number
- CN202511189631.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing touch chip scanning control methods are difficult to adjust the scanning strategy flexibly when faced with multiple touch methods, resulting in complex and inflexible control signal generation circuit designs that cannot meet the compatibility requirements of diverse scenarios.
A two-level parsing scanning control scheme is adopted. The scanning scheme is selected by the microprocessor, the descriptor parser parses the descriptor linked list to generate the scanning task sequence, and the scanning control signal is generated by the control signal generation circuit, thereby decoupling the scanning strategy from the control signal generation circuit.
The structure of the control signal generation circuit has been simplified, enabling flexible scanning scheme configuration and precise frame period control, adapting to the differences in physical characteristics and protocols of different touch panels.
Smart Images

Figure CN120669876B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of touch panel control, in particular, to a scanning control device for a touch panel, a scanning control method and a touch chip. BACKGROUND
[0002] Touch display devices are widely used in application scenarios such as tablet computers or vehicle display screens. The touch display device has both display and touch functions. The touch panel can support multiple touch modes, such as convenient finger touch operation and high-precision active capacitive pen operation, to meet the diversified input needs of users in different scenarios.
[0003] When using an active capacitive pen, the touch chip communicates with the capacitive pen in both directions. The capacitive pen sends a downlink signal to the touch chip at a specified time after receiving an uplink signal. The touch chip demodulates the received data packet to obtain information such as the pressure sensing value, button state, and battery state of the capacitive pen. Different capacitive pen protocols have different arrangements for the time slots of uplink and downlink. In the case of mixed touch of fingers and active capacitive pens, the scanning phase of the capacitive pen and the scanning phase of the finger touch need to be combined, and the scanning strategy needs to be dynamically adjusted during the process of the capacitive pen approaching, contacting, and leaving the touch panel. In order to support multiple touch modes of the touch panel, high requirements are put forward for the scanning control complexity and timing accuracy of the touch chip.
[0004] In existing touch chips, there are two common scanning control methods. The first method is to use a micro control unit (MCU) inside the touch chip to generate a timing interrupt using a timer. The micro control unit starts the touch scanning circuit to generate a scanning signal in the program code of the interrupt request. Since the micro control unit also needs to perform signal processing and calculation functions, it cannot respond to the timing interrupt in time. The second method is to use a digital circuit to implement the fixed scanning timing of the entire scanning strategy in a finite state machine, thereby achieving accurate timing. However, directly generating a fixed scanning timing for the entire scanning strategy will result in a complex and inflexible control signal generation circuit design, which is difficult to adapt to scenarios that require flexible modification of the scanning scheme. SUMMARY
[0005] In view of the above problems, the purpose of the present application is to provide a scanning control device for a touch panel, a scanning control method and a touch chip, wherein the scanning scheme is analyzed in two stages, and the time slot control and generation of the scanning control signal in the scanning phase and the non-scanning phase are implemented respectively, so as to flexibly configure the scanning scheme and simplify the circuit structure of the control signal generation circuit.
[0006] According to an aspect of the present application, there is provided a scanning control device for a touch panel, comprising: a microprocessor configured to select a scanning scheme according to a touch state; a descriptor parser connected to the microprocessor and configured to parse a descriptor chain table according to the scanning scheme to generate a scanning task sequence; and a control signal generation circuit connected to the descriptor parser and configured to parse the scanning task sequence to generate a scanning control signal.
[0007] Optionally, the descriptor chain table comprises a plurality of descriptors connected by address pointers, and the plurality of descriptors are selected from any one of the following: a time control descriptor configured to define time slots of a scanning phase and a non-scanning phase; a touch scanning descriptor configured to define the scanning task sequence; and a flow control descriptor configured to perform branch control of different scanning modes.
[0008] Optionally, the descriptor chain table adopts a linear address layout with word alignment, and each descriptor is composed of 1-4 consecutive 32-bit words, and a first word contains a 4-bit descriptor type field and an interrupt enable flag.
[0009] Optionally, the descriptor parser comprises: a finite state machine configured to sequentially read and parse the descriptor chain table; and a counter comprising a down counter and an up counter configured to count down or count up according to the time control descriptor.
[0010] Optionally, the time control descriptor comprises a timing descriptor, a delay descriptor and a wait descriptor, the down counter is loaded with an initial value corresponding to load data in the timing descriptor and starts to count down to realize counting down, and is reloaded with a next initial value only when the count value is zero, and the descriptor parser performs parsing of a next descriptor only after the down counter is loaded with the initial value each time to realize 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, the up counter starts to count up from zero when the delay descriptor starts to execute, and returns a delay completion signal when the count reaches a first preset value, and the descriptor parser performs parsing of a next descriptor; the up counter also starts to count up from zero when the wait descriptor starts to execute to realize counting up, and returns a wait success signal when the count is stopped upon receiving a trigger of an external event, and the descriptor parser performs parsing of a next descriptor; or the up counter returns a wait timeout signal when the count reaches a second preset value corresponding to load data in the wait descriptor without receiving the trigger of the external event, and the descriptor parser performs parsing of a next descriptor.
[0011] Optionally, the flow control descriptor comprises: a termination descriptor for instructing the descriptor parser to stop parsing and triggering an interrupt; and a comparison descriptor for comparing a value of a specified address in a data address space with a preset threshold, and selecting an address pointer of a next descriptor according to a comparison result to realize branch jump.
[0012] Optionally, the touch scanning descriptor comprises: a task field for defining a scanning task sequence; an increment field for instructing the control signal generation circuit to automatically increment a scanning sequence number, and continuously execute a scanning command multiple times in a same scanning mode; and a sharing field for instructing to share a setup time and / or a recovery time between adjacent scanning stages.
[0013] Optionally, multiple scanning tasks are defined in the task field, and each scanning task comprises: a scanning mode subfield for defining 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 transmission, and short circuit detection scanning; a scanning sequence number subfield for defining a touch electrode group number corresponding to the scanning command; and a scanning behavior subfield for defining any one of the following scanning behaviors: capacitance compensation value preparation, capacitance compensation value update, and scanning execution.
[0014] Optionally, the control signal generation circuit comprises: a channel selection signal generation module for generating a channel selection signal of a multiplexer according to the scanning task sequence; an integration control signal generation module for generating an integration control signal of an analog front-end circuit, and controlling charging and discharging of a capacitor to realize charge-to-voltage conversion; a capacitance compensation preparation module for reading a compensation value from a capacitance compensation value address space and preloading before executing a scanning command; a capacitance compensation update module for latching the preloaded compensation value to a capacitance compensation module at the beginning of a scanning task; and a data statistical storage module for writing detection data output by an analog-to-digital converter of the analog front-end circuit to a detection data storage address space and performing statistical operation.
[0015] According to another aspect of the present application, a scanning control method for a touch panel is provided, comprising: selecting a scanning scheme according to a touch state of the touch panel; obtaining a descriptor chain table according to the scanning scheme, and performing first-level parsing on the descriptor chain table to generate a scanning task sequence; and performing second-level parsing on the scanning task sequence to generate a scanning control signal.
[0016] Optionally, the descriptor chain table comprises a plurality of descriptors concatenated by address pointers, the plurality of descriptors being selected from any one of the following: a time control descriptor for defining time slots of scanning phases and non-scanning phases; a touch scanning descriptor for defining a sequence of scanning tasks; a flow control descriptor for performing branch control of different scanning modes.
[0017] Optionally, the descriptor chain table adopts a linear address layout with word alignment, each descriptor being composed of 1-4 consecutive 32-bit words, the first word containing a 4-bit descriptor type field and an interrupt enable flag.
[0018] Optionally, the first-level parsing comprises sequentially reading and parsing the descriptor chain table by using a finite state machine; and performing down-counting or up-counting by using a counter to complete time slot control defined by the time control descriptor.
[0019] Optionally, the time control descriptor comprises a timing descriptor, a delay descriptor and a wait descriptor, parsing the timing descriptor comprises loading an initial value corresponding to load data of the timing descriptor into a down-counting counter and starting down-counting, reloading a next initial value until the count value reaches zero, and performing parsing of a next descriptor by the descriptor parser after the down-counting counter loads the initial value each time, to achieve time slot control of scanning phases and non-scanning phases; parsing the delay descriptor comprises using an up-counting counter to start up-counting from zero until the count value reaches a first preset value, returning a delay completion signal, and then performing parsing of a next descriptor to insert a predetermined delay between adjacent scanning phases; and parsing the wait descriptor comprises using an up-counting counter to start up-counting from zero when the wait descriptor starts to execute, stopping counting when a trigger of an external event is received, returning a wait success signal and then performing parsing of a next descriptor; or using an up-counting counter to return a wait timeout signal when the up-counting count value reaches a second preset value corresponding to load data in the wait descriptor without receiving the trigger of the external event, and then performing parsing of a next descriptor.
[0020] Optionally, the flow control descriptor comprises a terminate descriptor for instructing to stop parsing and triggering an interrupt; and a compare descriptor for comparing a value of a specified address in a data address space with a preset threshold, and selecting an address pointer of a next descriptor according to a comparison result to achieve branch jump.
[0021] Optionally, the touch scanning descriptor comprises a task field for defining a sequence of scanning tasks; an increment field for instructing to automatically increment a scanning sequence number in a same scanning mode and continuously execute a plurality of scanning commands; and a share field for instructing to share setup time and / or recovery time between adjacent scanning phases.
[0022] Optionally, the task field defines a plurality of scan tasks, each scan task comprising: a scan mode subfield for defining 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 grouping scan, active pen uplink transmission, short circuit detection scan; a scan sequence number subfield for defining a touch electrode group number corresponding to the scan command; a scan behavior subfield for defining any one of the following scan behaviors: capacitance compensation value preparation, capacitance compensation value update, scan execution.
[0023] Optionally, the second-level parsing comprises: generating a channel selection signal of a multiplexer according to the scan task sequence; generating an integration control signal of an analog front-end circuit to control the charging and discharging of a capacitor to achieve charge-to-voltage conversion; reading a compensation value from a capacitance compensation value address space and preloading before executing a scan command; latching the preloaded compensation value to a capacitance compensation module at the beginning of a scan task; writing detection data output by an analog-to-digital converter of the analog front-end circuit to a detection data storage address space and performing statistical operation.
[0024] According to another aspect of the present application, there is provided a touch chip integrated with the above-mentioned scan control device.
[0025] The scan control device according to the embodiments of the present application performs two-level parsing on a scan scheme. The above-mentioned basic scan modes are encapsulated into descriptors, and descriptor chain tables are established for different scan strategies, so that the scan strategy and the hardware structure of the control signal generation circuit can be decoupled, and thus the scan scheme can be flexibly configured. Compared with the prior scheme in which the control signal generation circuit directly generates a fixed scan timing of the entire scan strategy, the control signal generation circuit in the scan control scheme of the present application only needs to parse the scan task sequence with a small number of configuration parameters, and thus the circuit structure of the control signal generation circuit can be simplified.
[0026] In the preferred embodiments, the descriptor parser uses a finite state machine to parse a plurality of descriptors in the descriptor chain table, uses a counter to count down to implement time slot control of the scan phase and the non-scan phase, and counts up to insert a predetermined delay or wait for the occurrence of an external event between adjacent scan phases, so that complex timing control of the scan phase can be implemented, and accurate frame period and intra-frame time allocation can be achieved.
[0027] In the preferred embodiments, the descriptor parser compares the statistical result (the value of a specified address in the data address space) of the touch scan with a preset threshold value. According to the comparison result, the address pointer of the next touch scan descriptor is selected to implement branch control of different scan modes, so that the subsequent scan mode can be dynamically adjusted, and real-time modification of the scan scheme can be implemented. Attached Figure Description
[0028] The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
[0029] Figure 1 A schematic diagram of the touch system is shown;
[0030] Figures 2a to 2c This illustrates a scanning strategy for hybrid touch detection using both fingers and active capacitive styluses in a touch system.
[0031] Figure 3 A schematic circuit diagram of the capacitance detection channel in a touch system is shown.
[0032] Figure 4 A schematic block diagram of a scanning control device according to a first embodiment of the invention is shown;
[0033] Figure 5 Show Figure 4 The circuit diagram shown is of the descriptor parser in the scan control device.
[0034] Figure 6a and Figure 6b Show Figure 5 The diagram shows the waveform of the descriptor parser as the counter counts down.
[0035] Figure 7a and Figure 7b Show Figure 5 The diagram shows the waveform of the descriptor parser as the counter counts up.
[0036] Figure 8 This shows a schematic data structure for the time control descriptor;
[0037] Figure 9 This shows a schematic data structure for a flow control descriptor;
[0038] Figure 10 This shows a schematic data structure for a touch scan descriptor;
[0039] Figure 11 The diagram shows the scanning control signal waveforms for a finger column scanning mode represented by a touch scan descriptor.
[0040] Figure 12 The diagram shows the scanning control signal waveforms for a finger grouping scanning mode represented by a touch scan descriptor.
[0041] Figure 13 The diagram shows the scanning control signal waveforms combining finger group scanning mode and finger column scanning mode, represented by touch scanning descriptors.
[0042] Figure 14 A dynamic data structure showing descriptor links is illustrated.
[0043] Figure 15 A flow chart showing a touch panel scan control method according to a second embodiment of the present application is illustrated. DETAILED DESCRIPTION
[0044] The present application will be described in more detail by referring to the attached drawings. Like elements are denoted by like reference numerals throughout the various drawings. Individual parts in the drawings are not drawn to scale for the sake of clarity. Further, certain well-known parts can not be shown.
[0045] Figure 1 A structural schematic of a touch system 100 is shown. The touch system includes a touch panel 110, a plurality of touch chips 120, and a plurality of signal lines 101 connecting the touch panel 110 and the touch chips 120. The touch panel 110 includes a plurality of touch electrodes 102, which are usually made of transparent conductive material (e.g. indium tin oxide, ITO), each having a size of about 5mm x 5mm. The signal lines 101 are used to transmit touch driving signals and collect touch sensing signals.
[0046] In practical applications, the touch system 100 is integrated with a 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 correspondingly. The number of capacitive detection channels that a single touch chip 120 can support is limited. In large-size application scenarios such as tablet computers or vehicle display screens, two or more touch chips 120 are usually configured to work in a cascaded manner to achieve complete detection coverage of the entire touch panel.
[0047] The touch panel 110 supports multiple touch modes, including touch operations of the finger 103 and touch operations of the active stylus 104. To detect the touch operations of the finger, the touch chip 120 provides a driving signal to the touch electrode 102 and detects a change in capacitance on the touch electrode 102. To detect the touch operations of the active stylus, the touch chip 120 sends an uplink communication signal to the active stylus 104 through the touch electrode 102, which is encoded using a direct sequence spread spectrum (DSSS) technique to enhance interference resistance and communication reliability. After receiving the uplink signal, the active stylus 104 returns a downlink signal through the touch panel 110 within a specific time window according to a preset protocol, which transmits data such as pressure sensing values, button states, and battery states using a binary phase shift keying (BPSK) or quadrature phase shift keying (QPSK) modulation method. After receiving the downlink signal, the analog front end (AFE) of the touch chip 120 extracts the data packet content through a demodulation module and transmits the parsed data to a microcontroller unit (MCU) for subsequent processing.
[0048] Figures 2a to 2c A scanning strategy for mixed touch detection of a finger and an active stylus in a touch system is shown.
[0049] In a touch system with mixed touch detection, different active stylus protocols have different time slot requirements for uplink and downlink signals, and finger touch scanning needs to be dynamically coordinated with active stylus communication time slots. The touch chip 120 adjusts the scanning timing in real time to avoid signal conflicts at different stages of the active stylus approaching, contacting, and leaving the touch panel 110. For example, when the active stylus 104 is in a contact state, the touch chip 120 needs to prioritize the reception window of the downlink signal, and at the same time, complete the capacitance detection of the finger touch in the non-communication period through time division multiplexing (TDM) technology, so as to realize the synchronous execution of touch positioning and active stylus communication.
[0050] However, due to significant differences in hardware architecture, communication protocols, and parameter configurations of different manufacturers, the touch chip needs to cope with diversified scanning strategy requirements. For example, the uplink communication time slot of the active stylus may have a millisecond-level time offset due to different protocol versions, the electrode driving frequency of the finger scanning needs to be dynamically adjusted according to the panel material characteristics, and the sampling period of noise detection needs to match the environmental interference characteristics. These differences make it difficult for traditional fixed timing scanning control schemes to meet the compatibility requirements in complex scenarios.
[0051] The inventors have noticed that in a touch system, different scanning strategies are combined by multiple scanning phases, each of which can be defined as a corresponding basic scanning pattern.
[0052] Referring to Figure 2a In a detection state of the touch panel, each scanning frame includes a continuous pen-up transmission phase, a finger scanning phase, a pen-down detection phase, a noise detection phase, and a blank phase. The scanning strategy is used to detect whether there is a touch operation. Since there is a blank phase in the scanning frame, the purpose of power saving can be achieved.
[0053] Referring to Figure 2b In a state of detecting hand scanning and pen hovering, each scanning frame includes a repeated pen-up transmission phase, a finger scanning phase, and a pen-down detection phase. The time allocation of the scanning frame in the scanning strategy is that the finger scanning phase is given priority, i.e., the time slot of the finger scanning phase is longer than that of the pen-up transmission phase and the pen-down detection phase. The scanning strategy can guarantee the high response speed requirement of the finger touch, and detect whether there is a touch operation of the active capacitive pen.
[0054] Referring to Figure 2c In a state of detecting hand scanning and pen contact, each scanning frame includes a repeated pen-up transmission phase, a finger scanning phase, and a pen-down detection phase, and a noise detection phase is inserted in the scanning frame. The time allocation of the scanning frame in the scanning strategy is still that the finger scanning phase is given priority, but the time slot of the pen-down detection phase is lengthened and the time slot of the finger scanning phase is correspondingly reduced, compared with the state of pen hovering. The scanning strategy can take into account the response speed requirements of the finger touch and the active capacitive pen touch.
[0055] The inventors propose that the above-mentioned basic scanning patterns are encapsulated into descriptors, and a descriptor chain table is established for different scanning strategies, so that the decoupling of the scanning strategy and the hardware structure of the control signal generation circuit can be realized, and thus the scanning scheme can be flexibly configured. Further, two-level analysis is performed on the descriptor chain table, for example, a finite state machine is used to perform first-level analysis on the time control descriptor to realize time slot control of the scanning phase and the non-scanning phase, and a control signal generation circuit is used to perform second-level analysis to generate a scanning control signal, so that accurate frame period and intra-frame time allocation can be realized, and the circuit structure of the control signal generation circuit can be simplified.
[0056] Figure 3 A schematic circuit diagram of a capacitive detection channel in a touch system is shown. The capacitive detection channel 10 includes a multiplexer MUX, an analog front-end circuit AFE, and an analog-to-digital converter ADC.
[0057] Referring to Figure 1 and Figure 3 The equivalent circuit of the plurality of touch electrodes 102 in the touch panel 110 is represented as a capacitance Cf or Cp, representing the change in capacitance caused by a finger touch and the inherent capacitance of the touch panel, respectively.
[0058] The plurality of touch electrodes 102 are connected to a multiplexer MUX in a touch chip 120 via a plurality of signal lines 101. The multiplexer MUX includes a plurality of single-pole triple-throw switches S1 for selectively connecting the touch electrodes 102 to an analog front-end circuit AFE according to a channel selection signal, or for receiving an excitation signal Vstim, or to ground. The single-pole triple-throw switches S1 here can be implemented by MOS transistors, which are used as switch tubes to realize on-off control.
[0059] In a self-capacitance detection scheme, the plurality of touch electrodes 102 are scanned individually, and whether a finger is close is determined by measuring the change in capacitance to ground. The 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 receives the excitation signal Vstim.
[0060] In a mutual-capacitance detection scheme, the plurality of touch electrodes 102 are arranged in pairs as a transmitting electrode Tx and a receiving electrode Rx. The multiplexer MUX provides the excitation signal Vstim to the selected transmitting electrode, and connects the selected receiving electrode to the analog front-end circuit AFE, and connects the unselected transmitting electrodes and receiving electrodes to ground.
[0061] The analog front-end circuit AFE includes a capacitance compensation module 11, an operational amplifier 12, a buffer 13, a feedback capacitance Cfb, and second and third switches S2 and S3. The second switch S2 is connected to the inverting input terminal of the operational amplifier 12, for providing the touch electrode signal selected by the multiplexer MUX to the inverting input terminal of the operational amplifier 12. The capacitance compensation module 11 receives a capacitance compensation value, for generating a corresponding capacitance compensation signal according to the position of the selected touch electrode, to compensate for the parasitic capacitance of the touch electrode at different positions. The feedback capacitance Cfb and the third switch S3 are connected in parallel between the inverting input terminal and the output terminal of the operational amplifier 12.
[0062] The analog front-end circuit AFE receives an integration control signal for controlling the switching state of the second and third switches S2 and S3. To realize charge and discharge control of the capacitance Cfb, the charge on the capacitance is converted into a voltage, and the capacitance is measured by measuring the change in voltage.
[0063] In the self-capacitance detection scheme, the non-inverting input of the operational amplifier 12 is connected to ground. 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 excitation signal Vstim. The differential signal between the touch electrode signal and the excitation signal Vstim is integrated to generate the detection signal Vout.
[0064] The buffer 13 performs impedance matching and signal enhancement processing on the detection signal Vout to ensure the integrity of the analog signal during transmission. The buffer 13, for example, adopts a unit gain amplification structure, with its input connected to the output of the operational amplifier 12 and its output connected to the input of the analog-to-digital converter ADC. The buffer 13 can effectively isolate the load effect of the subsequent analog-to-digital converter ADC sampling on the front-end integration circuit, avoiding signal distortion caused by the mismatch between the internal resistance of the signal source and the input impedance of the analog-to-digital converter ADC.
[0065] The analog-to-digital converter ADC performs analog-to-digital conversion on the detection signal Vout to obtain detection data.
[0066] In the above-described capacitance detection channel, time-division multiplexing is used, so that multiple touch electrodes 102 can share the front-end circuit AFE and the analog-to-digital converter ADC.
[0067] Figure 4 A schematic block diagram of a scan control device according to a first embodiment of the application is shown. The scan control device 20 includes a microprocessor 21, a descriptor parser 22, a control signal generation circuit 23, a configuration module 24, and a data address space 25, which are connected via a high-performance system bus (for example, the AHB bus of ARM Company).
[0068] In the data address space 25, a descriptor chain table address space, a capacitance compensation value address space, and a detection data storage address space are allocated.
[0069] In the descriptor chain table address space, the storage structure of the descriptor chain table address space adopts a word-aligned linear address layout. In the capacitance compensation value address space, a list of compensation values related to touch electrode positions is stored. In the detection data storage address space, detection data obtained by the analog-to-digital converter ADC in the capacitance detection channel is stored.
[0070] The storage structure of the descriptor consists of 1 to 4 consecutive 32-bit words. The first word (Word0) contains a 4-bit code field (bits 31 to 28) for identifying the descriptor type, such as TIMER, WAITN, SCAN, etc.; wherein the 27th bit is set as an interrupt enable flag (I), when the bit is high, the descriptor parser will trigger an MCU interrupt request (IRQ) through a hardware signal after completing the operation corresponding to the descriptor.
[0071] In the scan control device 20, the microprocessor 21 selects a scan scheme according to the touch state of the touch panel. For example, Figure 2a 、 Figure 2b and Figure 2c one of the scan schemes shown in FIGS.
[0072] The descriptor parser 22 acquires the corresponding descriptor chain table according to the scan scheme, performs a first-level analysis of the scan scheme, implements time slot control of the scan phase and the non-scan phase according to the time control descriptor, and parses the touch scan descriptor into a scan task sequence.
[0073] 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.
[0074] In the descriptor parser 22, the control module parses the descriptor chain table to generate a scan task sequence. The descriptor chain table includes a plurality of descriptors connected by address pointers, and the plurality of descriptors include any one of a time control descriptor (a timing descriptor TIMER, a delay descriptor WAITN, and a wait descriptor WAITX), a flow control descriptor (a termination descriptor TMNT and a comparison descriptor COMP), and a touch scan descriptor SCAN, wherein the touch scan descriptor is used to define a scan task sequence, the time control descriptor is used to control the time slot of the scan phase and the non-scan phase, and the flow control descriptor is used to perform branch control of different scan modes.
[0075] The down-counting module constructs a tick clock domain based on a stable clock source such as an external quartz crystal oscillator, a phase-locked loop, and an oscillator, and realizes the accurate time limit length defined by the timing descriptor TIMER in a down-counting manner. The up-counting module constructs a tick clock domain based on the stable clock source, and realizes the accurate delay time defined by the delay descriptor WAITN and the accurate wait time defined by the wait descriptor WAITX in an up-counting manner.
[0076] The comparison logic module accesses a specified address in the detection data address space through the AHB bus, performs numerical operation on the read detection data value and the preset threshold in the descriptor, and selectively jumps to the linked list branch address according to the comparison result.
[0077] The decoding module identifies the descriptor type by analyzing the 31-28 bit encoding field of the first word of the descriptor, and extracts the interrupt enable flag I. When the flag is valid and the current descriptor execution is completed, the MCU interrupt request is triggered through a hardware signal.
[0078] The buffer management module is responsible for data interaction between the AHB bus and the FIFO buffer, and supports register configuration update and data migration operation.
[0079] The control signal generation circuit 23 analyzes the scan task sequence to generate the scan control signal of the capacitive detection channel, including Figure 3 The channel selection signal of the multiplexer MUX, the capacitive compensation value of the analog front-end circuit AFE, and the integral control signal.
[0080] Specifically, the control signal generation circuit 23 includes a channel selection signal generation module, an integral control signal generation module, a capacitive compensation preparation module, a capacitive compensation update module, and a data statistics storage module.
[0081] The channel selection signal generation module generates the channel selection signal of the multiplexer MUX according to the scan task sequence, which is divided into two types, SEL_RX signal and SEL_STIM signal. 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 excitation signal Vstim.
[0082] The integral control signal generation module generates the integral control signal of the analog front-end circuit AFE according to the scan task sequence, which is used to control the timing of the second switch S2 and the third switch S3. In the integration stage, S2 is closed and S3 is opened, so that the operational amplifier 12 and the feedback capacitor Cfb form an integration circuit; in the reset stage, S2 is opened and S3 is closed, so that the feedback capacitor Cfb is discharged. The process of converting charge to voltage is realized by charging and discharging the capacitor Cfb.
[0083] The capacitive compensation preparation module reads the compensation parameters of the corresponding touch electrode from the capacitive compensation value address space according to the capacitive compensation value address in the descriptor, and preloads them to the compensation register through the capacitive compensation preparation operation. The capacitive compensation update module latches the preloaded compensation value to the capacitive compensation module 11 at the beginning of the scan task, and eliminates the parasitic capacitance difference of the touch electrode by dynamically adjusting the equivalent value of the feedback capacitor Cfb.
[0084] The data statistics storage module receives detection data outputted by the analog-to-digital converter (ADC), writes the detection data into a detection data storage address space according to a storage address specified by the descriptor, and calculates state parameters of the touch panel, including a maximum value, an average value and a noise intensity of a capacitance value, through the data statistics storage module.
[0085] The configuration module 24 is configured to set configuration parameters of the control signal generation circuit 23, for example, to adjust timing parameters of the integral control signal, to modify a mapping relationship of the capacitance compensation value address space, and to configure a sampling window length of the data statistics storage module. Due to the dynamic configuration capability of the configuration module 24 to the control signal generation circuit 23, the scan control device 20 can load a parameter set matched with the active pen protocol and adapt to differences in physical characteristics of different touch panels.
[0086] Further, the configuration module 24 obtains state parameters of the touch panel from the data statistics storage module of the control signal generation circuit 23, and the microprocessor 21 analyzes the state parameters of the touch panel obtained from the configuration module 24 through the AHB bus to obtain a touch state of the touch panel. In addition, the descriptor parser 22 also obtains the state parameters from the configuration module 24 through the AHB bus when executing the subsequent comparison descriptor COMP.
[0087] Figure 5 The circuit schematic diagram of the descriptor parser in the scan control device is shown. Figure 4 The descriptor parser 22 includes a finite state machine (FSM) and a counter (CNT). The finite state machine FSM is located in the control module, for example, and is configured to sequentially read and parse the descriptor chain table. The counter CNT includes two groups of counters, one group being a down counter, which is configured to implement down counting to achieve down timing, and the other group being an up counter, which is configured to implement up counting to achieve up timing.
[0088] The down counting module is configured to build a tick clock domain based on the stable clock source, and includes a down counter (tick dn cnt), which is configured to implement down counting to achieve a precise time limit length defined by the timing descriptor TIMER. The up counting module is configured to build a tick clock domain based on the external crystal oscillator, and includes an up counter (tick up cnt), which is configured to implement up counting to achieve a precise delay defined by the delay descriptor WAITN and a precise waiting defined by the waiting descriptor WAITX.
[0089] Figure 5The down-counting counter is taken as an example. The timer descriptor TIMER adopts a down-counting counter (tick dn cnt), and the maximum count can reach 0x7FF_FFFF periods. The timer descriptor TIMER is used to give a specified time (the time from the initial value to 0 in a down-counting manner). After the finite state machine FSM receives the timer descriptor TIMER, the initial value corresponding to the load data in the timer descriptor is loaded as long as the down-counting counter (tick dn cnt) is idle, and a "loading complete" signal is returned, and the down-counting starts from the initial value. And after the loading of the initial value is completed, the descriptor parser can perform the parsing of the next descriptor. However, after the initial value is loaded and the counting starts, the count cannot continue to load a new initial value until the count reaches 0, and then the next initial value is reloaded. That is, the descriptor parser cannot start the next counting process before the current counting process is completed, but can carry out the tasks represented by other types of descriptors, such as scanning, branching (or copying), and the like. Then the count command corresponding to the next timer descriptor TIMER can only be loaded after the previous count command ends and the count down to 0. That is, after the initial value corresponding to the timer descriptor TIMER is loaded by the down-counting counter, the descriptor parser can perform the parsing of the next descriptor. If the count value does not reach zero, it will not be reloaded, so the descriptor parser needs to wait for the end of the down-counting and then perform the parsing of the next descriptor after reloading, thereby realizing time slot control and ensuring the continuity and tightness of the count down.
[0090] In combination Figure 6a If the parsing of the next timer descriptor TIMER is completed (the t_timer_rld_req signal is received) before the count of the previous timer descriptor TIMER ends, the descriptor parser needs to wait for the previous counter to count down to 0, and then reload the new initial value and return the t_timer_rld_ack signal (loading completion signal) to start a new round of counting and descriptor parsing. During the loading process of the counter, the preparation of data is performed in the tick clock domain, and the tick dn cnt can perform the count value minus one or reload at each tick clock edge, so the time slot length can be accurately controlled by using the timer descriptor. See Figure 6bIn abnormal condition, it is possible that tick dncnt has not received the t_timer_rld_req signal from the ahb clock domain after the countdown to 0, in which case, the "timer run over" flag needs to be set to indicate that the task has not been completed within the time limit defined by the timer descriptor TIMER due to the failure of the descriptor parser to handle and execute other descriptors in parallel.
[0091] Both the delay descriptor WAITN and the wait descriptor WAITX use a tick up cnt, which counts up to 0xFF_FFFF cycles. Since both commands use the same tick up cnt, they can only be executed sequentially. The delay descriptor WAITN is used to insert a predetermined delay between adjacent scan phases by counting up to the predetermined delay. The wait descriptor WAITX also counts up to wait for an external event to stop the count. Since the descriptor parser works in the ahb clock domain of the system bus, and the tick up cnt works in the tick clock domain, the t_waitn_req / t_waitx_req signals from the ahb clock domain to the tick clock domain, and the h_waitn_ack / h_waitx_ack / h_waitx_tout signals from the tick clock domain to the ahb clock domain, all need to be synchronized by the synchronization logic, which results in the time controlled by the WAITN and WAITX descriptors being slightly longer than the specified time.
[0092] Referring to Figure 7a, the up-counting counter tick up cnt completes the delay time defined by the delay descriptor WAITN according to two signals t_waitn_req and t_waitn_ack. That is, after the delay descriptor WAITN is parsed, the up-counting counter first acquires a first preset value corresponding to the load data in the delay descriptor WAITN, and starts counting up from zero until the first preset value is reached, so as to complete the delay and return a "delay completion" signal corresponding to the t_waitn_ack signal, and then the descriptor parser performs parsing of the next descriptor. Similarly, after the parsing of the wait descriptor WAITX is completed, the up-counting is started after the t_waitx_req signal is valid, the up-counting counter first acquires a second preset value corresponding to the load data in the wait descriptor WAITX, and starts counting up from zero, that is, the count value is accumulated from 0 to the second preset value, so as to realize up-counting. In this process, if the t_ext_evt_sync signal is received, it indicates that the specified external event is received, that is, the up-counting is ended in advance when the external event is triggered in the process of counting up from zero, 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. Referring to Figure 7b If the up-counting counter does not receive the t_ext_evt_sync signal of the tick clock domain within the entire waiting time range of counting up from zero to the second preset value, it indicates that the external event is not triggered, and the t_waitx_tout signal is returned, that is, the "wait timeout" signal is returned, and an error flag is recorded, and the descriptor parser continues to parse the next descriptor. It is noted that the t_waitx_tout / t_waitx_ack are mutually exclusive, and only one signal can be generated and synchronized to the ahb clock domain to return the waiting result to the descriptor parser.
[0093] The two descriptors of up-counting are sequentially executed, and no conflict occurs when the up-counting counter is used. The first preset value and the second preset value can be the same or different according to actual needs.
[0094] Figure 8 A schematic data structure of the time control descriptor is shown.
[0095] In this example, the time control descriptor includes the timing descriptor TIMER, the delay descriptor WAITN, and the wait descriptor WAITX.
[0096] The timer descriptor TIMER consists of two words, which in turn include a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, a 27-bit payload field PAYLOAD, and an address field ptr_next (pointer next) of the last word (Word N).
[0097] The initial value of the countdown is stored in the payload field PAYLOAD of the timer descriptor TIMER.
[0098] The delay descriptor WAITN and the wait descriptor WAITX each consist of two words, which in turn include a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, a 3-bit control option field CMD_OPT, a 24-bit payload field PAYLOAD, and an address field ptr_next (pointer next) of the last word (Word N).
[0099] The count value corresponding to the predetermined delay is stored in the payload field PAYLOAD of the delay descriptor WAITN, and the preset value of the up-count is stored in the payload field PAYLOAD of the wait descriptor WAITX.
[0100] Figure 9 An exemplary data structure of the flow control descriptor is shown.
[0101] In this example, the flow control descriptor includes a terminate descriptor TMNT and a compare descriptor COMP. The terminate descriptor TMNT is used to instruct the descriptor parser 22 to stop parsing and trigger an interrupt. The compare descriptor COMP is 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 achieve branch jump.
[0102] The terminate descriptor TMNT consists of one word, which in turn includes a 4-bit descriptor type field CMD, a 1-bit interrupt enable flag I, and a 27-bit reserved field Rsvd.
[0103] The terminate descriptor TMNT indicates that the descriptor parser needs to stop working, and usually sets the flag of the interrupt enable flag I. After the execution of this descriptor is completed, an interrupt request is sent to the microprocessor 21.
[0104] The compare descriptor COMP consists of four words, which in turn include 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.
[0105] When the descriptor parser 22 parses the comparison descriptor COMP, the data address space is accessed according to the A address field to obtain the value of A, the value of B is obtained directly from the B data field, and then A is compared with B, which is the aforementioned preset threshold value. In the case that A is less than B, the first descriptor physical address pointer is selected as the next descriptor physical address pointer. In the case that 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 realize the functions of branching and jumping.
[0106] Figure 10 An exemplary data structure of a touch scan descriptor is shown.
[0107] In this example, the touch scan descriptor SCAN is composed of 3 words, including in order: 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 sharing 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 a last word (Word N) of an address field ptr next (pointer next) for storing the next descriptor physical address pointer.
[0108] 1) Task fields JOB in the touch scan descriptor SCAN
[0109] The task fields of the touch scan descriptor SCAN are used to define a scan task sequence, including: a first task field JOB 1ST, a second task field JOB 2ND, and a third task field JOB 3RD. Each task field includes a plurality of scan tasks, and each scan task includes a plurality of subfields: a scan mode subfield CMD SC, a scan behavior subfield CMD EXE, and a scan sequence number subfield CMD ID. The touch scan descriptor SCAN is used to define a scan task sequence of a scan command, and according to the contents of the three task fields, the scan task sequence can include at least one task among the first to third tasks.
[0110] In the subfields of the above-mentioned task field, the scan mode subfield CMD_SC is used to define the basic scan mode of one scan phase in a scan frame. In a touch system supporting hybrid touch mode, the scan mode subfield CMD_SC defines a total of 9 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.
[0111] In the subfields of the above-mentioned task field, the scan sequence number subfield CMD_ID is used to define the touch electrode group number corresponding to one scan command in a scan phase. Different group numbers can be specified for different scan tasks in a plurality of scan tasks of one scan command. The scan sequence number subfield CMD_ID is used to set the real-time scan parameters of the control signal generation circuit, including: channel selection signal (SEL_RX signal / SEL_STIM signal), read address of the capacitance compensation value address space, and write address of the detection data storage space.
[0112] In the subfields of the above-mentioned task field, the scan behavior subfield CMD_EXE is used to define the scan behavior of one scan command in a scan phase. One scan command is a scan task sequence composed of up to 3 scan tasks, and one scan behavior is executed in each scan task, including: capacitance compensation value preparation SFT (cneg shift), capacitance compensation value update LAT (cneg latch), and scan execution EXE (scan_exe).
[0113] Referring to Figure 3 and Figure 4 Before executing each scan command, the capacitance compensation update module in the control signal generation circuit 23 pre-loads the 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 generation circuit 23 is used to control the switching action of the second switch S2 and the third switch S3 in the multiplexer MUX, to selectively connect each touch electrode 102 to the analog front-end circuit AFE, while completing the discharging process. Then, the integration control signal generated by the control signal generation circuit 23 is used to control the switching action in the analog front-end circuit AFE to control the integration and reset timing, while 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, the preparation work of the capacitance compensation value required for the next scan can be performed.
[0114] In the case that 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 sent to the control signal generation circuit simultaneously:
[0115] The first task: the capacitance compensation value update of the third finger column scan, CMD_SC = FC, CMD_ID = 3, CMD_EXE = LAT.
[0116] The second task: the scan execution of the third finger column scan, CMD_SC = FC, CMD_ID = 3, CMD_EXE = EXE.
[0117] The third task: the capacitance compensation value preparation of the fourth finger column scan, CMD_SC = FC, CMD_ID = 4, CMD_EXE = SFT.
[0118] Referring to Figure 11 , the scan mode CMD_SC of the touch scan descriptor SCAN is finger column scan FC. The descriptor parser 22 parses the descriptor chain table composed of touch descriptors to generate continuous scan commands. Each scan command is used to drive the corresponding column of touch electrodes 102 to perform finger column scan. Multiple finger column scans can realize the position scan of the entire screen.
[0119] In Figure 11 , the scan control signal includes channel selection signals corresponding to SEL_RX<0:4> and SEL_STIM<0:4> in the figure, and channel ground signal SEL_VCOM, which is used to set the switch state of multiple single-pole triple-throw switches S1 in the multiplexer MUX to select the touch electrodes 102 connected to the analog front-end circuit AFE column by column. The scan control signal also includes the excitation signal Vstim and the detection data ADC_DAT. Taking a touch panel including 5 columns of touch electrodes 102 as an example, a descriptor chain table composed of 5 touch descriptors can be used to obtain the capacitance detection signals of the 5 columns of touch electrodes 102 respectively within the finger touch scan time, so as to obtain the position of the finger on the touch panel.
[0120] Referring to 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 chain composed of the touch descriptors, and generates continuous scan commands. Each scan command is used to connect multiple columns of touch electrodes 102 together in the capacitive detection channel to form multiple groups. The multiple columns of touch electrodes 102 are driven to perform finger group scan repeatedly or only once to achieve position scanning of the entire screen. Using group scan can obtain the capacitive change value on the screen in a short time, and simply confirm whether a finger contacts the touch panel, but cannot distinguish the specific finger position in detail.
[0121] In Figure 12 , the scan control signal includes a channel selection signal corresponding to SEL_RX<0:4> and SEL_STIM<0:4> in the figure, and a channel ground signal SEL_VCOM, which is used to set the switch state of multiple single-pole triple-throw switches S1 in the multiplexer MUX, and connect multiple columns of touch electrodes 102 to the analog front-end circuit AFE. The scan control signal also includes an excitation signal Vstim and a detection data ADC_DAT. Taking a touch panel including 5 columns of touch electrodes 102 as an example, using a descriptor chain list composed of 1 touch descriptor, the capacitive detection signal of the 5 columns of touch electrodes 102 can be obtained within the group touch scan time, so as to obtain the judgment result of whether a finger contacts the touch panel.
[0122] 2) Increment field INC in the touch scan descriptor SCAN
[0123] According to the application of the control signal generation circuit, the increment field INC is arranged in the touch scan descriptor SCAN, which is used to instruct the control signal generation circuit 23 to automatically increment the scan sequence number. Using a single touch scan descriptor SCAN, multiple scan commands can be continuously executed according to the same scan mode. In the case that the scan mode subfield CMD_SC of the touch scan descriptor SCAN is finger column scan FC, and the scan behavior subfield CMD_EXE is scan execution EXE, the increment field INC is set to 4. After the control signal generation circuit 23 receives a single touch scan descriptor SCAN, the scan sequence number subfield CMD_ID is automatically incremented, and a new capacitive compensation value is automatically loaded, to generate 5 times of scan control signals, which are equivalent to sequentially executing the following 5 scan commands.
[0124] 0, capacitive compensation value update + scan execution of finger column scan 0 + capacitive compensation value preparation of finger column scan 1;
[0125] 1, capacitive compensation value update + scan execution of finger column scan 1 + capacitive compensation value preparation of finger column scan 2;
[0126] 2. Capacitance compensation value update + scan execution of finger column scan 2 + capacitance compensation value preparation of finger column scan 3;
[0127] 3. Capacitance compensation value update + scan execution of finger column scan 3 + capacitance compensation value preparation of finger column scan 4;
[0128] 4. Capacitance compensation value update + scan execution of finger column scan 4 + capacitance compensation value preparation of finger column scan 0.
[0129] The scheme of parsing a single touch scan descriptor to realize column-by-column scanning by using the increment field INC in the touch scan descriptor SCAN can greatly simplify the maintenance of the touch scan descriptor SCAN and save the preparation time and end time required by the control signal generation circuit to respectively execute multiple scan commands.
[0130] 3) Shared field SHARE in the touch scan descriptor SCAN
[0131] Referring to 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.
[0132] However, when multiple different scan modes are arranged in succession, in some cases, the setup time and the recovery time corresponding to the discharge preparation of the scan can be saved, so the shared field SHARE is added to indicate that the setup time and / or the recovery time are shared between adjacent scan phases. The setup time cannot be omitted for the first scan phase, and the recovery time cannot be omitted for the last scan phase. Then, under the combination of different touch scan descriptors SCAN, the scan control logic can obtain flexible scan command combinations.
[0133] As shown in Figure 13 , taking the combination of the finger grouping scan GS and the finger column scan FC as an example, in the descriptor linked list combining two scan phases, SHARE = FIRST / AMONG / LAST can be used to flexibly save the setup time and the recovery time of adjacent scan phases. Specifically, compared with Figure 11 and Figure 12 , the recovery time in the finger grouping scan phase and the setup time in the finger column scan phase are saved, and the two scan phases share the same setup time and the same recovery time.
[0134] Figure 14 The dynamic data structure of the descriptor link is shown.
[0135] As shown in Figure 14As 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 the finger grouping scan GS, and the 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 statistics of the grouping touch scan (corresponding to the value of the specified address in the data address space) with the finger detection threshold value (corresponding to the preset threshold value). According to the comparison result, the address pointer of the next touch scan descriptor SCAN is selected to realize the branch control of different scan modes, so as to dynamically adjust the subsequent scan mode.
[0136] If the maximum value in the statistics of the previous grouping touch scan is found to be greater than the finger detection threshold value, it is determined that the state of the touch panel is 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 the 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 grouping scan GS. The descriptor chain composed of the first to third touch scan descriptors defines the scan strategy of finger grouping scan GS + finger column scan FC + finger grouping scan GS, wherein the finger grouping scan GS is used to obtain the rough position of the finger, and the finger column scan FC is used to obtain the accurate position of the finger.
[0137] If the maximum value in the statistics of the previous grouping touch scan is found to be less than the finger detection threshold value, it is determined that the state of the touch panel is the 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 the finger noise scan NF. The descriptor chain composed of the first touch scan descriptor and the fourth touch scan descriptor defines the scan strategy of finger grouping scan GS + finger noise scan NF, wherein the finger grouping scan GS is used to quickly detect whether the state of the touch panel is the touch state, and the finger noise scan NF is used to obtain the environmental noise baseline data to optimize the subsequent scan strategy.
[0138] Figure 15 A flow chart of the touch panel scan control method according to the second embodiment of the present application is shown.
[0139] In step S11, a scan scheme is selected according to the touch state of the touch panel.
[0140] 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 a plurality of preset scan schemes according to the current state, and determines the starting address of the corresponding descriptor chain table at the same time.
[0141] In step S12, the descriptor chain table is acquired according to the scanning scheme, and the descriptor chain table is parsed in a first level to generate a scanning task sequence.
[0142] The descriptor parser acquires the descriptor chain table, and reads each descriptor composed 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 category of the descriptor: if it is a time control descriptor, a down-counting counter is used to decrease from the initial value corresponding to the load data to zero to accurately control the time slot of the current scanning stage, or an up-counting counter is used to count to a set count value to insert a fixed delay between adjacent stages, or an up-counting counter is used to count from zero to a preset value corresponding to the load data, and the waiting for the triggering of an external event or the end of counting is performed during the counting; if it is a touch scanning descriptor, the task field is extracted, one or more scanning tasks are generated according to the scanning mode subfield, the scanning sequence number subfield and the scanning behavior subfield, and the scanning sequence number is automatically incremented to continuously execute the same scanning mode when the increment field is valid, and adjacent scanning tasks are made to share the setup time and / or the recovery time when the sharing field is valid, and finally all the parsed scanning tasks are sequentially arranged into a scanning task sequence; if it is a flow control descriptor, the parsing is stopped and an interrupt is triggered to end the flow when a termination descriptor appears, or the value of the specified address in the data address space is read and compared with a preset threshold when a comparison descriptor appears, and branch control is implemented by jumping to a new descriptor address according to the comparison result.
[0143] In step S13, the scanning task sequence is parsed in a second level to generate scanning control signals.
[0144] The control signal generation circuit parses the scanning task sequence in the second level. The channel selection signals required by the multiplexer are generated according to the scanning mode and the scanning sequence number in the scanning task. The start, stop or reset of the analog front-end integrator is outputted according to the scanning mode and the integration time parameter. Before the scanning command is executed, the capacitor compensation preparation module reads the corresponding compensation value from the capacitor compensation value address space and preloads it. When the current scanning task starts, the capacitor compensation update module latches the preloaded compensation value to the capacitor compensation module. After the analog-to-digital converter outputs the detection data, the data statistics storage module writes the detection data to the detection data storage address space and performs operations such as averaging and peak value statistics.
[0145] The scanning control method of the present embodiment is based on the scanning control device described above, so the details of the above embodiments will not be repeated here, but those skilled in the art can apply the working principles of the above embodiments to the scanning control method of the present embodiment.
[0146] In accordance with the practices of the art, these embodiments have been described with the understanding that the present application is susceptible to myriad modifications in the component elements and arrangements are not limited to the specific embodiments described herein as these could be susceptible to changes without departing from the spirit and scope of the application as understood by one of ordinary skill in the art. It will be apparent, however, to those skilled in the art that numerous modifications can be made without departing from the scope of the application. Accordingly, other embodiments are within the scope of the following claims.
Claims
1. A scanning control device for a touch panel, comprising: a microprocessor configured to select a scanning scheme according to a touch state; a descriptor parser connected to the microprocessor and configured to parse a descriptor chain list to generate a scanning task sequence according to the scanning scheme, the descriptor chain list comprising a plurality of descriptors concatenated by address pointers; and a control signal generation circuit connected to the descriptor parser and configured to parse the scanning task sequence to generate a scanning control signal, wherein the plurality of descriptors comprise: time control descriptors configured to define time slots of scanning phases and non-scanning phases, including timing descriptors, delay descriptors and wait descriptors; touch scanning descriptors configured to define the scanning task sequence; and flow control descriptors configured to perform branch control of different scanning modes, the descriptor parser comprises: a finite state machine configured to sequentially read and parse the descriptor chain list; and 2. The scanning control device according to claim 1, wherein counters including a down counter and an up counter configured to count down or count up according to the time control descriptors, 3. The scanning control device according to claim 1, wherein the down counter is loaded with an initial value corresponding to loaded data in the timing descriptor and starts counting down to implement counting down, until the count value is zero, the down counter is reloaded with a next initial value, and the descriptor parser performs parsing of a next descriptor after the down counter is loaded with the initial value each time to implement time slot control of the scanning phases and the non-scanning phases; the delay descriptor is configured to insert a predetermined delay between adjacent scanning phases, the up counter starts counting up from zero when the delay descriptor starts to execute, until the count reaches a first preset value, a delay completion signal is returned, and the descriptor parser performs parsing of a next descriptor; the up counter also starts counting up from zero when the wait descriptor starts to execute to implement counting up, until the counting is stopped when an external event trigger is received, a wait success signal is returned, and the descriptor parser performs parsing of a next descriptor; 4. The scanning control device according to claim 1, wherein or the up counter returns a wait timeout signal when the up counter has not received the external event trigger when the count value reaches a second preset value corresponding to loaded data in the wait descriptor, and the descriptor parser performs parsing of a next descriptor. The descriptor chain list adopts a linear address layout aligned by words, each descriptor is composed of 1-4 consecutive 32-bit words, and the first word contains a 4-bit descriptor type field and an interrupt enable flag. The flow control descriptors comprise: a termination descriptor configured to instruct the descriptor parser to stop parsing and trigger an interrupt; and a comparison descriptor configured to compare a value of a specified address in a data address space with a preset threshold, and select an address pointer of a next descriptor according to a comparison result to implement branch jumping. The touch scanning descriptors comprise: a task field configured to define the scanning task sequence; an increment field configured to instruct the control signal generation circuit to automatically increment a scanning sequence number and continuously execute a plurality of scanning commands in the same scanning mode; and a shared field for indicating to share the setup time and / or the recovery time between adjacent scanning phases.
5. The scanning control device according to claim 4, wherein a plurality of scanning tasks are defined in the task field, each scanning task comprising: a scanning mode subfield for defining 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 grouping scanning, active pen uplink transmission, short circuit detection scanning; a scanning sequence subfield for defining a touch electrode group number corresponding to the scanning command; and a scanning behavior subfield for defining any one of the following scanning behaviors: capacitance compensation value preparation, capacitance compensation value update, scanning execution.
6. The scanning control device according to claim 1, wherein The control signal generation circuit comprises: a channel selection signal generation module for generating a channel selection signal of a multiplexer according to the scanning task sequence; an integration control signal generation module for generating an integration control signal of an analog front-end circuit to control the charging and discharging of a capacitor to achieve charge-to-voltage conversion; a capacitance compensation preparation module for reading a compensation value from a capacitance compensation value address space and preloading before executing a scanning command; a capacitance compensation update module for latching the preloaded compensation value to a capacitance compensation module at the beginning of a scanning task; and a data statistics storage module for writing detection data output by an analog-to-digital converter of the analog front-end circuit to a detection data storage address space and performing statistical operation.
7. A scan control method for a touch panel, characterized by, comprising: selecting a scanning scheme according to a touch state of the touch panel; obtaining a descriptor linked list according to the scanning scheme, and performing first-level resolution on the descriptor linked list to generate a scanning task sequence, the descriptor linked list comprising a plurality of descriptors connected by address pointers; performing second-level resolution on the scanning task sequence to generate scanning control signals, wherein the plurality of descriptors comprise: a time control descriptor for defining time slots of scanning phases and non-scanning phases, including a timing descriptor, a delay descriptor and a wait descriptor; a touch scanning descriptor for defining the scanning task sequence; a flow control descriptor for performing branch control of different scanning modes, the first-level resolution comprises: sequentially reading and resolving the descriptor linked list by using a finite state machine; and performing down-counting or up-counting by using a counter to complete time slot control defined by the time control descriptor, resolving the timing descriptor comprises: loading an initial value corresponding to load data of the timing descriptor by using a down-counting counter and starting down-counting, and reloading a next initial value until the count value reaches zero, and only after the down-counting counter loads the initial value each time, does a descriptor resolver perform resolution of a next descriptor, to achieve time slot control of scanning phases and non-scanning phases; resolving the delay descriptor comprises: implementing up-counting from zero by using an up-counting counter until the count value reaches a first preset value, returning a delay completion signal, and then performing resolution of a next descriptor, to insert a predetermined delay between adjacent scanning phases; The parsing of the wait descriptor comprises: using an up-counting counter to count up from zero when the wait descriptor starts to execute, and stopping counting when a trigger of an external event is received, and returning a signal of wait success to proceed with the parsing of the next descriptor; or using an up-counting counter to count up until a second preset value corresponding to the load data in the wait descriptor is reached, and returning a signal of wait timeout to proceed with the parsing of the next descriptor when the trigger of the external event is not received.
8. The scanning control method according to claim 7, wherein The descriptor chain table adopts a linear address layout aligned by words, each descriptor is composed of 1-4 continuous 32-bit words, and the first word contains a 4-bit descriptor type field and an interrupt enable flag.
9. The scanning control method according to claim 7, wherein The flow control descriptor comprises: a termination descriptor for indicating to stop parsing and triggering an interrupt; a comparison descriptor for comparing a value of a specified address in a data address space with a preset threshold, and selecting an address pointer of a next descriptor according to a comparison result to realize branch jump.
10. The scanning control method according to claim 7, wherein The touch scan descriptor comprises: a task field for defining a scan task sequence; an increment field for indicating to automatically increment a scan sequence number in a same scan mode and continuously execute a plurality of scan commands; a sharing field for indicating to share a setup time and / or a recovery time between adjacent scan stages.
11. The scanning control method according to claim 10, wherein The task field defines a plurality of scan tasks, and each scan task comprises: a scan mode subfield for defining 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 grouping scan, active pen uplink transmission, and short circuit detection scan; a scan sequence number subfield for defining a touch electrode grouping number corresponding to a scan command; a scan behavior subfield for defining any one of the following scan behaviors: capacitor compensation value preparation, capacitor compensation value update, and scan execution.
12. The scanning control method according to claim 7, wherein The second-level parsing comprises: generating a channel selection signal of a multiplexer according to the scan task sequence; generating an integration control signal of an analog front-end circuit to control charging and discharging of a capacitor, so as to realize charge-to-voltage conversion; reading a compensation value from a capacitor compensation value address space and preloading before executing a scan command; latching the preloaded compensation value to a capacitor compensation module when a scan task starts; writing detection data output by an analog-to-digital converter of the analog front-end circuit to a detection data storage address space and performing statistical operation.
13. A touch chip integrated with the scan control device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Implementation method and device of multi-core cooperative controller
CN114924855A
Flash memory controller and method thereof for accessing flash memory particles
CN116185892A