Clock compensation method applied to externally-hung touch chip

文档序号:1903989 发布日期:2021-11-30 浏览:15次 中文

阅读说明:本技术 一种应用于外挂式触控芯片的时钟补偿方法 (Clock compensation method applied to externally-hung touch chip ) 是由 王红旗 李成 于 2021-09-06 设计创作,主要内容包括:本发明公开了一种应用于外挂式触控芯片的时钟补偿方法,将外挂式触控芯片的信号输入引脚连接显示芯片的信号输出端;外挂式触控芯片通过引脚接收显示芯片送出的VSYNC信号;一个VSYNC信号周期内的RC时钟频率是一定的,如果RC时钟频率发生改变则代表时钟发生了偏移;根据RC时钟发生的偏移来计算RC时钟的trim值,并改变RC时钟的频率。本发明使用VSYNC信号完成RC时钟的校准,VSYNC信号不受温度的影响,不需要外部的device,在面积和功耗上都有一定的优化。(The invention discloses a clock compensation method applied to an externally hung touch chip, which is characterized in that a signal input pin of the externally hung touch chip is connected with a signal output end of a display chip; the external touch control chip receives a VSYNC signal sent by the display chip through a pin; the RC clock frequency in one VSYNC signal period is constant, and if the RC clock frequency changes, the clock is deviated; and calculating a trim value of the RC clock according to the deviation of the RC clock, and changing the frequency of the RC clock. The invention uses the VSYNC signal to finish the calibration of the RC clock, the VSYNC signal is not influenced by the temperature, the external device is not needed, and the area and the power consumption are optimized to a certain extent.)

1. A clock compensation method applied to an external touch chip is characterized in that: the method specifically comprises the following steps:

(1) connecting a signal input pin of the externally-hung touch chip with a signal output end of the display chip;

(2) the external touch control chip receives a VSYNC signal sent by the display chip through a pin;

(3) the RC clock frequency in one VSYNC signal period is constant, and if the RC clock frequency changes, the clock is deviated; and calculating a trim value of the RC clock according to the deviation of the RC clock, and changing the frequency of the RC clock.

2. The clock compensation method for the on-hook touch chip according to claim 1, wherein: the specific content of the step (3) is as follows: counting the RC clock between the rising edges of the two VSYNC signals, calculating the difference value between the counting value and the expected value, judging whether the trim value needs to be updated or not, calculating the error range of the difference value between the counting value and the expected value if the trim value needs to be updated, calculating the size of the trim value needing to be updated according to the calculation result, and configuring the trim value to an analog circuit to change the frequency of the RC clock.

3. The clock compensation method for the on-hook touch chip as claimed in claim 2, wherein: when one VSYNC cycle ends and the next VSYNC cycle begins, all the calculation parameters are initialized and the calculation is restarted.

Technical Field

The invention relates to the technical field of chip clock calibration, in particular to a clock compensation method applied to an external touch chip.

Background

With the increasing demand of the electronic products such as mobile phones and tablet computers for the frame rate of display, the demand of the out of cell TP for the reporting rate is also increasing, and the reporting rate needs high-frequency and high-precision clock support. The high frequency is to process the scan control and algorithm process inside the digital circuit more quickly, and the high precision is because the frequency of the TP scan is controlled by dividing the RC clock, so if the RC clock is not accurate, the frequency of the TP scan is deviated from the expected frequency, which affects the operation performance.

The traditional clock that RC produced, there is a defect that the resistance value of resistance can change along with the temperature change, leads to the frequency of clock to change, takes place the temperature drift promptly, therefore the problem that this patent will be solved is when taking place the temperature drift, with the help of the mode that outer hanging touch-control chip can obtain the VSYNC that the display chip provided through the pin, utilize this accurate frequency that is not influenced by the temperature of VSYNC signal to change the clock trim value of TP chip RC oscillator, make its frequency more close with anticipated frequency, improve the influence of temperature drift to RC oscillator.

The principle of the oscillating circuit is self-oscillation of the circuit, and a circuit network amplifies noise of a specific frequency through feedback. The RC oscillator adopts an RC network as a frequency-selecting phase-shifting network. Because the frequency is determined by the circuit network, clocks with various frequencies can be generated, but the resistance of the RC oscillator changes along with the change of the temperature, so that the frequency drift of the RC clock is caused. If the resistance value of the resistor is set in an adjustable manner inside the RC oscillator, and if the frequency is detected to be out of expectation, the resistance value of the trim is detected, and the frequency generated by the RC oscillator returns to the expected value again.

The existing implementation scheme is to generate a clock by a crystal clock source and transmit the clock to the inside of a digital circuit through a PLL circuit to calibrate the RC clock. The Crystal clock source is a frequency-stable clock source, and is generally expressed by Crystal. The active crystal oscillator has 4 pins, wherein in addition to quartz crystal, the active crystal oscillator also has a transistor and a resistance-capacitance element, so the active crystal oscillator has larger volume. The active crystal oscillator is a complete oscillator, and a clock circuit is arranged in the active crystal oscillator, and the clock circuit can generate a clock signal only by supplying power. Because the frequency of the crystal oscillator clock source is stable, the relation between the crystal oscillator clock source and the RC clock is expected to be stable, if the crystal oscillator clock source is unstable, the RC clock is proved to have offset, a corresponding trim value is calculated according to the unstable difference, and the RC clock is calibrated to enable the RC clock to recover to the expected frequency.

The use of the active crystal oscillator has the disadvantages that the device for generating the crystal oscillator clock needs to be added outside the chip, and the active crystal oscillator has larger power consumption when being started, so the use of the mode has larger defects in area and power consumption, otherwise, the use of the VSYNC signal does not need the external device, and the area and the power consumption are optimized to a certain extent, so the RC clock is calibrated by the VSYNC signal.

Disclosure of Invention

The invention aims to make up for the defects of the prior art and provides a clock compensation method applied to an external touch chip.

The invention is realized by the following technical scheme:

a clock compensation method applied to an external touch chip specifically comprises the following steps:

(1) connecting a signal input pin of the externally-hung touch chip with a signal output end of the display chip;

(2) the external touch control chip receives a VSYNC signal sent by the display chip through a pin;

(3) the RC clock frequency in one VSYNC signal period is constant, and if the RC clock frequency changes, the clock is deviated; and calculating a trim value of the RC clock according to the deviation of the RC clock, and changing the frequency of the RC clock.

The specific content of the step (3) is as follows: counting the RC clock between the rising edges of the two VSYNC signals, calculating the difference value between the counting value and the expected value, judging whether the trim value needs to be updated or not, calculating the error range of the difference value between the counting value and the expected value if the trim value needs to be updated, calculating the size of the trim value needing to be updated according to the calculation result, and configuring the trim value to an analog circuit to change the frequency of the RC clock.

When one VSYNC cycle ends and the next VSYNC cycle begins, all the calculation parameters are initialized and the calculation is restarted.

The invention has the advantages that: the invention uses the VSYNC signal to finish the calibration of the RC clock, the VSYNC signal is not influenced by the temperature, the external device is not needed, and the area and the power consumption are optimized to a certain extent.

Drawings

FIG. 1 is a flow chart of the invention for calculating a trim value.

Detailed Description

When the external touch chip works, the position of the VSYNC signal of the display module generates larger interference, so the touch chip receives the VSYNC signal sent by the display chip through a pin and is used as a synchronous mark to avoid the position sent by the VSYNC for TP scanning, and the VSYNC signal is a signal with stable frequency and no influence of temperature, so the RC clock of the TP chip can be calibrated by the signal, theoretically, the RC clock frequency in one VSYNC period is constant, and when the change occurs, the clock is deviated, a trim value is calculated according to the change, and the trim value of the clock is changed and transmitted to a corresponding circuit module, so that the frequency of the trim value is the expected standard frequency.

The invention adds a module for automatically calibrating a clock according to a VSYNC signal in a digital circuit, needs to be able to modify a trim value of an analog RC clock source in the working process of a chip, dynamically calibrates the clock to keep the clock in a stable state basically, the most important part is to obtain the trim value according to the number of calibrated clocks counted by the VSYNC signal, and supposing that the frequency of the VSYNC signal is 60HZ and the frequency of the calibrated clock is 96MHZ, the approximate calculation flow is shown in FIG. 1. Counting the RC clock between the rising edges of the two VSYNC signals, calculating the difference value between the counting value and the expected value, judging whether the trim value needs to be updated or not, calculating the error range of the difference value between the counting value and the expected value if the trim value needs to be updated, calculating the size of the trim value needing to be updated according to the calculation result, and configuring the trim value to an analog circuit to change the frequency of the RC clock.

The comp _ trim obtained by the calculation is a trim value which is automatically adjusted by hardware through calculation, and is configured in the analog RC circuit to change the frequency of the RC clock.

Description on the above calculation procedure:

1. the above process is only a calculation process within one VSYNC period, and when one VSYNC period ends and the next VSYNC period starts, all calculation parameters are initialized and the calculation is restarted.

2. The clock frequency of a general out of cell TP chip is much faster than the frequency of VSYNC, and as mentioned above, assuming that the frequency of VSYNC is 60HZ and the RC frequency of a TP chip is 96MHZ, there should be 96000000/60=1600000 (160 ten thousand) 96MHZ clock cycles in a VSYNC signal, and we are within a certain accuracy range when adjusting 96M clock, and assuming that the accuracy is 0.15%, it is reasonable to consider that within one VSYNC cycle, the error range of 1600000 × 0.15% =2400, that is, the error range of 1597600 — 1602400.

3. If the RC clock is affected by temperature and has a large deviation, which is expected to be 96MHZ, but actually has only 94MHZ, according to the assumed value in description 1, the RC clock is counted to 1566667 in a VSYNC, and the difference between the RC clock and the expected RC clock is 33333, and the difference is 33333/2400 ≈ 14 precision, for the case of large error, if a one-step implementation mode is adopted, the 94MHZ clock is directly calibrated to 96MHZ, so that the chip operation is unstable. Therefore, a buffer module capable of supporting configuration is arranged in the middle, the buffer module is divided into 6 levels, each level is 1 precision, and the number of levels to be adjusted is determined according to actual configuration.

Interpretation of terms

IC-integrated circuit;

TP-touch Screen;

out of cell-add-drop;

VSYNC — field sync;

trim-adjust OSC frequency;

comp-compensation abbreviation, compensation;

RC-RC oscillating circuit;

PLL-phase locked loop;

Crystal-Crystal oscillator.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种多路CPU系统中时钟同步控制装置、系统及控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!