CN117170512A - Control method of touch pen and touch pen equipment - Google Patents

Control method of touch pen and touch pen equipment Download PDF

Info

Publication number
CN117170512A
CN117170512A CN202310998526.2A CN202310998526A CN117170512A CN 117170512 A CN117170512 A CN 117170512A CN 202310998526 A CN202310998526 A CN 202310998526A CN 117170512 A CN117170512 A CN 117170512A
Authority
CN
China
Prior art keywords
period
interval
stylus
signal
touch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310998526.2A
Other languages
Chinese (zh)
Inventor
靳百萍
胡秀银
孙蝉蝉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Publication of CN117170512A publication Critical patent/CN117170512A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

The embodiment of the application provides a control method of a touch pen and touch pen equipment, and relates to the technical field of terminals. The control method of the touch pen comprises the following steps: the code printing module transmits code printing signals; when entering a coding idle interval, the coding module sends a coding interrupt signal to the touch detection module; and responding to the code printing interrupt signal, and executing touch control capacitance value sampling by the touch detection module, wherein the code printing module does not emit code printing signals in the code printing idle interval, and the duration of the touch control capacitance value sampling is smaller than or equal to the duration of the code printing idle interval. Therefore, the interference of the code printing signal on the sampling of the touch capacitance value is effectively reduced.

Description

Control method of touch pen and touch pen equipment
The present application is a divisional application, the application number of which is 20221076448. X, the application date of which is 2022, 06, 30, the entire content of which is incorporated herein by reference, and the priority of which is 202210289179.1.
Technical Field
The application relates to the technical field of terminals, in particular to a control method of a touch pen and touch pen equipment.
Background
Along with the wide application of mobile phones and flat plates, touch pens are increasingly used in the life of people, and writing and drawing can be more conveniently and accurately performed on the mobile phones and the flat plates through the touch pens. Some touch control pens are provided with a touch detection device to recognize the pen holding state and gestures, such as holding, double clicking, sliding up and down, etc., in order to improve the user experience. After the pen holding states and gestures are transmitted to the flat plate, different responses can be made, for example, a double-click pen body can be used for switching a brush and a rubber in the writing process, and page turning can be carried out by sliding up and down.
The conventional touch pen also generally comprises a pen point code printing chip, when the touch pen is close to a display screen and writes, the pen point code printing chip can generate specific code printing signals, and the flat panel display screen distinguishes fingers and the pen according to the code printing signals, so that the writing coordinates are accurately calculated. Because the nib of touch-control pen beats code signal voltage and generally is higher, about 40V can bring more obvious electromagnetic interference to the mainboard to produce great interference noise to touch detection device, influence the degree of accuracy of holding the pen gesture and detect.
Disclosure of Invention
The application provides a control method of a touch pen and touch pen equipment.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, the present application provides a control method of a stylus, where the stylus includes a coding module and a touch detection module, including: the coding module only transmits coding signals to the terminal equipment in coding intervals of a first period; the coding module only transmits a coding interrupt signal in an idle interval of a first period; in response to the code interrupt signal, the touch detection module performs touch capacitance sampling only in an idle interval of the first period.
On the basis, when the code printing module transmits the code printing signal, the time period for executing the touch control capacitance value sampling by the touch detection module is set in the idle interval without transmitting the code printing signal, so that the time for sampling the touch control capacitance value is not overlapped with the time for transmitting the code printing signal, and the interference of the code printing signal of the pen point to the touch detection module can be avoided.
In a possible design manner of the first aspect, the stylus further includes a processor, and the touch detection module performs touch capacitance value sampling only in an idle interval of the first period in response to the code interrupt signal, including: the coding module only sends a coding interrupt signal to the processor in an idle interval of a first period; responding to the coding interrupt signal, and sending a touch capacitance sampling instruction to a touch detection module by the processor; in response to the touch capacitance sampling instruction, the touch detection module only performs touch capacitance sampling in an idle interval of the first period.
On the basis, the code printing interrupt signal is processed by the setting processor, and a corresponding sampling instruction is generated according to the code printing interrupt signal, so that the working state of the touch detection module is controlled, and the time for sampling the touch capacitance value is not overlapped with the time for printing the code printing signal.
In one possible design manner of the first aspect, the method further includes: before the coding module transmits a coding signal to the terminal equipment in a coding interval of a first period, the processor determines that the distance between the touch pen and the terminal equipment is smaller than or equal to a preset distance.
On the basis, whether the coding module transmits a coding signal to the terminal equipment or not is determined by detecting the distance between the touch pen and the terminal equipment.
In one possible design manner of the first aspect, the method further includes: and under the condition that the processor determines that the distance between the touch pen and the terminal equipment is larger than the preset distance, the touch detection module performs touch capacitance value sampling based on a second period, wherein the duration of the second period is different from that of the first period.
On the basis, the sampling frequency of the touch capacitance value of the touch detection module is switched by determining the distance between the touch pen and the terminal equipment, so that the working requirements of the touch pen in different scenes can be met.
In one possible design manner of the first aspect, when the processor still does not receive the code interrupt signal after the preset first period, the processor controls the touch detection module to perform touch capacitance value sampling based on a second period, where a duration of the second period is different from a duration of the first period.
On the basis, through setting up the detection to the code interruption signal, still do not receive the code interruption signal after the first time length of predetermineeing, judge the code module and do not launch the code signal, can switch the touch appearance value sampling frequency of touch detection module this moment to satisfy the demand of stylus under different scenes.
In one possible design manner of the first aspect, the touch detection module performs touch capacitance value sampling only in an idle interval of the first period, including: the touch detection module is used for executing touch capacitance value sampling based on a third period only in an idle interval of the first period, and the duration of the third period is the same as that of the first period.
On the basis, the duration of the third period is the same as the duration of the first period, so that the same frequency as the code printing signal can be adopted when the touch control detection module samples the touch control capacitance value, and the interference of the code printing signal of the pen point on the touch detection module is avoided in a plurality of periods.
In a second aspect, the present application provides a stylus device comprising a memory for storing computer program instructions, a processor for executing the program instructions, a coding module and a touch detection module, which when executed by the processor, triggers the stylus to perform the method provided in the first aspect and any one of its possible designs.
In a third aspect, the present application provides a computer readable storage medium, the computer readable storage medium comprising a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform the method provided in the first aspect and any one of the possible designs thereof.
It may be appreciated that the advantages achieved by the stylus provided in the second aspect and the computer readable storage medium provided in the third aspect may refer to the advantages as in the first aspect and any of the possible designs thereof, which are not described herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a scene to which embodiments of the present application are applicable;
fig. 2A is a schematic structural diagram of a stylus according to an embodiment of the present application;
fig. 2B is a schematic diagram of a partially disassembled structure of a stylus according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating interaction between a stylus and an electronic device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of a stylus according to an embodiment of the present application;
fig. 5 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 6 is a timing diagram of signals according to an embodiment of the present application;
fig. 7 is a flowchart of a control method of a stylus according to an embodiment of the present application;
FIG. 8A is a signal timing diagram of the stylus according to an embodiment of the present application when the stylus is far from the electronic device;
FIG. 8B is a signal timing diagram of the touch pen according to the embodiment of the present application when the touch pen is close to the electronic device;
fig. 9 is a flowchart of another control method of a stylus according to an embodiment of the present application;
FIG. 10 is a timing diagram of another signal according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a hardware structure of another stylus according to an embodiment of the present application;
fig. 12 is a schematic hardware structure of another stylus according to an embodiment of the present application;
Fig. 13 is a timing diagram of another signal according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that "/" means or, e.g., A/B may represent A or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the described embodiments of the application may be combined with other embodiments.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first", "second" in the following embodiments of the present application are used for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
At present, along with the wide application of electronic products such as mobile phones and flat plates, touch pens are increasingly used in the life of people, and operations such as writing, drawing and the like can be more conveniently and accurately performed on the mobile phones and the flat plates through the touch pens. Some touch control pens are provided with a touch detection device to identify a pen holding state and a gesture, for example, the touch control pen can be identified to be held, double-clicked, slid up, slid down, and the like by a user in order to improve user experience. After the stylus transmits the pen holding states and gestures to the tablet, the tablet can respond differently according to different states and gestures, for example, when a user double clicks the pen body, the user can switch between a brush and a rubber in the writing process, and the user can slide up and down to turn pages.
Fig. 1 is a schematic view of a scenario in which an embodiment of the present application is applicable. Referring to fig. 1, the scene includes a Stylus (Stylus) 100 and an electronic device 200, and fig. 1 illustrates the electronic device 200 as a tablet (Portable Android Device, PAD). The stylus 100 may provide input to the electronic device 200, and the electronic device 200 performs an operation responsive to the input based on the input of the stylus 100. For example, a user opens a drawing application program, a memo application program, or a global writing function of the electronic device 200, etc., on the electronic device 200, the user may perform drawing, writing, etc., operations (collectively referred to as drawing operations) on the touch screen 201 of the electronic device 200 using the stylus 100, and accordingly, the electronic device 200 may display handwriting drawn by the stylus 100 on the touch screen 201.
In one embodiment, a wireless keyboard 300 may also be included in the scene. The wireless keyboard 300 may also provide input to the electronic device 200, and the electronic device 200 performs an operation responsive to the input based on the input of the wireless keyboard 300. A touch area may be provided on the wireless keyboard 300, the stylus 100 may operate the touch area of the wireless keyboard 300, input may be provided to the wireless keyboard 300, and the wireless keyboard 300 may perform an operation responsive to the input based on the input of the stylus 100.
In one embodiment, the interaction of wireless signals may be achieved by interconnection between the stylus 100 and the electronic device 200, between the stylus 100 and the wireless keyboard 300, and between the electronic device 200 and the wireless keyboard 300 via a communication network. The communication network may be, but is not limited to: WI-FI hotspot networks, WI-FI peer-to-peer (P2P) networks, bluetooth networks, zigbee networks, or near field communication (near field communication, NFC) networks. The following embodiments mainly describe the interaction process between the stylus 100 and the electronic device 200.
In one or more embodiments of the present application, the stylus 100 is an active capacitive pen, which may also be referred to as an active capacitive pen or an active pen. When a user performs drawing operation, the active capacitance pen continuously transmits a code printing signal through the pen point, the touch screen of the electronic equipment detects the code printing signal transmitted by the pen point through the detection electrode, and a series of two-dimensional position coordinates of the pen point on the touch screen are calculated, so that the drawing handwriting (namely the movement track of the pen point on the touch screen) of the user is obtained.
Fig. 2A is a schematic structural diagram of a stylus according to an embodiment of the present application. Referring to fig. 2A, the stylus 100 may include a nib 10, a barrel 20, and a rear cover 30. The inside of the pen holder 20 is of a hollow structure, the pen point 10 and the rear cover 30 are respectively positioned at two ends of the pen holder 20, the rear cover 30 and the pen holder 20 can be connected in a plugging or clamping mode, and the matching relationship between the pen point 10 and the pen holder 20 is shown in the description of fig. 2B.
Fig. 2B is a schematic diagram of a partially disassembled structure of a stylus according to an embodiment of the present application. Referring to fig. 2B, the stylus 100 further includes a spindle assembly 50, the spindle assembly 50 is located in the pen holder 20, and the spindle assembly 50 is slidably disposed in the pen holder 20. Spindle assembly 50 has external threads 51 thereon and nib 10 includes writing end 11 and connecting end 12, wherein connecting end 12 of nib 10 has internal threads (not shown) that mate with external threads 51. When the spindle assembly 50 is assembled into the barrel 20, the connecting end 12 of the nib 10 extends into the barrel 20 and is threadedly coupled with the external threads 51 of the spindle assembly 50.
In some other examples, the connection between the connection end 12 of the pen tip 10 and the spindle assembly 50 may also be achieved by a removable manner, such as a snap fit. The nib 10 can be replaced by detachably connecting the connecting end 12 of the nib 10 to the spindle assembly 50. In order to detect the pressure applied to the writing end 11 of the nib 10, referring to fig. 2A, a gap 10a is provided between the nib 10 and the barrel 20, so that when the writing end 11 of the nib 10 is subjected to an external force, the nib 10 can move towards the barrel 20, and the movement of the nib 10 drives the spindle assembly 50 to move in the barrel 20. In the detection of the external force, referring to fig. 2B, a pressure sensing assembly 60 is disposed on the spindle assembly 50, the pressure sensing assembly 60 is fixedly connected with a fixing structure in the pen holder 20, and the pressure sensing assembly 60 is fixedly connected with the spindle assembly 50. Thus, when the spindle assembly 50 moves along with the pen tip 10, the pressure sensing assembly 60 is fixedly connected with the fixing structure in the pen holder 20, so that the movement of the spindle assembly 50 drives the pressure sensing assembly 60 to deform, the deformation of the pressure sensing assembly 60 is transmitted to the circuit board 70 (for example, the pressure sensing assembly 60 and the circuit board 70 can be electrically connected through a wire or a flexible circuit board), the circuit board 70 detects the pressure applied to the writing end 11 of the pen tip 10 according to the deformation of the pressure sensing assembly 60, and the thickness of the line of the writing end 11 can be controlled according to the pressure applied to the writing end 11 of the pen tip 10.
Note that the pressure detection of the pen tip 10 includes, but is not limited to, the above method. For example, the pressure of the pen tip 10 may be detected by a pressure sensor provided in the writing end 11 of the pen tip 10.
In this embodiment, referring to fig. 2B, the stylus pen 100 further includes a plurality of electrodes, which may be, for example, a first transmitting electrode 41, a ground electrode 43, and a second transmitting electrode 42. The first emitter electrode 41, the ground electrode 43, and the second emitter electrode 42 are all electrically connected to the circuit board 70. The first transmitting electrode 41 may be located within the pen tip 10 and close to the writing end 11, and the circuit board 70 may be configured as a control board that may provide signals to the first transmitting electrode 41 and the second transmitting electrode 42, respectively, the first transmitting electrode 41 being configured to transmit a first signal, and a coupling capacitance may be formed between the first transmitting electrode 41 and the touch screen 201 of the electronic device 200 when the first transmitting electrode 41 is close to the touch screen 201 of the electronic device 200, so that the electronic device 200 may receive the first signal. The second transmitting electrode 42 is configured to transmit a second signal, and the electronic device 200 determines the tilt angle of the stylus 100 according to the received first signal and the second signal.
In an embodiment of the present application, the second emitter electrode 42 may be located on the inner wall of the barrel 20. In one example, the second emitter electrode 42 may also be located on the spindle assembly 50. The ground electrode 43 may be located between the first and second transmitting electrodes 41 and 42, or the ground electrode 43 may be located at the outer circumference of the first and second transmitting electrodes 41 and 42, the ground electrode 43 serving to reduce coupling of the first and second transmitting electrodes 41 and 42 with each other.
When the electronic device 200 receives the first signal from the stylus 100, the capacitance value at the corresponding position of the touch screen 201 may change. Accordingly, the electronic device 200 may determine the location of the stylus 100 (or the tip of the stylus 100) on the touch screen 201 based on the change in capacitance value on the touch screen 201. In addition, the electronic device 200 may acquire the tilt angle of the stylus 100 using a dual-nib projection method in the tilt angle detection algorithm. Wherein the first transmitting electrode 41 and the second transmitting electrode 42 are positioned differently in the stylus 100, so that when the electronic device 200 receives the first signal and the second signal from the stylus 100, the capacitance values at two positions on the touch screen 201 will change. The electronic device 200 may obtain the tilt angle of the stylus 100 according to the distance between the first emitter electrode 41 and the second emitter electrode 42 and the distance between the two positions where the capacitance value changes on the touch screen 201, and the more detailed obtaining of the tilt angle of the stylus 100 may refer to the related description of the dual-nib projection method in the prior art, which is not described herein. In one embodiment, the touch screen may also be referred to as a screen.
In an embodiment of the present application, referring to fig. 2B, the stylus 100 further includes: and a battery assembly 80, the battery assembly 80 being configured to provide power to the circuit board 70. The battery assembly 80 may include a lithium ion battery, or the battery assembly 80 may include a nickel-chromium battery, an alkaline battery, a nickel-hydrogen battery, or the like. In one embodiment, the battery assembly 80 may include a rechargeable battery or a disposable battery, wherein when the battery assembly 80 includes a rechargeable battery, the stylus 100 may charge the battery in the battery assembly 80 by wired or wireless charging.
Wherein an electrode array is integrated on the touch screen 201 of the electronic device 200. Referring to fig. 3, after the electronic device 200 is wirelessly connected to the stylus 100, the electronic device 200 may transmit an uplink signal to the stylus 100 through the electrode array. The stylus 100 may receive the uplink signal through the receiving electrode, and the stylus 100 transmits the downlink signal through the transmitting electrode (e.g., the first transmitting electrode 41 and the second transmitting electrode 42). The downstream signal includes the first signal and the second signal described above. When the tip 10 of the stylus 100 contacts the touch screen 201, a capacitance value of the touch screen 201 at a position corresponding to the tip 10 may change, and the electronic device 200 may determine the position of the tip 10 of the stylus 100 on the touch screen 201 based on the capacitance value change on the touch screen 201. In one embodiment, the upstream signal and the downstream signal may be square wave signals, sine wave signals, triangular wave signals, or the like. In the embodiment of the application, the downlink signal is also called as a coding signal.
Fig. 4 is a schematic diagram of a hardware structure of a stylus according to an embodiment of the present application. Referring to fig. 4, a processor 110 is included in the stylus 100. The processor 110 may include storage and processing circuitry for supporting the operation of the stylus 100. The storage and processing circuitry may include storage devices such as non-volatile memory (e.g., flash memory or other programmable read-only memory configured as a solid state drive), volatile memory (e.g., static or dynamic random access memory), and the like. Processing circuitry in the processor 110 may be used to control the operation of the stylus 100. The processing circuitry may include one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio chips, application specific integrated circuits, and the like.
One or more sensors may be included in the stylus 100. For example, the sensor may include a pressure sensor 120. The pressure sensor 120 may be disposed at the writing end 11 of the stylus 100 (as shown in fig. 2B). Of course, the pressure sensor 120 may also be disposed in the barrel 20 of the stylus 100, such that when one end of the nib 10 of the stylus 100 is stressed, the other end of the nib 10 moves to apply force to the pressure sensor 120. In one embodiment, the processor 110 may adjust the line thickness of the stylus 100 at the point 10 writing according to the amount of pressure detected by the pressure sensor 120.
The sensors may also include inertial sensors 130. Inertial sensor 130 may include a three-axis accelerometer and a three-axis gyroscope, and/or other components for measuring motion of stylus 100, for example, a three-axis magnetometer may be included in the sensor in a nine-axis inertial sensor configuration. The sensors may also include additional sensors such as temperature sensors, ambient light sensors, light-based proximity sensors, contact sensors, magnetic sensors, pressure sensors, and/or other sensors.
Status indicators 140 such as light emitting diodes and buttons may be included in the stylus 100. The status indicator 140 is used to alert the user of the status of the stylus 100. Buttons may include mechanical buttons and non-mechanical buttons, which may be used to collect button press information from a user.
In embodiments of the present application, one or more electrodes may be included in the stylus 100, wherein one electrode may be located at the writing end 11 within the nib 10 of the stylus 100, as described in detail with respect to the above embodiments.
The stylus 100 includes a code-printing chip 170, the code-printing chip 170 is connected to and communicated with the processor 110 through an I2C bus, and the code-printing chip 170 is used for transmitting code-printing signals composed of square waves, sine waves, triangular waves and other waveforms to the electronic device 200 through electrodes arranged at the pen tip 10. In the embodiment of the application, the code signal is also called a downlink signal.
The stylus 100 may include sensing circuitry therein. The sensing circuit may sense capacitive coupling between the electrodes and the drive lines of the capacitive touch sensor panel that interact with the stylus pen 100. The sensing circuit may include an amplifier to receive the capacitance readings from the capacitive touch sensor panel, a clock to generate a demodulation signal, a phase shifter to generate a phase shifted demodulation signal, a mixer to demodulate the capacitance readings using in-phase demodulation frequency components, a mixer to demodulate the capacitance readings using quadrature demodulation frequency components, and the like. The result of the mixer demodulation may be used to determine an amplitude proportional to the capacitance so that the stylus 100 may sense contact with the capacitive touch sensor panel.
It will be appreciated that the stylus 100 may include a microphone, speaker, audio generator, vibrator, camera, data port, and other devices, as desired. A user may control the operation of the stylus 100 and the electronic device 200 interacting with the stylus 100 by providing commands with these devices and receive status information and other outputs.
The processor 110 may be used to run software on the stylus 100 that controls the operation of the stylus 100. During operation of the stylus 100, software running on the processor 110 may process sensor inputs, button inputs, and inputs from other devices to monitor movement of the stylus 100 and other user inputs. Software running on the processor 110 may detect user commands and may communicate with the electronic device 200.
To support wireless communication of the stylus 100 with the electronic device 200, the stylus 100 may include a wireless module. In fig. 4, a bluetooth module 180 is taken as an example of the wireless module. The wireless module may also be a WI-FI hotspot module, a WI-FI point-to-point module, or the like. The bluetooth module 180 may include a radio frequency transceiver, such as a transceiver. Bluetooth module 180 may also include one or more antennas. The transceiver may transmit and/or receive wireless signals using an antenna, which may be based on the type of wireless module, bluetooth signals, wireless local area network signals, remote signals such as cellular telephone signals, near field communication signals, or other wireless signals.
In some embodiments of the present application, the stylus 100 further includes a Touch detection circuit, which includes a Touch Panel (Touch Panel) and a Touch detection chip 115, where the Touch Panel of the stylus 100 is generally in a bendable sheet shape, and is disposed in the pen shaft 20 outside the main circuit board 70, near the pen tip 10, so as to form a Touch area 21 on the outer peripheral wall of the pen shaft 20 (as shown in fig. 2B). When the user holds the stylus 100 for drawing operations, the finger is generally held at the touch area 21. The touch detection chip periodically detects the self-capacitance (the product may be self-capacitance, mutual capacitance, or all) of a plurality of points on the touch area 21 through the touch panel, and when a pen body is touched, the capacitance is changed due to the conductive characteristic of a finger of a person. The touch detection chip can detect hand gestures such as holding, clicking, double clicking, sliding up and sliding down from a user by identifying the capacitance change characteristics of a plurality of points. In this example, the touch area 21 can detect the self-mutual capacitance value of 6*6 points.
The processor 110 and the touch detection chip 115 perform read-write communication through a specific communication bus protocol (generally I2C or SPI, which is determined by the hardware connection and the chip support, in this embodiment, I2C is taken as an example). The specific content of the communication is defined by the firmware of the touch detection chip, and different functions are achieved by reading and writing specific registers of the chip. For example, the processor 110 changes the operation mode of the touch detection chip by writing a specific register defining the operation mode through the I2C, and the processor 110 reads the specific register of the touch detection chip through the I2C to acquire the capacitance data, the gesture event, and the like. The pen holding state and gestures, such as holding, double clicking, up-sliding, down-sliding, etc., are recognized. After these pen holding states and gestures are transmitted to the electronic device 200 via the stylus 100, the electronic device 200 may respond differently, for example, a double click on the touch area 21 of the pen holder 20 may switch between a brush and a rubber during writing, and a finger may slide up and down on the touch area 21 to turn pages. In addition, in some embodiments, the stylus 100 is further provided with a multifunctional key (not shown in the figure) at the side surface of the pen holder and/or the rear cover 30, and the user can quickly call the preset functions such as memo, screenshot, etc. by pressing the multifunctional key alone or pressing the multifunctional key in combination with the pen holding state. For example, if the multi-function key is pressed for more than 2 seconds while holding the touch area 21 with two fingers, the voice memo function of the electronic device 200 is evoked.
The stylus 100 may also include a charging chip 190, and the charging chip 190 may support charging of the stylus 100 to provide power to the stylus 100.
It should be understood that the electronic device 200 in the embodiment of the present application may be referred to as a User Equipment (UE), a terminal (terminal), etc., for example, the electronic device 200 may be a tablet (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with a wireless communication function, a computing device, an in-vehicle device, or a wearable device, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (self-driving), a wireless terminal in remote medical (remote media), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a mobile terminal with a touch screen or a fixed terminal such as a wireless terminal in smart city (smart home), or the like. The form of the terminal device in the embodiment of the application is not particularly limited.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. Referring to fig. 5, the electronic device 200 may include multiple subsystems that cooperate to perform, coordinate, or monitor one or more operations or functions of the electronic device 200. Electronic device 200 includes processor 210, input surface 220, coordination engine 230, power subsystem 240, power connector 250, wireless interface 260, and display 270.
Illustratively, coordination engine 230 may be used to communicate and/or process data with other subsystems of electronic device 200; communication and/or transaction data with the stylus 100; measuring and/or obtaining an output of one or more analog or digital sensors (such as touch sensors); measuring and/or obtaining an output of one or more sensor nodes of an array of sensor nodes (such as an array of capacitive sensing nodes); receiving and locating tip and ring signals from the stylus 100; the stylus 100 or the like is positioned based on the positions of the tip signal crossing region and the ring signal crossing region.
The coordination engine 230 of the electronic device 200 includes or is otherwise communicatively coupled to a sensor layer located below or integral with the input surface 220. The coordination engine 230 utilizes the sensor layer to locate the stylus 100 on the input surface 220 and uses the techniques described herein to estimate the angular position of the stylus 100 relative to the plane of the input surface 220. In one embodiment, the input surface 220 may be referred to as a touch screen 201.
For example, the sensor layer of coordination engine 230 of electronic device 200 is a grid of capacitive sensing nodes arranged in columns and rows. More specifically, the array of column traces is arranged perpendicular to the array of row traces. The sensor layer may be separate from other layers of the electronic device, or the sensor layer may be disposed directly on another layer, such as but not limited to: display stack layers, force sensor layers, digitizer layers, polarizer layers, battery layers, structural or decorative housing layers, and the like.
The sensor layer can operate in a variety of modes. If operating in mutual capacitance mode, the column and row traces form a single capacitive sense node at each overlap point (e.g., a "vertical" mutual capacitance). If operating in self-capacitance mode, the column and row traces form two (vertically aligned) capacitive sense nodes at each overlap point. In another embodiment, if operating in a mutual capacitance mode, adjacent column traces and/or adjacent row traces may each form a single capacitive sense node (e.g., a "horizontal" mutual capacitance). As described above, the sensor layer may detect the presence of the tip 10 of the stylus 100 and/or the touch of a user's finger by monitoring the capacitance (e.g., mutual capacitance or self capacitance) change presented at each capacitive sensing node. In many cases, coordination engine 230 may be configured to detect tip and ring signals received from stylus 100 through the sensor layer via capacitive coupling.
Wherein the tip signal and/or the ring signal may include specific information and/or data that may be configured to cause the electronic device 200 to identify the stylus 100. Such information is generally referred to herein as "stylus identity" information. This information and/or data may be received by the sensor layer and interpreted, decoded, and/or demodulated by coordination engine 230.
Processor 210 may use the stylus identity information to simultaneously receive input from more than one stylus. In particular, coordination engine 230 may be configured to communicate to processor 210 the position and/or angular position of each of the number of styluses detected by coordination engine 230. In other cases, coordination engine 230 may also transmit information to processor 210 regarding the relative positions and/or relative angular positions of the plurality of styluses detected by coordination engine 230. For example, coordination engine 230 may notify processor 210 that the detected first stylus is located away from the detected second stylus.
In other cases, the end signal and/or ring signal may also include specific information and/or data for causing the electronic device 200 to identify a specific user. Such information is generally referred to herein as "user identity" information.
Coordination engine 230 may forward user identity information (if detected and/or recoverable) to processor 210. If the user identity information cannot be recovered from the tip signal and/or the ring signal, coordination engine 230 may optionally indicate to processor 210 that the user identity information is not available. Processor 210 can utilize user identity information (or the absence of such information) in any suitable manner, including but not limited to: accepting or rejecting input from a particular user, allowing or rejecting access to a particular function of the electronic device, etc. Processor 210 may use the user identity information to simultaneously receive input from more than one user.
In still other cases, the tip signal and/or the ring signal may include specific information and/or data that may be configured to cause the electronic device 200 to identify settings or preferences of the user or the stylus 100. Such information is generally referred to herein as "stylus setup" information.
Coordination engine 230 may forward the stylus setup information (if detected and/or recoverable) to processor 210. If the stylus setting information is not recoverable from the tip signal and/or the ring signal, coordination engine 230 may optionally indicate to processor 210 that the stylus setting information is not available. The electronic device 200 can utilize the stylus setting information (or the absence of the information) in any suitable manner, including but not limited to: applying settings to an electronic device, applying settings to a program running on an electronic device, changing line thickness, color, pattern presented by a graphics program of an electronic device, changing settings of a video game operating on an electronic device, and so forth.
In general, the processor 210 may be configured to perform, coordinate, and/or manage the functions of the electronic device 200. Such functions may include, but are not limited to: communication and/or transaction data with other subsystems of the electronic device 200, communication and/or transaction data with the stylus 100, data communication and/or transaction data over a wireless interface, data communication and/or transaction data over a wired interface, facilitating power exchange over a wireless (e.g., inductive, resonant, etc.) or wired interface, receiving a position and angular position of one or more styluses, etc.
Processor 210 may be implemented as any electronic device capable of processing, receiving, or transmitting data or instructions. For example, the processor may be a microprocessor, a central processing unit, an application specific integrated circuit, a field programmable gate array, a digital signal processor, an analog circuit, a digital circuit, or a combination of these devices. The processor may be a single-threaded or multi-threaded processor. The processor may be a single core or multi-core processor.
During use, processor 210 may be configured to access a memory storing instructions. The instructions may be configured to cause the processor to perform, coordinate, or monitor one or more operations or functions of the electronic device 200.
The instructions stored in the memory may be configured to control or coordinate the operation of other components of the electronic device 200, such as, but not limited to: another processor, analog or digital circuitry, a volatile or non-volatile memory module, a display, a speaker, a microphone, a rotational input device, buttons or other physical input devices, biometric sensors and/or systems, force or touch input/output components, a communication module (such as a wireless interface and/or power connector), and/or a haptic feedback device.
The memory may also store electronic data that may be used by the stylus or the processor. For example, the memory may store electronic data or content (such as media files, documents, and applications), device settings and preferences, timing signals and control signals, or data for various modules, data structures or databases, files or configurations related to detecting tip signals and/or ring signals, and so forth. The memory may be configured as any type of memory. For example, the memory may be implemented as random access memory, read only memory, flash memory, removable memory, other types of storage elements, or a combination of such devices.
The electronic device 200 also includes a power subsystem 240. The power subsystem 240 may include a battery or other power source. The power subsystem 240 may be configured to provide power to the electronic device 200. The power subsystem 240 may also be coupled to a power connector 250. The power connector 250 may be any suitable connector or port that may be configured to receive power from an external power source and/or to provide power to an external load. For example, in some embodiments, the power connector 250 may be used to recharge a battery within the power subsystem 240. In another embodiment, the power connector 250 may be used to transfer power stored (or available) within the power subsystem 240 to the stylus 100.
The electronic device 200 also includes a wireless interface 260 to facilitate electronic communications between the electronic device 200 and the stylus 100. In one embodiment, the electronic device 200 may be configured to communicate with the stylus 100 via a low energy bluetooth communication interface or a near field communication interface. In other examples, the communication interface facilitates electronic communications between the electronic device 200 and an external communication network, device, or platform.
The wireless interface 260 (whether the communication interface between the electronic device 200 and the stylus 100 or another communication interface) may be implemented as one or more wireless interfaces, bluetooth interfaces, near field communication interfaces, magnetic interfaces, universal serial bus interfaces, inductive interfaces, resonant interfaces, capacitively coupled interfaces, wi-Fi interfaces, TCP/IP interfaces, network communication interfaces, optical interfaces, acoustical interfaces, or any conventional communication interfaces.
The electronic device 200 also includes a display 270. The display 270 may be located behind the input surface 220 or may be integral therewith. A display 270 may be communicatively coupled to the processor 210. Processor 210 may present information to a user using display 270. In many cases, the processor 210 uses the display 270 to present an interface with which a user may interact. In many cases, the user manipulates the stylus 100 to interact with the interface.
It will be apparent to one skilled in the art that some of the specific details presented above with respect to the electronic device 200 may not be required to practice a particular described embodiment or equivalent thereof. Similarly, other electronic devices may include a greater number of subsystems, modules, components, etc. Some of the sub-modules may be implemented as software or hardware, where appropriate. It should be understood, therefore, that the foregoing description is not intended to be exhaustive or to limit the disclosure to the precise form described herein. On the contrary, many modifications and variations will be apparent to those of ordinary skill in the art in light of the above teachings.
As shown in fig. 3, after the electronic device 200 and the stylus 100 establish a bluetooth wireless connection, the electronic device 200 periodically transmits an uplink signal containing synchronization information through an electrode array of the touch screen 201. When the stylus 100 is close to the touch screen 201, for example, when the distance between the stylus 100 and the touch screen 201 is smaller than the preset distance (10 cm), the stylus 100 detects the uplink signal through the receiving electrode and sends a periodic downlink signal (i.e. a coding signal) to the touch screen 201 based on the synchronization information in the uplink signal. Accordingly, the touch screen 201 starts to sample the code printing signal sent by the stylus 100 after sending the synchronization signal through a fixed time delay, and obtains the drawing track of the space or the screen of the stylus 100 after multiple rounds of sampling. Because the pen point code signal voltage of the active stylus is generally higher (about 40V), electromagnetic interference is easily caused to a touch detection circuit in the stylus, and the accuracy of the detection of the pen holding gesture is affected.
Fig. 6 is a signal timing diagram according to an embodiment of the present application. Fig. 6 shows a timing sequence of transmitting a coding signal by a pen tip of a conventional stylus pen and a timing sequence of sampling capacitance values of a touch detection circuit. And responding to the received uplink signal of the electronic equipment, and sending a code printing signal by the pen point code printing chip of the touch control pen in a T1 period according to the internal clock frequency. Meanwhile, the touch detection chip samples the capacitance value in a period T2 according to the internal clock frequency. The nib coding chip and the touch detection chip are respectively provided with independent clock sources, so that the periods T1 and T2 are not equal. Typically, the duration of the T1 period is 16.6 milliseconds (i.e., the frequency of the coded signal is 60 Hz), and the duration of the T2 period may be selected from 10 to 16.6 milliseconds (i.e., the sampling frequency is 60 to 100 Hz), in this case the duration of the T2 period is 10 milliseconds.
As shown in fig. 6, t1, t3, t5, t7 respectively represent the time when the touch detection chip starts to sample the touch capacitance value for the touch area 21, and t2, t4, t6, t8 respectively represent the time when the touch capacitance value sampling ends. Wherein, the first touch capacitance sampling interval between t1 and t2 has about 60% of time overlapping with the time of transmitting the coding signal by the pen tip. The second touch capacitance sampling interval between t3 and t4 has about 35% of the time overlapping with the time at which the pen tip emits the coded signal. Similarly, the overlapping time lengths of the time of the touch capacitance sampling interval and the time of the code signal emitted by the pen point are different from each other between t5 and t6 and between t7 and t 8. The degree of noise interference generated by the code signal of the pen point on the sampling capacity value is related to the overlapping time length, and the noise interference lacks regularity and cannot be thoroughly eliminated through a software algorithm.
In view of this, referring to fig. 7, a control method of a stylus is provided in an embodiment of the present application. The method can be applied to the scenarios shown in fig. 1 and 3. The mechanical structure of the stylus 100 may refer to fig. 2A and 2B, and the circuit structure may refer to fig. 4. In this embodiment, the stylus 100 is an active capacitive pen, and the electronic device 200 is a tablet computer (hereinafter referred to as tablet computer 200).
For clarity and conciseness in the description of the embodiments below and for ease of understanding to those skilled in the art, a brief introduction to related concepts or technologies is first presented.
The code printing module in the application mainly refers to a code printing chip, and the touch detection module mainly refers to a touch detection chip. The touch detection chip may include two operation states, wherein the first operation state may refer to the operation of the touch detection chip in an automatic capacitance sampling mode, and in the first operation state, capacitance sampling is performed based on the second period (T2 period). The second operation state may refer to the touch detection chip operating in a manual capacitance sampling mode, and in the second operation state, capacitance sampling is performed based on a third period (T1 period). The code printing chip emits code printing signals based on a first period (T1 period) when printing codes. In the present application, the first period and the third period may be equal, and both may be T1 periods, and the T1 period may be 16.6 milliseconds.
Step S701: when the touch control pen is far away from the tablet computer, the code printing chip does not emit code printing signals.
In an operating state, the tablet 200 periodically broadcasts an up signal to the surroundings through an electrode array provided at its touch screen 201. When the stylus 100 is far from the tablet 200, for example, the distance between the two is greater than a preset distance (10 cm), the electrode of the stylus 100 does not detect the uplink signal emitted from the tablet 200, or detects that the uplink signal emitted from the tablet 200 is weak (below a preset threshold in the stylus 100). The encoding chip 170 does not emit an encoding signal at this time. Fig. 8A is a signal timing diagram of a stylus 100 according to an embodiment of the application. The top half of fig. 8A shows the timing of the coded signal emitted by the coding chip 170. The code chip 170 does not emit a code signal when the distance of the stylus 100 from the tablet 200 exceeds a preset distance (10 cm), and thus the waveform is not shown in the upper half of the timing diagram of fig. 8A.
Step S702: the touch detection chip works in an automatic capacitance sampling mode, and capacitance sampling is performed in a T2 period.
During periods when the stylus 100 is not in use (e.g., the stylus 100 is placed in a barrel), the touch detection chip 115 is in a sleep state with low power consumption, and no capacitive detection is performed for the touch area 21. When the user moves the stylus 100 in order to use it, the inertial sensor 130 first detects a change in the acceleration of the pen body and sends a wake-up signal to the touch detection chip 115 via the processor 110.
The touch detection chip 115 wakes up after receiving the wake-up signal, and enters an automatic capacitance sampling mode. In the automatic capacitance sampling mode, the touch detection chip 115 periodically samples the capacitance of the mutual capacitance of 36 detection points of the touch area 21 based on its own clock period T2, so as to obtain gesture information such as sliding and knocking of the finger of the user at the touch area 21.
The timing of the capacitance sampling by the touch detection chip 115 refers to the timing chart of the lower half of fig. 8A. The internal clock period T2 of the touch detection chip 115 is 10 milliseconds long (i.e., the clock frequency is 100 Hz). At this frequency, the stylus 100 can accurately recognize gesture operations that are rapidly changeable by the user. At the start of capacitance sampling, the touch detection chip 115 performs cyclic capacitance sampling with 10 ms as one period. In each capacitance sampling period, the duration of the sampling interval in which self-mutual capacitance sampling is performed for the touch area 21 is 3 milliseconds, and sampling is not performed at other times than the sampling interval. Specifically, the period from time 0 to t2 is a first capacitance sampling period, the period from t2 to t4 is a second capacitance sampling period, and the period from t4 to t6 is a third capacitance sampling period. Wherein t1, t3, t5 respectively represent the starting time of the 1 st, 2 nd and 3 rd capacity sampling, t2, t4, t6 respectively represent the ending time of the 1 st, 2 nd and 3 rd capacity sampling, t1 to t2, t3 to t4, t5 to t6 respectively represent sampling intervals of the first, second and third capacity sampling periods, and the duration of each sampling interval is 3 milliseconds. While no capacity sampling is performed during periods 0 to t1, t2 to t3, t4 to t5 outside the sampling interval. In the sampling interval of the touch detection chip 115, the code-encoding chip 170 does not emit the code-encoding signal, and thus the touch detection chip 115 does not receive noise interference from the code-encoding signal. In other embodiments, as shown in FIG. 11, the clock period T2 of the touch detection chip 115 may also be 16.6 milliseconds, which is the same as the clock period T1 of the encoding chip 170 described below, to provide a consistent touch input experience during encoding and non-encoding.
Because the touch control pen has at least two states of being far away from the tablet computer and being close to the tablet computer, when the touch control pen is far away from the tablet computer, a code printing chip in the touch control pen does not emit a code printing signal, and the touch detection chip is set to work in an automatic capacitance sampling mode. When the touch pen is close to the computer, the code printing chip in the touch pen emits code printing signals, so that track drawing on the touch screen 201 or operation control on application in the tablet computer is realized, and the touch detection chip is set to work in a manual capacitance sampling mode.
To achieve configurable adjustment of the two modes of operation, the touch detection chip 115 is firmware customized and the processor 110 controls the modes of operation of the touch detection chip, including two modes, automatic capacitance sampling and manual capacitance sampling. Wherein the automatic capacitance sampling triggers an internal scan by an internal clock of the touch detection chip 115, without external control. The manual capacitance sampling is controlled by the processor 110, and the processor 110 can switch the operation mode of the touch detection chip 115.
In the manual capacitance sampling scheme, the processor 110 is added to process interrupt writing to the I2C register, so that the wake-up time of the micro control unit (Microcontroller Unit, MCU) is increased for a short time, and a small amount of power consumption is increased. If the touch detection chip always operates in the manual capacitance sampling mode, the power consumption of the touch pen is increased, and the processor 110 adaptively adjusts the operation mode of the touch detection chip 115 according to whether the touch pen 100 is coded or not in order to reduce the power consumption cost.
Step S703: the processor waits to receive an interrupt signal from the encoding chip.
When the touch control pen is far away from the tablet personal computer, the touch detection chip works in an automatic capacitance sampling mode; when the touch control pen is close to the tablet personal computer, the touch detection chip works in a manual capacitance sampling mode. In this embodiment, the state switching of the touch detection chip is controlled by the processor, which switches the state of the touch detection chip by receiving an interrupt signal from the coding chip.
When the touch control pen is far away from the tablet personal computer, the code printing chip does not emit code printing signals, the touch detection chip works in an automatic capacitance sampling mode, the processor waits for receiving interrupt signals from the code printing chip, the processor cannot detect terminal signals from the code printing chip because the code printing chip does not emit the code printing signals, and the touch detection chip continues to work in the automatic capacitance sampling mode. If the processor detects the interrupt signal from the coding chip, the processor sends an instruction to control the touch detection chip, and the working mode of the touch detection chip is adjusted to be switched from the automatic capacitance sampling mode to the manual capacitance sampling mode.
Step S704: when the touch pen is close to the tablet personal computer, the coding chip detects an uplink signal of the tablet personal computer signal and starts to transmit the coding signal in a T1 period.
In an operating state, the tablet 200 periodically broadcasts an up signal to the surroundings through an electrode array provided at its touch screen 201. When the stylus 100 is closer to the tablet pc 200, for example, the distance between the two is smaller than or equal to the preset distance (10 cm), the receiving electrode of the stylus 100 detects the uplink signal from the electronic device 200. In response to the up signal, the code printing chip 170 acquires synchronization information from the up signal and starts to transmit a code printing signal through a transmitting electrode provided at the pen tip 10 based on the synchronization information.
As shown in fig. 8B, the timing of the code signal transmitted by the code chip 170 is set to 0 in the present figure, and the code chip 170 starts transmitting the code signal (downlink signal) based on the internal clock period T1 from 0.
In this embodiment, the internal clock period T1 of the encoding chip 170 is 16.6 ms (i.e. the clock frequency is 60 Hz), which is consistent with the screen refresh rate of the tablet pc 200. The stylus 100 may obtain the screen refresh rate of the tablet pc 200 through an uplink signal or bluetooth communication, thereby adaptively adjusting the period of the code chip 170 transmitting the code signal. In transmitting the code signal, the code chip 170 transmits the code signal cyclically with 16.6 ms as one cycle, and each cyclic transmission period T1 includes a code interval of about 11.6 ms and an idle interval of about 5 ms. During the coding interval (e.g., the 0 th to 11.6 th milliseconds and the 16.6 th to 28.2 th milliseconds of fig. 8B), the coding chip 170 transmits 8 square wave coding signals, respectively, so that the tablet pc 200 can acquire the position and the drawing trace of the pen tip 10 of the stylus 100 based on the received coding signals. During the idle interval (e.g., 11.6 th to 16.6 th milliseconds and 28.2 th to 33.2 th milliseconds of fig. 8B), the encoding chip 170 stops transmitting the encoding signal.
Step S705: the coding chip sends a coding interrupt signal to the processor.
The processor 110 in the stylus 100 waits to receive an interrupt signal from the encoding chip 170 by detecting the I2C bus to which the encoding chip 170 is connected.
When the coding chip detects an uplink signal of the tablet computer signal, the coding signal starts to be transmitted in a T1 period, wherein the coding signal comprises a coding interval and an idle interval. Since the coding chip does not actually send out a coding signal in the idle interval, at the ta moment when the idle interval is just entered, the coding chip 170 sends out a coding interrupt signal to the processor 110 through the I2C bus, so as to prompt that the coding chip 170 has entered the idle interval currently.
Step S706: after the processor receives the code printing interrupt signal and recognizes that code printing is started, the touch detection chip is set to work in a manual capacitance sampling mode.
Because the code printing chip is not in a code printing state when the touch control pen is far away from the tablet personal computer, the touch detection chip works for automatic capacitance sampling; when the touch pen is slowly close to the tablet computer, the coding chip starts to be in a coding state after detecting an uplink signal of the tablet computer signal, and can send out a coding interrupt signal. Furthermore, the processor can receive the coding interrupt signal sent by the coding chip in the coding state. Because the touch detection chip also works in the automatic capacitance sampling mode at this time, after the processor receives the code printing interrupt signal and recognizes that the code printing chip starts code printing, the touch detection chip is set to work in the manual capacitance sampling mode, namely, the automatic capacitance sampling mode is switched to the manual capacitance sampling mode.
Step S707: the processor sends an instruction set to a manual capacitance sampling mode to the touch detection chip.
After the processor receives the code printing interrupt signal and recognizes that the code printing chip starts code printing, and detects that the touch detection chip works in an automatic capacitance sampling mode, the processor sends an instruction set as a manual capacitance sampling mode to the touch detection chip, so that the touch detection chip can work in the manual capacitance sampling mode.
Step S708: the operation mode of the touch detection chip is switched from the automatic capacitance sampling to the manual capacitance sampling mode.
The processor 110 detects the code interrupt signal of the GPIO at the time ta, and writes a register for recording the operating state of the touch detection chip 115 through the I2C during the period ta to t1, so that the touch detection chip 115 switches the manual capacitance sampling mode from the automatic capacitance sampling mode. The touch detection chip 115 determines its operation mode by reading its own specific register. After the touch detection chip 115 enters the manual capacitance sampling mode, the touch detection chip 115 does not trigger the capacitance sampling signal synchronously according to the clock period T2 inside the touch detection chip, but waits for receiving the sampling command sent by the processor 110, and asynchronously triggers the capacitance sampling operation in response to the sampling command signal. As shown in fig. 8B, when the touch detection chip 115 operates in the manual sampling mode, in response to the sampling command issued by the processor 110, the sampling intervals t1 to t2, t3 to t4 all fall into the idle intervals (i.e., ta to 16.6 ms period and tb to 33.2 ms period) of the code signal, thereby greatly reducing noise interference of the code signal received by the touch detection chip 115 when performing capacitive sampling.
In addition, in one or more embodiments, in order to further reduce interference, in the manual capacitance sampling mode, the duration of the sampling interval may also be adjusted so as to completely fall into the idle interval of the code signal. In other embodiments, the encoding chip 170 sends 2 encoding interrupt signals to the processor 110 in each cycle T1. In addition, the processor 110 may send a sampling command to the touch detection chip 115 every time it receives 2 times of code interrupt signals.
Step S709: when entering the coding interval, the coding chip transmits a coding signal.
Because the code printing chip enters the code printing state at this time and transmits the code printing signal in the T1 period, the processor switches the touch detection chip from the automatic capacitance sampling mode to the manual capacitance sampling mode by receiving the code printing interrupt signal sent by the code printing chip in the first code printing period of the code printing chip.
When entering the coding interval of the second coding period (i.e., during the 16.6 th to 28.2 th milliseconds of the timing diagram of the upper half of fig. 8B), the coding chip 170 transmits 8 square wave coding signals, so that the tablet pc 200 can acquire the position and drawing track of the pen tip 10 of the stylus 100.
Step S710: when the idle interval is entered, the coding chip sends out a coding interrupt signal.
Upon entering the idle interval of the second encoding period (i.e., during the 28.2 to 33.2 milliseconds of the timing diagram in the upper half of fig. 8B), the encoding chip 170 issues an interrupt signal to the processor 110 over the I2C bus at time tb (at about 28.2 milliseconds), prompting the entering encoding chip 170 that it has currently entered the idle interval and no longer transmitting an encoding signal.
Step S711: the processor receives the coding interrupt signal and sends an instruction to control the touch detection chip to start capacitance sampling in a very short time.
As shown in fig. 8B, the processor 110 detects the coding interrupt signal of the GPIO at the time tb, and generates a control instruction during the period tb to t3 to control the touch detection chip to perform capacitance sampling. Because the idle interval time of the code printing chip is short (about 5 milliseconds), the processor needs to receive the code printing interrupt signal in the idle interval and generate a control instruction to instruct the touch detection chip to perform capacitance sampling, and the process of performing capacitance sampling by the touch detection chip also needs a certain time, so that the processor needs to generate the instruction in a very short time and send the instruction to the touch detection chip. Typically the capacitance sample time is around 3 milliseconds, so the processor needs to do this within 2 milliseconds.
Step S712: the processor sends an instruction for starting capacitance sampling to the touch detection chip.
The processor 110 generates a control instruction and transmits a sampling instruction to the touch detection chip 115 in response to the encoding interrupt signal issued when the encoding chip 170 enters the idle interval.
Step S713: the touch detection chip performs capacitance sampling.
As shown in fig. 8B, in response to receiving a sampling instruction from the processor 110 through the I2C bus, the touch detection chip 115 performs capacitance sampling on the touch area 21 from the time t3, and the duration of the sampling interval t3 to t4 is 3 milliseconds. After the sampling interval is ended, the touch detection chip 115 stops sampling until a sampling instruction from the processor 110 is received again.
In the manual capacitance sampling mode, since the encoding chip 170 issues the encoding interrupt signal to the slave processor 110 at the internal clock period T1, and accordingly the processor 110 issues the sampling instruction to the touch detection chip 115 at the period T1, the touch detection chip 115 can be approximately regarded as having the sampling period T2' substantially the same as the encoding period T1. When the operation mode of the touch detection chip 115 is switched from the automatic sampling mode to the manual sampling mode, the sampling frequency is responsively reduced from 100Hz to 60Hz. When the touch detection chip 115 performs capacitance sampling, the current on the power supply pin of the chip will be significantly increased, and by detecting the current of the touch detection chip 115, it can be determined whether the current working time sequence of the chip is located in the sampling interval.
In some embodiments, when the distance between the stylus 100 and the tablet pc 200 exceeds 10 preset distances (10 cm), the stylus 100 enters a remote control mode, and precisely detects gesture operations of a user, which are mainly multi-finger gestures, at a higher frequency of 100Hz, so as to control the playing progress of the tablet pc 200 in playing video and the magnification and page turning of a playing film (Slide). When the distance between the stylus 100 and the tablet computer is smaller than a preset distance (10 cm), the stylus 100 enters a handwriting mode, gesture operation of a user, mainly single-finger sliding and clicking gestures, is detected at a lower frequency of 60Hz, and the influence of noise interference is further reduced, so that targeted personalized experience is brought to the user in different use scenes.
Step S714: when the touch pen is far away from the tablet computer, the code printing chip stops transmitting code printing signals.
When the distance between the stylus 100 and the tablet pc 200 exceeds the preset distance (10 cm), the electrode of the stylus 100 does not detect the uplink signal transmitted from the tablet pc 200, or the detected uplink signal transmitted from the tablet pc 200 is weak (lower than the preset threshold), and the code-printing chip 170 stops transmitting the code-printing signal.
Step S715: when the code printing interrupt signal is not received in more than 1 period T1, the processor sets the touch detection chip to work in an automatic capacitance sampling mode.
The processor waits to receive the code printing interrupt signal from the code printing chip, when the touch control pen is far away from the tablet personal computer, the code printing chip stops transmitting the code printing signal, the processor cannot receive the code printing interrupt signal, and at the moment, the touch detection chip still works in a manual capacitance sampling mode and cannot sample according to a sampling instruction sent by the processor. When the processor does not receive the coding interrupt signal in more than 1 period T1, the coding chip is judged to be in a coding stop state, so that the processor sets the touch detection chip to work in an automatic capacitance sampling mode.
Step S716: the processor sends an instruction for setting the automatic capacitance value sampling to the touch detection chip.
Referring to fig. 8B, after a preset first period T3 of 1 coding period T1 has elapsed, the coding interrupt signal from the coding chip 170 is not received, and then the processor 110 writes the coding interrupt signal into the register of the touch detection chip 115 through I2C at about 49 ms, so that the operation mode of the touch detection chip 115 is switched from the manual capacitive sampling mode to the automatic capacitive sampling mode.
In other embodiments, the duration of the preset first duration T3 may also be set to be greater than 2 or more periods T1.
Step S717: the operation mode of the touch detection chip is switched from a manual capacitance sampling mode to an automatic capacitance sampling mode, and capacitance sampling is performed in a T2 period.
Referring to fig. 8B, the touch detection chip 115 reads a register recording its operation mode, and switches the operation mode from the manual capacitance sampling to the automatic capacitance sampling mode. In the auto capacitance sampling mode, the touch detection chip 115 starts capacitance sampling of the touch area 21 for each other during 50 th to 60 th milliseconds based on its own clock period T2 (e.g., 10 ms), wherein the sampling interval is 50 th to 53 th milliseconds. During the aforementioned sampling interval, since the encoding chip 170 no longer emits the encoding signal, the touch detection chip 115 is not disturbed by noise from the encoding signal.
Another embodiment of the present application also provides another control method of the stylus pen, which can be applied to the stylus pen 100 shown in fig. 1 and 3. The mechanical structure of the stylus 100 may refer to fig. 2A and 2B, and the circuit structure of the stylus 100 may refer to fig. 4. In this embodiment, the touch detection chip operates in a manual capacitance sampling mode.
Referring to fig. 9, the method includes the following steps.
Step S901: when the touch pen is close to the tablet computer, the code printing chip emits code printing signals.
When the distance between the stylus 100 and the tablet pc 200 is smaller, for example, the distance between the stylus 100 and the tablet pc 200 is smaller than or equal to a preset distance (10 cm), the receiving electrode of the stylus 100 detects an uplink signal from the electronic device 200. In response to the up signal, the stylus pen acquires synchronization information from the up signal and starts transmitting the code signal through a transmitting electrode provided at the pen tip 10 based on the synchronization information.
As shown in fig. 10, the timing of the code signal transmitted by the code chip 170 is set to 0 in the present figure, and the code chip 170 starts transmitting the code signal (downlink signal) based on the internal clock period T1 from 0.
Step S902: the touch detection chip works in a manual capacitance sampling mode.
The touch detection chip 115 operates in a manual capacitance sampling mode, and performs capacitance sampling in response to a code interrupt signal from the processor 110 or the code chip 170. In this embodiment, the touch detection chip 115 performs capacitive sampling in response to the coding interrupt signal from the processor 110.
Step S903: the processor waits to receive an interrupt signal from the encoding chip.
In the manual capacitance sampling mode, in order to reduce interference of the code signal on the touch detection chip 115 when performing capacitance sampling, the touch detection chip 115 performs capacitance sampling by a processor, and the processor determines whether the code signal enters an idle interval according to a code interrupt signal sent by the code chip. Therefore, when the touch detection chip 115 performs the manual capacitance sampling mode in response to the code interrupt signal from the processor 110, the processor continuously waits to receive the code interrupt signal from the code chip to control the touch detection chip to perform capacitance sampling.
Step S904: the coding chip generates a coding interrupt signal in a period T1.
The processor 110 waits to receive an interrupt signal from the encoding chip 170 by detecting the I2C bus to which the encoding chip 170 is connected.
When the distance of the stylus 100 from the tablet pc 200 is less than or equal to the preset distance (10 cm), the receiving electrode of the stylus 100 detects an uplink signal from the electronic device 200. In response to the up signal, the code printing chip 170 acquires synchronization information from the up signal and starts to transmit a code printing signal through a transmitting electrode provided at the pen tip 10 based on the synchronization information.
Fig. 10 is a timing chart of transmitting a coded signal and performing capacitance sampling in the present embodiment, where a period T1 of the coded signal and a period T2 of the capacitance sampling are both 16.6 ms, the coded signal period T1 includes a coded period of about 11.6 ms duration and an idle period of 5 ms duration, and the period of the period T2 of the capacitance sampling includes a touch capacitance sampling period of 3 ms duration and an idle period of 13.3 ms duration. The first cycle of the code signal starts at time 0 and ends at 16.6 ms, where the period 0 to t1 (about 11.6 ms) is the code interval in which the code chip 170 emits a code signal consisting of 8 square waves through the emitter electrode of the pen tip. the period t1 to 16.6 ms is an idle interval in which the encoding chip 170 does not transmit an encoding signal. When the idle interval is just entered, the encoding chip 170 sends an encoding interrupt signal to the processor 110.
Step S905: the processor receives the coding interrupt signal, judges that the coding interrupt signal is the maximum coding interval, and sends an instruction to control the touch detection chip to start capacitance sampling in a very short time.
The first cycle of the code signal ends at 16.6 ms from time 0, where 0 to t1 (the period is the code interval in which the code chip 170 transmits a code signal consisting of 8 square waves through the transmitting electrode of the pen tip, where there is a certain interval time between transmitting any two adjacent square waves, but the interval time is small, so the code chip does not transmit the code interrupt signal, and the code chip 170 does not transmit the code interrupt signal and transmits the code interrupt signal to the processor during the idle interval (t 1 to 16.6 ms), the processor 110 detects the code interrupt signal of the GPIO, determines that the code interrupt signal is the maximum code interval from the beginning of the next code signal cycle at this time, and the processor generates a sampling instruction in a very short time (within 2 ms), and transmits the sampling instruction to the touch detection chip.
Step S906: the touch detection chip completes sampling between t1 and t 2.
The touch detection chip 115 completes sampling between t1 and t2 in response to the sampling instruction of the processor 110. Since the period t1 to t2 is completely located in the idle interval of the time sequence of the code-encoding chip 170, the code-encoding chip 170 does not emit code-encoding signals in the idle interval, and thus the touch detection chip 115 is not interfered by noise during sampling.
When the stylus 100 is close to the tablet pc 200, i.e. the distance is less than or equal to the preset distance (10 cm), the code-printing chip transmits the code-printing signal in a period T1, the touch-detecting chip 115 performs capacitance sampling in a period T2, the period T1 is equal to the period T2, and steps S904, S905 and S906 are cycled.
According to the time-sharing capacitance sampling software control scheme provided by the embodiment, interference noise of a pen point code signal on a touch detection chip can be avoided. The time-sharing capacitance sampling scheme refers to the code-printing time sequence of the pen point, and controls the capacitance sampling time to be in an idle gap of the code-printing time sequence with time accuracy accurate to a millisecond level. The scheme reduces noise and adaptively adjusts the working mode of the touch detection chip according to whether the pen is coded or not, so that the power consumption cost is reduced to the minimum.
In addition, an embodiment of the present application further provides a control method of a stylus, which can be applied to the stylus 100 shown in fig. 1 and 3. The mechanical structure of the stylus 100 may refer to fig. 2A and 2B, and the circuit structure of the stylus 100 may refer to fig. 11. In this embodiment, the touch detection chip operates in a manual capacitance sampling mode.
The circuit structure of the stylus 100 shown in fig. 11 is different from the circuit structure of the stylus 100 shown in fig. 4 in that: in the circuit structure of fig. 11, communication between the code chip 170 and the touch detection chip 115 may be performed directly, whereas in fig. 4, communication between the code chip 170 and the touch detection chip 115 is required through the processor 110. The advantage is that when the code printing chip 170 is in the code printing state, the code printing interrupt signal sent by the code printing chip can be directly sent to the touch detection chip 115, after the touch detection chip 115 receives the signal, the sampling period T2 of the code printing chip can be adjusted to be equal to the code printing period T1, and the capacitance sampling interval of the sampling period is controlled to fall into the idle interval of the transmitting period, so that the capacitance sampling of the touch detection area of the touch pen 100 is not interfered by noise from the code printing signal.
It may comprise the steps of:
step S1101: when the touch pen is close to the tablet computer, the code printing chip emits code printing signals.
Step S1102: the touch detection chip works in a manual capacitance sampling mode.
Step S1103: the touch detection chip waits for receiving an interrupt signal from the coding chip.
Step S1104: the coding chip generates a coding interrupt signal in a period T1.
Step S1105: the touch detection chip receives the coding interrupt signal and starts capacitance sampling.
Step S1106: the touch detection chip completes sampling between t1 and t 2.
The specific implementation of the above steps may refer to the descriptions related to steps S901 to S906 in the foregoing embodiments, which are not described herein.
An embodiment of the present application further provides a control method of a stylus, which can be applied to the stylus 100 shown in fig. 1 and 3. The mechanical structure of the stylus 100 may refer to fig. 2A and 2B, and the circuit structure of the stylus 100 may refer to fig. 11. In this embodiment, the touch detection chip may switch between an automatic capacitance sampling mode and a manual capacitance sampling mode.
The circuit structure of the stylus 100 shown in fig. 11 is different from the circuit structure of the stylus 100 shown in fig. 4 in that: in the circuit structure of fig. 11, communication between the code chip 170 and the touch detection chip 115 may be performed directly, whereas in fig. 4, communication between the code chip 170 and the touch detection chip 115 is required through the processor 110. The advantage is that when the code printing chip 170 is in the code printing state, the code printing interrupt signal sent by the code printing chip can be directly sent to the touch detection chip 115, after the touch detection chip 115 receives the signal, the sampling period T2 of the code printing chip can be adjusted to be equal to the code printing period T1, and the capacitance sampling interval of the sampling period is controlled to fall into the idle interval of the transmitting period, so that the capacitance sampling of the touch detection area of the touch pen 100 is not interfered by noise from the code printing signal.
It may comprise the steps of:
step S1201: when the touch control pen is far away from the tablet computer, the code printing chip does not emit code printing signals.
Step S1202: the touch detection chip works in an automatic capacitance sampling mode, and capacitance sampling is performed in a T2 period.
Step S1203: the touch detection chip waits for receiving an interrupt signal from the coding chip.
Step S1204: when the touch pen is close to the tablet personal computer, the coding chip detects an uplink signal of the tablet personal computer signal and starts to transmit the coding signal in a T1 period.
Step S1205: the code printing chip sends a code printing interrupt signal to the touch detection chip.
Step S1206: after the touch detection chip receives the coding interrupt signal and recognizes that coding starts, the working mode of the touch detection chip is switched from an automatic capacitance sampling mode to a manual capacitance sampling mode.
Step S1207: when entering the coding interval, the coding chip transmits a coding signal.
Step S1208: when the idle interval is entered, the coding chip sends out a coding interrupt signal.
Step S1209: the touch detection chip receives the coding interrupt signal and performs capacitance sampling.
Step S1210: when the touch pen is far away from the tablet computer, the code printing chip stops transmitting code printing signals.
Step S1211: when the code interrupt signal is not received for more than 1 period T1, the working mode of the touch detection chip is switched from the manual capacitance sampling mode to the automatic capacitance sampling mode, and capacitance sampling is executed in a period T2.
The specific implementation of the above steps may refer to the descriptions related to step S701 to step S717 in the foregoing embodiments, and will not be described herein.
Referring to fig. 12, a further embodiment of the present application further provides a chip for coding and touch detection, which can be applied to the stylus 100 shown in fig. 1, and the circuit structure of the stylus 100 in this embodiment is shown in fig. 13. The stylus 100 includes a processor 110 therein. The coding and touch detection chip 150 is linked and communicated with the processor 110 through an I2C bus. The code and touch detection chip 150 includes a code module 170c, a touch detection module 115c, and a clock module 155. The coding module 170c is configured to transmit a coding signal composed of a square wave, a sine wave, a triangle wave, and the like to the electronic device 200 through the electrode. The touch detection module 115c is configured to periodically detect the self-capacitance (the product may be self-capacitance, mutual capacitance, or all of them) of a plurality of points on the touch area 21 through the touch panel, and the human finger has a conductive characteristic, and when touching the pen body, the magnitude of the capacitance is changed. The touch detection chip can detect hand gestures such as holding, clicking, double clicking, sliding up and sliding down from a user by identifying the capacitance change characteristics of a plurality of points. The clock module 155 is connected to the encoding module 170c and the touch detection module 115c, respectively, and provides synchronous clock signals thereto, so that the period in which the encoding module 170c transmits the encoding signal is the same as the period in which the touch detection module 115c performs capacitive sampling, and the phase difference of each period remains consistent.
Referring to fig. 13, fig. 13 is a timing chart of yet another signal provided in the embodiment of the present application, which is a timing chart of transmitting a coded signal and performing capacitance sampling in the embodiment. The period T1 of the code signal and the period T2 of the capacitance sampling are 16.6 milliseconds, the code signal period T1 comprises a code-printing interval with the duration of about 11.6 milliseconds and an idle interval with the duration of 5 milliseconds, and the period of the capacitance sampling period T2 comprises a touch capacitance sampling interval with the duration of 3 milliseconds and an idle interval with the duration of 13.3 milliseconds. The first cycle of the code signal starts at time 0 and ends at 16.6 ms, where the period 0 to t1 (about 11.6 ms) is the code interval in which the code module 170c transmits a code signal consisting of 8 square waves through the transmitting electrode of the pen tip. the period t1 to 16.6 ms is an idle interval in which the coding module 170c does not transmit a coding signal. The period of capacitance sampling starts at time t1 and ends at time t3 (about 28.2 milliseconds). The period from t1 to t2 is a capacitance sampling interval, in which the touch detection module 115c detects the self-mutual capacitance (the product may be self-capacitance, mutual capacitance, or all of them) of a plurality of points on the touch area of the stylus 100 through the expiration, so as to detect the gesture of holding, double-clicking, up-sliding, etc. from the user. the period from t2 to t3 is an idle period in which the touch detection module 115c does not sample the capacitance of the touch area of the stylus 100. Since the duration of each capacity sampling interval is 3 ms and is smaller than the idle interval (5 ms) of the period T1, when the capacity sampling interval of the sampling period falls within the idle interval of the transmitting period, the capacity sampling may not be interfered by noise of the coded signal. The clock module 155 provides clock signals with the same period and different phases for the code printing module 170c to the touch detection module 115c, so that the capacitance sampling interval of the sampling period falls into the idle interval of the transmitting period, the capacitance sampling of the touch detection area of the touch pen 100 is not interfered by noise from the code printing signal, and the accuracy of gesture recognition is ensured.
Still another embodiment of the present application provides a computer storage medium, where the computer storage medium may store a program, where the program controls a device where the computer readable storage medium is located to perform some or all of the steps in the foregoing embodiments when the program runs. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Yet another embodiment of the present application provides a computer program product containing executable instructions which, when executed on a computer, cause the computer to perform some or all of the steps in the method embodiments described above.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided by the present invention, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely exemplary embodiments of the present invention, and any person skilled in the art may easily conceive of changes or substitutions within the technical scope of the present invention, which should be covered by the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A control method of a stylus, comprising:
transmitting a downlink signal to the terminal equipment in a first interval of a first period;
generating an interrupt signal in a second interval of a first period, wherein the second interval is not overlapped with the first interval;
in response to the interrupt signal, capacitive sampling is performed in a second interval of the first period.
2. The method of claim 1, wherein transmitting the downlink signal to the terminal device in the first interval of the first period comprises:
and transmitting the downlink signal to the terminal equipment in the first interval under the condition that the distance between the touch pen and the terminal equipment is smaller than or equal to a preset distance.
3. The method of claim 2, wherein the performing capacitive sampling during the second interval of the first period in response to the interrupt signal comprises:
And under the condition that the distance between the touch pen and the terminal equipment is smaller than or equal to a preset distance, performing capacitance sampling in the second interval in response to the interrupt signal.
4. A method according to any of claims 1-3, characterized in that the first period is a period in which a downlink signal is transmitted to the terminal device.
5. The method according to any of claims 1-4, wherein the stylus does not transmit a downlink signal to the terminal device in the second interval.
6. The method according to any one of claims 1-5, wherein the stylus includes a touch detection module, a coding module, and a processor, and wherein the transmitting the downlink signal to the terminal device in the first interval of the first period includes:
the coding module transmits a downlink signal to the terminal equipment in the first interval;
generating an interrupt signal in a second interval of the first period, comprising:
the coding module generates an interrupt signal in a second interval of the first period and sends the interrupt signal to the processor;
the performing, in response to the interrupt signal, capacitive sampling over a second interval of the first period includes:
Responding to the interrupt signal, and sending a capacitance sampling instruction to the touch detection module by the processor;
and responding to the capacitance sampling instruction, and executing capacitance sampling in the second interval by the touch detection module.
7. The method according to any one of claims 1-6, wherein the downstream signal is any one of a square wave signal, a sine wave signal, or a triangular wave signal.
8. A control method of a stylus, comprising:
determining the distance between the touch control pen and the terminal equipment;
controlling the stylus to work in a first working mode under the condition that the distance between the stylus and the terminal equipment is smaller than or equal to a preset distance;
in the first mode of operation, the method comprises:
transmitting a downlink signal to the terminal equipment in a first interval of a first period;
generating an interrupt signal in a second interval of a first period, wherein the second interval is not overlapped with the first interval, and the stylus does not transmit a downlink signal to the terminal equipment in the second interval;
performing capacitive sampling in a second interval of the first period in response to the interrupt signal;
Controlling the stylus to work in a second working mode under the condition that the distance between the stylus and the terminal equipment is larger than a preset distance;
wherein, in the second operation mode, the method comprises:
stopping transmitting a downlink signal to the terminal equipment;
the capacitive sampling is performed in a second period, the period interval of which is different from the period interval of the first period.
9. The method of claim 8, wherein the first period is a period during which a downlink signal is transmitted to the terminal device.
10. A stylus device comprising a memory for storing computer program instructions, a processor for executing the program instructions, which when executed by the processor, trigger the stylus to perform the method of any one of claims 1-9.
11. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1-9.
12. A chip system comprising a processor for invoking a computer program in memory to perform the method of any of claims 1-9.
13. A touch system, comprising:
the touch control pen is used for transmitting downlink signals to the terminal equipment in a first interval of a first period;
the terminal equipment is used for receiving the downlink signal;
the stylus is also for:
generating an interrupt signal in a second interval of a first period, wherein the second interval is not overlapped with the first interval, and the stylus does not transmit a downlink signal to the terminal equipment in the first interval;
in response to the interrupt signal, capacitive sampling is performed in a second interval of the first period.
CN202310998526.2A 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment Pending CN117170512A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN2022102891791 2022-03-22
CN202210289179 2022-03-22
CN202210761448.XA CN115599229B (en) 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210761448.XA Division CN115599229B (en) 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment

Publications (1)

Publication Number Publication Date
CN117170512A true CN117170512A (en) 2023-12-05

Family

ID=84850132

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210761448.XA Active CN115599229B (en) 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment
CN202310998526.2A Pending CN117170512A (en) 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202210761448.XA Active CN115599229B (en) 2022-03-22 2022-06-30 Control method of touch pen and touch pen equipment

Country Status (1)

Country Link
CN (2) CN115599229B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930267B (en) * 2020-09-18 2021-02-12 深圳市汇顶科技股份有限公司 Touch control chip, code printing method and electronic equipment
CN112000248B (en) * 2020-10-28 2021-04-23 深圳市汇顶科技股份有限公司 Noise detection method, active pen and screen
CN112486340A (en) * 2020-11-27 2021-03-12 维沃移动通信有限公司 Touch pen and coding signal control method
CN112905047A (en) * 2021-02-08 2021-06-04 深圳市汇顶科技股份有限公司 Anti-interference method, touch control chip and active pen refill sheet

Also Published As

Publication number Publication date
CN115599229A (en) 2023-01-13
CN115599229B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN113268174B (en) Function control method and system
CN111124158B (en) Information input equipment, terminal, control method thereof and chip
CN114461129B (en) Handwriting drawing method and device, electronic equipment and readable storage medium
CN113821113B (en) Electronic equipment and touch pen interaction method and system and electronic equipment
KR20140134940A (en) Mobile terminal and method for controlling touch screen and system threefor
CN114217700B (en) Touch pen switching method and input device
CN108463788B (en) Active pen and gesture detection method based on same
CN115599229B (en) Control method of touch pen and touch pen equipment
CN114911364B (en) Control method, touch pen and touch system
TWI775242B (en) Touch sensitive processing apparatus and method thereof and system for receiving electrical signals carrying pressure information
CN115543105B (en) Information transmission method and device
TW202119191A (en) Stylus and operating method thereof for transmitting electrical signals carrying pressure information
JP2022012385A (en) Position detection device and program
CN116088698B (en) Touch pen-based use method and device
CN112783345B (en) Touch processing device and method for receiving electric signal carrying pressure information
CN112783342B (en) Touch pen for transmitting electric signal with pressure information and operation method thereof
TWI775236B (en) Touch sensitive processing apparatus and method thereof and system for receiving electrical signals carrying pressure information
CN114461092B (en) Touch pen connection method and electronic equipment
CN112783342A (en) Stylus for transmitting electrical signal with pressure information and operation method thereof
CN117032485A (en) Touch pen-based use method and device
TW202331478A (en) Stylus and method for transmitting electrical signals carrying pressure information
TW202244704A (en) Controller of stylus for transmitting electrical signals carrying pressure information
CN116736989A (en) Touch pen and control method thereof
KR20150021243A (en) Electronic device and method for controlling at least one of vibration and sound

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination