CN112558798A - Communication method and device of active pen, terminal and storage medium - Google Patents

Communication method and device of active pen, terminal and storage medium Download PDF

Info

Publication number
CN112558798A
CN112558798A CN202110188402.9A CN202110188402A CN112558798A CN 112558798 A CN112558798 A CN 112558798A CN 202110188402 A CN202110188402 A CN 202110188402A CN 112558798 A CN112558798 A CN 112558798A
Authority
CN
China
Prior art keywords
coding
code
pressure
pressure information
active pen
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
CN202110188402.9A
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.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Shenzhen Qianfenyi Intelligent Technology 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 Shenzhen Qianfenyi Intelligent Technology Co Ltd filed Critical Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority to CN202110188402.9A priority Critical patent/CN112558798A/en
Publication of CN112558798A publication Critical patent/CN112558798A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F3/0383Signal control means within the pointing device

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)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The application discloses a communication method, a device, a terminal and a storage medium of an active pen, wherein the communication method of the active pen comprises the following steps: when pressure information is detected through a pressure sensor, the representation pressure information and a code for pen point detection are obtained according to the pressure information, and the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to the touch screen according to the same frequency. The pressure is expressed in a digital coding mode, and meanwhile, the coding signals are transmitted by adopting the same frequency, so that the same frequency interference is avoided in the transmission process, and the normal writing is ensured.

Description

Communication method and device of active pen, terminal and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method, an apparatus, a terminal, and a storage medium for an active pen.
Background
When the existing active pen transmits pressure information, different frequencies are generally adopted to transmit different pressure information, so that the active pen is easily influenced by the environment when communicating with a touch screen to form same frequency interference, and the condition that the active pen writes broken lines or even cannot write on a flat plate occurs.
Disclosure of Invention
The embodiment of the application provides a communication method, a communication device, a communication terminal and a storage medium for an active pen, and aims to solve the problem that the active pen is easy to be subjected to same frequency interference to cause line break and even writing failure due to the fact that different pressures are transmitted by different frequencies.
In order to achieve the above object, an aspect of the present application provides a communication method for an active pen, including:
when pressure information is detected through a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits;
generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor;
and sending the n code printing signals to a touch screen according to the same frequency.
Optionally, the step of obtaining, according to the pressure information, a code representing the pressure information and used for pen tip detection includes:
coding the pressure information through a set coding mode to obtain a pressure code;
and adding a coordinate code for detecting the position of the pen point into the pressure code to obtain the pressure information and the code for detecting the pen point.
Optionally, after the step of acquiring, when pressure information is detected by a pressure sensor, a code representing the pressure information and used for pen tip detection according to the pressure information, the method includes:
when key information is detected, key coding bits of coding numerical values corresponding to the key information are obtained, wherein different key information corresponds to the key coding bits of different coding numerical values;
and sending the code printing signal corresponding to the key coding bit to the touch screen.
Optionally, the step of obtaining, when pressure information is detected by a pressure sensor, a code representing the pressure information and used for pen tip detection according to the pressure information includes:
receiving a synchronous signal sent by the touch screen, and responding to the synchronous signal;
after the synchronous signal is finished, timing is started to obtain timing time, and whether the timing time reaches delay time or not is judged;
and if the timing duration reaches the delay time, executing a step of acquiring the pressure information and a code for pen point detection according to the pressure information when the pressure information is detected by a pressure sensor.
Optionally, before the step of acquiring, when pressure information is detected by a pressure sensor, a code representing the pressure information and used for pen tip detection according to the pressure information, the method further includes:
when the pressure information or the key information is not detected, sending a synchronous signal to the touch screen;
and acquiring the delay time in the synchronous signal.
Optionally, the step of generating n coded signals corresponding to n coded bits according to different pressures applied to the pressure sensor includes:
acquiring a pressure value borne by the pressure sensor and a set code printing signal type, wherein code printing information corresponding to each coding bit is preset in the code printing signal type;
and generating n coding signals corresponding to the n coding bits according to the pressure value and the coding signal type.
Optionally, after the step of generating n coded signals corresponding to n coded bits according to different pressures applied to the pressure sensor, the method further includes:
and setting a check coding bit in the n coding bits, and setting a coding value corresponding to the check coding bit.
In addition, to achieve the above object, another aspect of the present application further provides a communication device of an active pen, the device including:
the pen nib detection device comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring a code representing pressure information and used for pen nib detection according to the pressure information when the pressure information is detected by a pressure sensor, and the code comprises n code bits;
the processing module is used for generating n coding signals corresponding to n coding bits according to different pressures applied to the pressure sensor;
and the sending module is used for sending the n coding signals to the touch screen according to the same frequency.
In addition, in order to achieve the above object, another aspect of the present application provides a terminal, where the terminal includes a memory, a processor, and a communication program of an active pen stored in the memory and running on the processor, and the processor implements the steps of the communication method of the active pen when executing the communication program of the active pen.
In addition, to achieve the above object, another aspect of the present application further provides a computer-readable storage medium having a communication program of an active pen stored thereon, where the communication program of the active pen, when executed by a processor, implements the steps of the communication method of the active pen as described above.
When the pressure sensor detects pressure information, the embodiment acquires the representation pressure information and a code for pen point detection according to the pressure information, wherein the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to the touch screen according to the same frequency. The pressure is expressed in a digital coding mode, and meanwhile, the coding signals are transmitted by adopting the same frequency, so that the same frequency interference is avoided in the transmission process, and the normal writing is ensured.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a first embodiment of a communication method of the active pen according to the present application;
FIG. 3 is a flowchart illustrating a second embodiment of a communication method of the active pen according to the present application;
FIG. 4 is a flowchart illustrating a third exemplary embodiment of a communication method of the active pen according to the present application;
FIG. 5 is a schematic flow chart illustrating a process of obtaining the pressure information and the code for pen tip detection according to the pressure information in the communication method of the active pen of the present application;
fig. 6 is a schematic operation flow diagram of a communication method of the active pen according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: when pressure information is detected through a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to a touch screen according to the same frequency.
When the existing active pen transmits pressure information, different frequencies are generally adopted to transmit different pressure information, so that the active pen is easily influenced by the environment when communicating with the touch screen to form same frequency interference, and the condition that the active pen writes broken lines or even cannot write on a flat plate occurs. When pressure information is detected through a pressure sensor, the representation pressure information and a code for pen point detection are obtained according to the pressure information, wherein the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to the touch screen according to the same frequency. The pressure is expressed in a digital coding mode, and meanwhile, the coding signals are transmitted by adopting the same frequency, so that the same frequency interference is avoided in the transmission process, and the normal writing is ensured.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, a remote controller, an audio circuit, a WiFi module, a detector, and the like. Of course, the terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a temperature sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein a communication program of an operating system, a network communication module, a user interface module, and an active pen.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke the communication program of the active pen in the memory 1005 and perform the following operations:
when pressure information is detected through a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits;
generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor;
and sending the n code printing signals to a touch screen according to the same frequency.
Referring to fig. 2, fig. 2 is a schematic flowchart of a communication method of an active pen according to a first embodiment of the present application.
While embodiments of the present application provide embodiments of a communication method for an active pen, it should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein.
The communication method of the active pen comprises the following steps:
step S10, when pressure information is detected by a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits;
in the embodiment of the present application, the active pen is also called a capacitive Stylus (Stylus), and works through a coupling capacitor between the front end of the pen core and a TP (touch panel), so the active pen is called a capacitive Stylus. After the pen core transmits a driving signal (the signal can comprise information such as writing pressure or functional keys on the active pen), the TP receives the driving signal transmitted by the active pen, calculates the coordinate of the active pen, analyzes the related information and displays the information on the display module. Further, the specific interaction process of the active pen and the touch screen is as follows: in a single newspaper period, the pen point can transmit once longer position information for TP to check the position of the pen point, the closer the channel is to the pen point, the stronger the received signal is, the coordinates of the pen point are calculated in the longitudinal direction and the transverse direction according to the specific gravity, and the handwriting is displayed. In a single report period, the pressure information and the key information are transmitted to the TP by a high-pressure signal emitted by a pen point, and both the pressure information and the key information adopt an ASK coding mode. The information of the pressure key is transmitted to the TP in a digital mode, and the TP can generate corresponding actions according to the received information, such as actions of controlling stroke thickness, erasing, selecting and the like.
In addition, the active pen is provided with a pressure sensor which is used for detecting the pressure generated by the active pen on the touch screen, so that the active pen can detect the change of the writing strength of a user, and the thickness of the handwriting of the touch screen can be changed according to the change of the writing strength. A certain number of transverse and longitudinal detection electrodes are distributed on the touch screen, a coding signal output by a pen point electrode of the active pen acts on a certain position of the touch screen, and the transverse detection electrode and the longitudinal detection electrode corresponding to the position generate corresponding detection signals, so that two-dimensional position coordinates of the active pen on the touch screen can be calculated according to the detection signals. When the active pen detects pressure information through the pressure sensor, acquiring the code representing the pressure information and the pen point detection of the user according to the pressure information; referring to fig. 5, the step of acquiring, according to the pressure information, a code representing the pressure information and a code used for pen tip detection includes:
step S11, the pressure information is coded by a set coding mode to obtain a pressure code;
and step S12, adding a coordinate code for pen point position detection into the pressure code to obtain the pressure information and the code for pen point detection.
When the active pen is in contact with the touch screen, the active pen can measure pressure information of a pen point at each moment through an internal pressure sensor, then the measured pressure information of the pen point is coded in a preset coding mode to obtain a pressure code, meanwhile, a coordinate code for detecting the position of the pen point is added into the pressure code, so that the representation pressure information and the code for detecting the position of the pen point can be obtained, the code comprises n coding bits, and n is an integer greater than 1; the pressure code and the coordinate code are coded in the same coding mode.
The pressure information and the key information are both in an ASK coding mode, and in addition, the active pen and the touch screen can also be appointed to adopt the following modes: the frequency coding of the Microsoft initiative pen protocol, the binary phase shift keying phase coding of the general stylus pen alliance protocol, the amplitude coding of other protocols and the like are used for coding and decoding the pressure information.
In one embodiment, the encoding is performed in a binary manner, and the active pen first performs binary conversion on the measured pressure information to obtain a binary code including n encoded bits, where the n encoded bits are also pressure encoded bits representing the pressure information. Therein, the tip pressure of an active pen is divided into 4096 levels, which need to be represented by 12 to 21 bits, for example: the first pressure level is represented by the values of bit0 through bit11, which may be one of level 0 through level 4095. When the detected pressure value is 0x 080 x19, binary conversion is performed on 0x 080 x19 to obtain 100000011001, and corresponding bits are shown in table 1:
TABLE 1
bit11 bit10 Bit9 Bit8 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 bit1 Bit0
1 0 0 0 0 0 0 1 1 0 0 1
For coordinate codes used for pen tip position detection, each coordinate code corresponding to a coordinate of a pen tip position, pressure-coded bits may be selected as the coordinate code at n pressure-coded bits, for example: any two pressure coding bits of the n pressure coding bits are used as coordinate codes, each coordinate code comprises two coordinate coding bits, namely the two pressure coding bits are multiplexed into the coordinate coding bit, the touch screen can solve a coordinate according to one coordinate code, and a decoding mode corresponding to the coding mode is preset in the touch screen. After the pressure coding bits corresponding to all the coordinate codes are set, a binary code comprising n coding bits is obtained, namely the binary code for representing the pressure information and detecting the pen point position. The coordinate code is only a code signal output by the active pen, the active pen does not calculate the coordinate, the active pen outputs a voltage signal with a fixed magnitude to the touch screen through a coupling capacitor between the active pen and the touch screen, and the touch screen calculates the coordinate of the active pen according to the coordinate code of the active pen.
Further, it is also necessary to set a check coding bit in the n coding bits and set a coding value corresponding to the check coding bit, in an embodiment, the last coding bit in the n coding bits in the coding is set as the check coding bit, and the coding value of the check coding bit is a check value of the coding values of the first n-1 coding bits, where the calculation algorithm of the check value may be odd check, even check, cumulative sum, and the like. For example: taking the tenth coded bit of the binary coding as a check coded bit, and then, the coded value of the check coded bit is bit0-bit 8; or the fourth coded bit of the binary code is used as the check coded bit, and the coded value of the check coded bit is bit0-bit 2.
Step S20, generating n coding signals corresponding to n coding bits according to different pressures applied to the pressure sensor;
in the embodiment of the application, when the active pen communicates with the touch screen, the pressure is sent in a digital code form, so that different pressures correspond to different codes. In addition, the coding signal sent by the pen point of the active pen can be square wave, sine wave or triangular wave, and the coding signal corresponding to each coding bit is set according to the preset coding signal type, so that the coding signal corresponding to each coding bit in the code can be obtained, namely n coding signals corresponding to the code and arranged in sequence can be obtained. The coding signal, which may also be referred to as a driving signal, an excitation signal, or the like, is an electrical signal emitted by a tip electrode of the active pen for determining the position of the tip of the active pen.
And step S30, sending the n code printing signals to a touch screen according to the same frequency.
In the prior art, different coding signals are sent by different frequencies, that is, different pressures are sent by different frequencies, and such a transmission mode is easily subjected to same frequency interference, which causes abnormal writing.
In the embodiment of the application, the n code signals are sent to the touch screen according to the same frequency, wherein the lead code and the pressure are transmitted by adopting a fixed high frequency, such as 600 KHz. In one embodiment, the active pen periodically sends the code signal to the touch screen at the same frequency, for example, in a period n-1, a period n, or a period n +1, the active pen sends the code signal to the touch screen at the same frequency for a set period of time and is idle for the remaining time of the period, and the touch screen samples the code signal based on the same period. Specifically, if the coding period is 8ms, the active pen outputs 2.1ms of synchronous coding first, if data coding exists, 8 coding bits are output, the synchronous coding signal is coupled to the touch screen through capacitance between a pen point electrode of the active pen and a detection electrode of the touch screen, the touch screen demodulates and restores pen point pressure information carried in the coding signal according to a signal coding format agreed by a protocol, and finally the information is reported to an operating system to execute related operations. For example: when the pressure code demodulated by the touch screen based on the code printing signal is 0101, acquiring a pressure level corresponding to the code 0101, wherein the pressure level is one of levels 0 to 4095, then determining a position coordinate of the active pen, such as coordinates (a, B), and displaying the handwriting of the active pen on the coordinates (a, B) according to the pressure level corresponding to the pressure code 0101. The synchronous coding means that the period of the code printing signal detected by the touch screen is aligned with the period of the code printing signal emitted by the active pen in time sequence, and the signal detection window of the touch screen is consistent with the code printing window of the active pen in time sequence, so that the synchronization between the touch screen and the active pen is realized.
It should be noted that the coding timing error needs to be within a specified range, otherwise, a key press or a pressure decoding error occurs, and even the line is broken.
When the pressure sensor detects pressure information, the embodiment acquires the representation pressure information and a code for pen point detection according to the pressure information, wherein the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to the touch screen according to the same frequency. The pressure is expressed in a digital coding mode, and meanwhile, the coding signals are transmitted by adopting the same frequency, so that the same frequency interference is avoided in the transmission process, and the normal writing is ensured.
Further, referring to fig. 3, a second embodiment of the communication method of the active pen of the present application is proposed.
The second embodiment of the communication method of the active pen differs from the first embodiment of the communication method of the active pen in that the step of obtaining the pressure information and the code for pen tip detection from the pressure information when the pressure information is detected by the pressure sensor comprises:
step S13, when key information is detected, key coding bits of coding numerical values corresponding to the key information are obtained, wherein different key information corresponds to key coding bits of different coding numerical values;
and step S14, sending the code printing signal corresponding to the key code bit to the touch screen.
At least one function key is arranged in the active pen, when a user presses a key, the active pen can receive corresponding key information, the key information is further encoded by adopting an ASK encoding mode, and the key information of different function keys is respectively set to correspond to key encoding bits of different encoding numerical values, for example: when the active pen is provided with two function keys, namely a key 1 and a key 2, when the key 1 is pressed down, the key information of the key 1 corresponds to a key coding bit with a coding numerical value of 1, and at the moment, the key coding bit is transmitted to a touch screen at a fixed high frequency corresponding to a coding signal; when the key 2 is pressed down, the key information of the key 2 corresponds to the key coding bit with the coding numerical value of 2, and at the moment, the key coding bit is also transmitted to a touch screen at a fixed high frequency correspondingly to a coding signal; when the key 1 and the key 2 are pressed simultaneously, the key information of the key 1 and the key 2 corresponds to the key coding bit with the coding numerical value of 3, and at the moment, the key coding bit is also transmitted to the touch screen at a fixed high frequency to correspond to the code printing signal. When the touch screen receives the code printing signal corresponding to the key information, the code printing signal is decoded to obtain corresponding instruction information, and control actions in the instruction information, such as deletion, selection and the like, are executed.
In this embodiment, when the key information is detected, the key coding bit of the coding value corresponding to the key information is obtained, and the coding signal corresponding to the key coding bit is sent to the touch screen at a fixed high frequency, so that co-frequency interference is avoided, and normal communication is ensured.
Further, referring to fig. 4, a third embodiment of the communication method of the active pen of the present application is provided.
The third embodiment of the communication method of the active pen differs from the first and second embodiments of the communication method of the active pen in that the step of obtaining the code characterizing the pressure information and the pen tip detection from the pressure information when the pressure information is detected by the pressure sensor comprises:
step S15, receiving a synchronous signal sent by the touch screen, and responding to the synchronous signal;
step S16, after the synchronous signal is finished, timing is started to obtain timing duration, and whether the timing duration reaches the delay time is judged;
and step S17, if the timing duration reaches the delay time, executing the step of acquiring the pressure information and the code for nib detection according to the pressure information when the pressure information is detected by the pressure sensor.
The method comprises the steps that a touch screen periodically sends a synchronous signal, after the synchronous signal is sent, detection of a code printing signal is started to an active pen after a preset delay time, and after the code printing signal sent by the active pen is detected, the active pen is judged to be close to the active pen, so that handshake communication with the active pen is realized; the active pen detects a synchronous signal before sending a coding signal, when the synchronous signal sent by the touch screen is detected, the synchronous signal is analyzed, the time of finishing the synchronous signal is obtained from the characteristics of the synchronous signal, timing is started after the synchronous signal is finished, whether the timing duration reaches the preset delay time or not is judged, and if the timing duration reaches the delay time, the coding signal is sent. And after the touch screen sends the synchronizing signal, detecting the code printing signal after the preset delay time, so as to realize the synchronization of the active pen and the touch screen, wherein if the timing duration does not reach the delay time, the timing is continued.
Further, before the active pen prints the code, it needs to detect whether pressure information or key information is received, if the pressure information or the key information is detected, a code printing signal is sent to the touch screen, and if the pressure information or the key information is not detected, a synchronization signal is sent to the touch screen, and the delay time in the synchronization signal is obtained. After receiving a synchronous signal sent by the active pen, the touch screen synchronously demodulates a lead code of the active pen signal, judges whether each coding time and frame width meet requirements or not, and if so, performs handshake communication with the active pen and further receives a coding signal sent by the active pen.
Optionally, since the synchronization signal is composed of a plurality of pulses, the power consumption of the signal transmitting circuit of the active pen when there is a pulse output is much greater than the power consumption when there is no pulse output, and therefore, in order to save energy consumption, when no pressure information or key information is detected, the active pen can automatically enter a power saving state and wait for the next detection time.
In the embodiment of the application, when a synchronous signal sent by a touch screen is received, the synchronous information number is responded, corresponding delay time is obtained, when the timing duration reaches the delay time, a code printing signal is sent to the touch screen, and otherwise, timing is continued; in addition, when the pressure information or the key information is not detected, a synchronous signal is sent to the touch screen, and the touch screen enters a power-saving state, so that the energy consumption is saved.
To better explain the scheme of the embodiment of the present application, the operation flow of the communication method of the active pen is as follows:
referring to fig. 6, before sending the code signal to the touch screen, the active pen first detects whether pressure information or key information is received, and when the pressure information or the key information is not detected, the active pen sends a synchronization signal to the touch screen and obtains a delay time in the synchronization signal. After receiving a synchronous signal sent by the active pen, the touch screen synchronously demodulates a lead code of the active pen signal, judges whether each encoding time and frame width meet requirements or not, and if so, performs handshake communication with the active pen. And further detecting whether the key information is received by the active pen, if the key information is received, judging the key clicked by the user, such as an upper key, a lower key or a simultaneous upper and lower key, coding the key information, acquiring a key coding bit, and transmitting the key coding into a corresponding coding signal to the touch screen. If the received information is not key information but pressure information, the measured pressure information of the pen point is coded by adopting a preset coding mode to obtain pressure codes, meanwhile, coordinate codes used for pen point position detection are added into the pressure codes, so that the representation pressure information and the codes used for pen point position detection can be obtained, the codes comprise n coding bits, and n is an integer greater than 1; according to different pressures borne by the pressure sensor, n code printing signals corresponding to the n code bits are generated, and the n code printing signals are sent to the touch screen according to the same frequency.
In the embodiment, the active pen expresses the pressure in a digital coding mode, and simultaneously transmits the coding signal to the touch screen by adopting the same frequency, so that the active pen is not interfered by the same frequency in the transmission process, and the writing is ensured to be normally carried out.
The present application further provides a communication device of an active pen, in an embodiment, the communication device of the active pen includes a memory, a processor, and a communication program of the active pen stored in the memory and executable on the processor, and when executed by the processor, the communication program of the active pen implements the following steps:
when pressure information is detected through a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits;
generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor;
and sending the n code printing signals to a touch screen according to the same frequency.
In one embodiment, the communication device of the active pen comprises an acquisition module, a processing module and a sending module.
The pen nib detection device comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring a code representing pressure information and used for pen nib detection according to the pressure information when the pressure information is detected by a pressure sensor, and the code comprises n code bits;
the processing module is used for generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor;
and the sending module is used for sending the n coding signals to the touch screen according to the same frequency.
Further, the obtaining module comprises an encoding unit;
the coding unit is used for coding the pressure information by a set coding mode to obtain a pressure code;
and the coding unit is also used for adding a coordinate code for pen point position detection in the pressure code to obtain the code representing the pressure information and the code for pen point detection.
Further, the acquiring module further comprises an acquiring unit and a sending unit:
the acquiring unit is used for acquiring key coding bits of coding numerical values corresponding to the key information when the key information is detected, wherein different key information corresponds to the key coding bits of different coding numerical values;
and the sending unit is used for sending the code printing signal corresponding to the key coding bit to the touch screen.
Further, the acquiring module further comprises a receiving unit and a judging unit:
the receiving unit is used for receiving the synchronous signal sent by the touch screen and responding to the synchronous signal;
the judging unit is used for starting timing to obtain timing time length after the synchronous signal is ended and judging whether the timing time length reaches delay time or not;
and the judging unit is further used for executing the step of acquiring the pressure information and the code for nib detection according to the pressure information when the pressure information is detected by the pressure sensor if the timing duration reaches the delay time.
Further, the sending unit is further configured to send a synchronization signal to the touch screen when the pressure information or the key information is not detected;
the obtaining unit is further configured to obtain the delay time in the synchronization signal.
Further, the processing module comprises an acquisition unit and a processing unit:
the acquisition unit is used for acquiring the pressure value borne by the pressure sensor and a set code printing signal type, wherein code printing information corresponding to each coding bit is preset in the code printing signal type;
and the processing unit is used for generating n coding signals corresponding to n coding bits according to the pressure value and the coding signal type.
Further, the processing module further comprises a setting unit;
the setting unit is used for setting a check coding bit in the n coding bits and setting a coding value corresponding to the check coding bit.
The implementation of the functions of each module of the communication device of the active pen is similar to the process in the above method embodiment, and is not repeated here.
In addition, the application also provides a terminal, which comprises a memory, a processor and a communication program of the active pen, wherein the communication program is stored on the memory and runs on the processor, and when the terminal detects pressure information through the pressure sensor, the terminal acquires the representation pressure information and a code for pen point detection according to the pressure information, and the code comprises n code bits; generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor; and sending the n code printing signals to the touch screen according to the same frequency. The pressure is expressed in a digital coding mode, and meanwhile, the coding signals are transmitted by adopting the same frequency, so that the same frequency interference is avoided in the transmission process, and the normal writing is ensured.
Furthermore, the present application also provides a computer-readable storage medium, on which a communication program of an active pen is stored, which when executed by a processor implements the steps of the communication method of the active pen as described above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of communicating with an active pen, the method comprising:
when pressure information is detected through a pressure sensor, acquiring a code representing the pressure information and used for pen point detection according to the pressure information, wherein the code comprises n code bits;
generating n coding signals corresponding to the n coding bits according to different pressures applied to the pressure sensor;
and sending the n code printing signals to a touch screen according to the same frequency.
2. The communication method of an active pen according to claim 1, wherein the step of obtaining the pressure information and the code for pen tip detection from the pressure information comprises:
coding the pressure information through a set coding mode to obtain a pressure code;
and adding a coordinate code for detecting the position of the pen point into the pressure code to obtain the pressure information and the code for detecting the pen point.
3. The communication method of an active pen according to claim 1, wherein the step of acquiring the pressure information and the code for pen tip detection from the pressure information when the pressure information is detected by the pressure sensor, is followed by:
when key information is detected, key coding bits of coding numerical values corresponding to the key information are obtained, wherein different key information corresponds to the key coding bits of different coding numerical values;
and sending the code printing signal corresponding to the key coding bit to the touch screen.
4. The communication method of an active pen according to claim 3, wherein the step of obtaining the code characterizing the pressure information and the pen tip detection from the pressure information when the pressure information is detected by the pressure sensor is preceded by the step of:
receiving a synchronous signal sent by the touch screen, and responding to the synchronous signal;
after the synchronous signal is finished, timing is started to obtain timing time, and whether the timing time reaches delay time or not is judged;
and if the timing duration reaches the delay time, executing a step of acquiring the pressure information and a code for pen point detection according to the pressure information when the pressure information is detected by a pressure sensor.
5. The communication method of an active pen according to claim 4, wherein the step of obtaining the pressure information and the code for pen tip detection from the pressure information when the pressure information is detected by the pressure sensor further comprises:
when the pressure information or the key information is not detected, sending a synchronous signal to the touch screen;
and acquiring the delay time in the synchronous signal.
6. The active pen communication method according to any one of claims 1 to 3, wherein the step of generating n coded signals corresponding to n coded bits according to different pressures applied to the pressure sensor comprises:
acquiring a pressure value borne by the pressure sensor and a set code printing signal type, wherein code printing information corresponding to each coding bit is preset in the code printing signal type;
and generating n coding signals corresponding to the n coding bits according to the pressure value and the coding signal type.
7. The active pen communication method according to any one of claims 1 to 3, wherein after the step of generating n coded signals corresponding to n coded bits according to different pressures applied to the pressure sensor, the method further comprises:
and setting a check coding bit in the n coding bits, and setting a coding value corresponding to the check coding bit.
8. A communication device for an active pen, the device comprising:
the pen nib detection device comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring a code representing pressure information and used for pen nib detection according to the pressure information when the pressure information is detected by a pressure sensor, and the code comprises n code bits;
the processing module is used for generating n coding signals corresponding to n coding bits according to different pressures applied to the pressure sensor;
and the sending module is used for sending the n coding signals to the touch screen according to the same frequency.
9. A terminal, characterized in that the terminal comprises a memory, a processor and a communication program of an active pen stored on the memory and running on the processor, the processor implementing the steps of the communication method of the active pen according to any one of claims 1 to 7 when executing the communication program of the active pen.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a communication program of an active pen, which when executed by a processor implements the steps of the communication method of the active pen according to any one of claims 1 to 7.
CN202110188402.9A 2021-02-19 2021-02-19 Communication method and device of active pen, terminal and storage medium Pending CN112558798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110188402.9A CN112558798A (en) 2021-02-19 2021-02-19 Communication method and device of active pen, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110188402.9A CN112558798A (en) 2021-02-19 2021-02-19 Communication method and device of active pen, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112558798A true CN112558798A (en) 2021-03-26

Family

ID=75034345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110188402.9A Pending CN112558798A (en) 2021-02-19 2021-02-19 Communication method and device of active pen, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112558798A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112987976A (en) * 2021-04-13 2021-06-18 深圳市千分一智能技术有限公司 Touch pen, handwriting display method and device thereof, and terminal equipment
CN113110763A (en) * 2021-04-26 2021-07-13 北京集创北方科技股份有限公司 Touch detection method and device, chip and electronic equipment
CN114661189A (en) * 2022-02-15 2022-06-24 深圳市千分一智能技术有限公司 Coding method and system of capacitance pen, capacitance pen and storage medium
CN114885371A (en) * 2022-05-06 2022-08-09 珈伟新能源股份有限公司 Wireless communication method, system, device and storage medium
CN115525175A (en) * 2022-04-01 2022-12-27 荣耀终端有限公司 Data transmission method, stylus and storage medium
WO2023020022A1 (en) * 2021-08-19 2023-02-23 荣耀终端有限公司 Stylus connection method and electronic device
WO2023134408A1 (en) * 2022-01-11 2023-07-20 荣耀终端有限公司 Information transmission method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140077827A1 (en) * 2007-07-03 2014-03-20 Cypress Semiconductor Corporation Method for improving scan time and sensitivity in touch sensitive user interface device
CN106293220A (en) * 2016-08-04 2017-01-04 京东方科技集团股份有限公司 A kind of touch screen, actively pen, actively style of writing Ore-controlling Role and drive method thereof
CN107969152A (en) * 2016-08-26 2018-04-27 深圳市汇顶科技股份有限公司 Signal transmitting method, signal resolution method, active pen and touch screen
CN110832447A (en) * 2019-09-30 2020-02-21 深圳市汇顶科技股份有限公司 Signal transmitting and receiving method, processor chip, active pen and touch screen
CN110959150A (en) * 2019-09-30 2020-04-03 深圳市汇顶科技股份有限公司 Signal transmitting and receiving method, processor chip, active pen and touch screen

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140077827A1 (en) * 2007-07-03 2014-03-20 Cypress Semiconductor Corporation Method for improving scan time and sensitivity in touch sensitive user interface device
CN106293220A (en) * 2016-08-04 2017-01-04 京东方科技集团股份有限公司 A kind of touch screen, actively pen, actively style of writing Ore-controlling Role and drive method thereof
CN107969152A (en) * 2016-08-26 2018-04-27 深圳市汇顶科技股份有限公司 Signal transmitting method, signal resolution method, active pen and touch screen
CN110832447A (en) * 2019-09-30 2020-02-21 深圳市汇顶科技股份有限公司 Signal transmitting and receiving method, processor chip, active pen and touch screen
CN110959150A (en) * 2019-09-30 2020-04-03 深圳市汇顶科技股份有限公司 Signal transmitting and receiving method, processor chip, active pen and touch screen

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112987976A (en) * 2021-04-13 2021-06-18 深圳市千分一智能技术有限公司 Touch pen, handwriting display method and device thereof, and terminal equipment
CN112987976B (en) * 2021-04-13 2023-02-03 深圳市千分一智能技术有限公司 Touch pen, handwriting display method and device thereof, and terminal equipment
CN113110763A (en) * 2021-04-26 2021-07-13 北京集创北方科技股份有限公司 Touch detection method and device, chip and electronic equipment
WO2023020022A1 (en) * 2021-08-19 2023-02-23 荣耀终端有限公司 Stylus connection method and electronic device
WO2023134408A1 (en) * 2022-01-11 2023-07-20 荣耀终端有限公司 Information transmission method and apparatus
CN114661189A (en) * 2022-02-15 2022-06-24 深圳市千分一智能技术有限公司 Coding method and system of capacitance pen, capacitance pen and storage medium
CN114661189B (en) * 2022-02-15 2024-06-07 深圳市千分一智能技术有限公司 Coding method and system of capacitance pen, capacitance pen and storage medium
CN115525175A (en) * 2022-04-01 2022-12-27 荣耀终端有限公司 Data transmission method, stylus and storage medium
CN115525175B (en) * 2022-04-01 2023-10-20 荣耀终端有限公司 Data transmission method, touch pen and storage medium
CN114885371A (en) * 2022-05-06 2022-08-09 珈伟新能源股份有限公司 Wireless communication method, system, device and storage medium

Similar Documents

Publication Publication Date Title
CN112558798A (en) Communication method and device of active pen, terminal and storage medium
US11307703B2 (en) Method for transmitting and receiving signal, processor chip, active stylus and touch screen
CN111290665B (en) Pressure detection method and device, active pen, touch chip and electronic equipment
CN108235746B (en) Signal transmitting method, active pen, signal receiving method and touch screen
WO2018035843A1 (en) Signal transmitting method, signal parsing method, active pen and touch screen
CN109074200B (en) Touch control chip, capacitive touch screen, capacitive active pen and bidirectional communication method of capacitive touch screen and capacitive active pen
CN110851006B (en) Touch pen mode switching method, device and equipment and readable storage medium
CN102902383A (en) Stylus and signal transmission method thereof as well as touch controller and signal detection method thereof
CN109286968B (en) Blind detection parameter acquisition method, related equipment and system
EP3637231B1 (en) Signal transmitting method, signal receiving method and device
CN110959150B (en) Signal transmitting and receiving method, processor chip, active pen and touch screen
CN112000248B (en) Noise detection method, active pen and screen
WO2018049636A1 (en) Signal generation method, signal parsing method, active pen and touch screen
US20220043553A1 (en) Signal driving method, signal driving apparatus, stylus and signal driving system
US10503318B2 (en) Touch sensitive processing apparatus and system for despreading and method thereof
CN112558796A (en) Electronic pen, control method and device thereof, and computer-readable storage medium
CN115712357A (en) Wireless communication method, active pen and touch screen
CN104516596A (en) Method and system for touch control device to communicate with outside device
CN112987976B (en) Touch pen, handwriting display method and device thereof, and terminal equipment
CN105468211A (en) Data transmission method, system and device between capacitive stylus and touch screen
US11614812B2 (en) Method and apparatus for pressure detection, active pen, touch control chip, and electronic device
CN112558797B (en) Active pen, control method and device thereof, and computer-readable storage medium
TWI667596B (en) Active stylus and wireless signal generating method thereof
CN112306263A (en) Active stylus and wireless signal generation method thereof
CN111290666B (en) Signal detection method and device and touch chip

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210326

RJ01 Rejection of invention patent application after publication