TWI837951B - Clock calibration method of touch chip, touch chip and touch display device - Google Patents
Clock calibration method of touch chip, touch chip and touch display device Download PDFInfo
- Publication number
- TWI837951B TWI837951B TW111143829A TW111143829A TWI837951B TW I837951 B TWI837951 B TW I837951B TW 111143829 A TW111143829 A TW 111143829A TW 111143829 A TW111143829 A TW 111143829A TW I837951 B TWI837951 B TW I837951B
- Authority
- TW
- Taiwan
- Prior art keywords
- clock
- frequency
- touch chip
- value
- threshold value
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/04166—Details of scanning methods, e.g. sampling time, grouping of sub areas or time sharing with display driving
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
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)
- Electronic Switches (AREA)
- Electric Clocks (AREA)
Abstract
Description
本發明涉及觸控領域,特別是涉及一種觸控晶片的時鐘校準方法、觸控晶片及觸控顯示裝置。 The present invention relates to the field of touch control, and in particular to a clock calibration method for a touch chip, a touch chip, and a touch display device.
目前,智慧手機、平板電腦和車載電器等觸控顯示裝置,觸控功能整合在顯示螢幕內,或觸控螢幕和顯示螢幕配合工作,觸控晶片會按照一定的頻率掃描螢幕以獲取觸控信號。但顯示螢幕刷屏會對觸控功能造成輻射,對觸控效果會產生干擾。顯示螢幕的刷屏週期由垂直同步(Vertical Synchronization,Vsync)的頻率決定。所以觸控功能要和顯示螢幕配合得更好,就需要獲取到準確的垂直同步,並根據垂直同步的變化,實現自我調整幀率。並且將垂直同步作為觸控晶片的參考時鐘源,成為觸控晶片校準時鐘的標準。 At present, touch display devices such as smartphones, tablet computers and car appliances have the touch function integrated into the display screen, or the touch screen and display screen work together. The touch chip will scan the screen at a certain frequency to obtain the touch signal. However, refreshing the display screen will cause radiation to the touch function and interfere with the touch effect. The refresh cycle of the display screen is determined by the frequency of vertical synchronization (Vertical Synchronization, Vsync). Therefore, in order for the touch function to work better with the display screen, it is necessary to obtain accurate vertical synchronization and realize self-adjustment of the frame rate according to the changes in vertical synchronization. And vertical synchronization is used as the reference clock source of the touch chip, becoming the standard for calibrating the clock of the touch chip.
目前的觸控晶片存在的缺陷是觸控晶片不具備硬體對時鐘的自動檢測及校準功能,只能通過軟體實現,在遇到時鐘頻偏校大的情況時,校準程式複雜、校準速度慢且校準精度低。 The defect of current touch control chips is that they do not have the hardware automatic detection and calibration function of the clock, and can only be realized through software. When the clock frequency deviation is large, the calibration procedure is complicated, the calibration speed is slow and the calibration accuracy is low.
本發明的目的是提供一種觸控晶片的時鐘校準方法、觸控 晶片及觸控顯示裝置,能夠通過計數器和寄存器以硬體的形式實現對時鐘的自動檢測和校準,校準方式簡單,校準精度高。 The purpose of the present invention is to provide a touch chip clock calibration method, touch chip and touch display device, which can realize automatic detection and calibration of the clock in the form of hardware through a counter and a register, and the calibration method is simple and the calibration accuracy is high.
為解決上述技術問題,本發明提供了一種觸控晶片的時鐘校準方法,觸控晶片包括計數器和寄存器;觸控晶片的時鐘校準方法包括如下步驟: In order to solve the above technical problems, the present invention provides a clock calibration method for a touch chip, wherein the touch chip includes a counter and a register; the clock calibration method for the touch chip includes the following steps:
第一步驟S1:獲取與觸控晶片連接的顯示螢幕的當前幀同步信號頻率,當前幀同步信號頻率對應的時鐘週期為頻率週期,將頻率週期作為觸控晶片的參考時鐘週期。 The first step S1: obtain the current frame synchronization signal frequency of the display screen connected to the touch chip. The clock cycle corresponding to the current frame synchronization signal frequency is the frequency cycle, and the frequency cycle is used as the reference clock cycle of the touch chip.
第二步驟S2:通過計數器計算觸控晶片在參考時鐘週期內的實際時鐘個數。
第三步驟S3:比較實際時鐘個數和與頻率週期對應的理論時鐘個數,得到第一時鐘偏差值。 The third step S3: Compare the actual number of clocks with the theoretical number of clocks corresponding to the frequency cycle to obtain the first clock deviation value.
第四步驟S4:在第一時鐘偏差值超出第一閾值時,計數器向寄存器回饋第一時鐘偏差值,並通過寄存器校準觸控晶片的時鐘頻率,並以校準結果作為觸控晶片下一次工作的時鐘頻率。 Step 4 S4: When the first clock deviation value exceeds the first threshold value, the counter feeds back the first clock deviation value to the register, and calibrates the clock frequency of the touch chip through the register, and uses the calibration result as the clock frequency of the next operation of the touch chip.
第五步驟S5:計算連續M個參考時鐘週期內的第一時鐘偏差值,若連續N個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時鐘頻率已校準穩定,M和N均為正整數,且M大於或等於N。 The fifth step S5: Calculate the first clock deviation value in M consecutive reference clock cycles. If N consecutive first clock deviation values are all less than the first threshold, it is determined that the clock frequency of the touch chip has been calibrated and stabilized. M and N are both positive integers, and M is greater than or equal to N.
在一些實施例中,第五步驟S5後進一步執行以下步驟: In some embodiments, the fifth step S5 is followed by further performing the following steps:
第六步驟S6:比較第五步驟S5中時鐘頻率校準穩定後的實際時鐘個數,和與頻率週期對應的理論時鐘個數,得到第二時鐘偏差值。
第七步驟S7:根據第二時鐘偏差值和預設閾值,判斷觸控晶片的當前時鐘頻率是否準確;若當前時鐘頻率不準確則進一步選擇校準方式,校準方式包含頻率自我調整校準及計數器校準;若當前時鐘頻率準確則不需要進行校準。 Step 7 S7: Based on the second clock deviation value and the preset threshold value, determine whether the current clock frequency of the touch chip is accurate; if the current clock frequency is inaccurate, further select a calibration method, which includes frequency self-adjustment calibration and counter calibration; if the current clock frequency is accurate, no calibration is required.
在一些實施例中,第四步驟S4中通過寄存器校準觸控晶片的時鐘頻率,具體為:在實際時鐘個數大於與頻率週期對應的理論時鐘個數時,寄存器減小輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流減小,從而降低觸控晶片的時鐘頻率。 In some embodiments, the clock frequency of the touch chip is calibrated by the register in the fourth step S4, specifically: when the actual number of clocks is greater than the theoretical number of clocks corresponding to the frequency cycle, the register reduces the output value, so that the current input to the oscillator circuit connected to the output end of the register is reduced, thereby reducing the clock frequency of the touch chip.
在實際時鐘個數小於與頻率週期對應的理論時鐘個數時,寄存器增大輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流增大,從而增大觸控晶片的時鐘頻率。 When the actual number of clocks is less than the theoretical number of clocks corresponding to the frequency cycle, the register increases the output value, causing the current of the oscillator circuit input connected to the output of the register to increase, thereby increasing the clock frequency of the touch chip.
在一些實施例中,預設閾值包含數量詞依次減小的第二閾值和第四閾值。 In some embodiments, the preset thresholds include a second threshold and a fourth threshold with decreasing quantifiers.
第二時鐘偏差值大於第二閾值時,執行頻率自我調整校準方式。 When the second clock deviation value is greater than the second threshold, the frequency self-adjustment calibration method is executed.
第二時鐘偏差值大於第四閾值且小於第二閾值時,執行計數器校準方式。 When the second clock deviation value is greater than the fourth threshold and less than the second threshold, the counter calibration method is executed.
在一些實施例中,執行頻率自我調整校準方式具體為:遍歷預存的各個頻率週期對應的理論時鐘個數,搜尋與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數,將兩個時鐘個數之間的偏差作為第三偏差值,並將與第五步 驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率定義為自我調整頻率。 In some embodiments, the frequency self-adjustment calibration method is specifically: traversing the theoretical clock numbers corresponding to each pre-stored frequency cycle, searching for the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5, taking the deviation between the two clock numbers as the third deviation value, and defining the frequency corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5 as the self-adjustment frequency.
第三偏差值小於第五閾值時,觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期。 When the third deviation value is less than the fifth threshold value, the reference clock cycle of the touch chip is switched to the frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5.
在一些實施例中,執行頻率自我調整校準方式還包括:將觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期之後。 In some embodiments, executing the frequency self-adjustment calibration method further includes: switching the reference clock cycle of the touch chip to a frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stabilization of the clock frequency calibration in the fifth step S5.
計算連續P個參考時鐘週期內的第一時鐘偏差值,若連續Q個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時鐘頻率已校準穩定,P和Q均為正整數,且P大於或等於Q。 Calculate the first clock deviation value within P consecutive reference clock cycles. If Q consecutive first clock deviation values are all less than the first threshold, it is determined that the clock frequency of the touch chip has been calibrated and stabilized. P and Q are both positive integers, and P is greater than or equal to Q.
在一些實施例中,第七步驟S7中的校準方式還包含執行軟體校準方式,預設閾值還包含數量詞介於第二閾值和第四閾值之間的第三閾值。 In some embodiments, the calibration method in the seventh step S7 further includes executing a software calibration method, and the default threshold value further includes a third threshold value whose quantifier is between the second threshold value and the fourth threshold value.
在第二時鐘偏差值大於第三閾值且小於第二閾值時,執行軟體校準方式,其中,執行軟體校準方式為通過軟體程式修改寄存器的輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流變化,從而調整觸控晶片的時鐘頻率。 When the second clock deviation value is greater than the third threshold value and less than the second threshold value, the software calibration method is executed, wherein the software calibration method is executed by modifying the output value of the register through the software program, so that the current input to the oscillation circuit connected to the output end of the register changes, thereby adjusting the clock frequency of the touch chip.
在第二時鐘偏差值大於第四閾值且小於第三閾值時,執行計數器校準方式。 When the second clock deviation value is greater than the fourth threshold and less than the third threshold, the counter calibration method is executed.
為解決上述技術問題本發明還提供了一種觸控晶片,包括 第一控制模組和調節模組。 To solve the above technical problems, the present invention also provides a touch chip, including a first control module and a regulating module.
第一控制模組包括計數器,第一控制模組用於通過計數器獲取觸控晶片在參考時鐘週期內生成的實際時鐘個數,在實際時鐘個數與對應頻率週期預設的理論時鐘個數之間的第一時鐘偏差值超出第一閾值時觸發調節模組。 The first control module includes a counter, which is used to obtain the actual number of clocks generated by the touch chip in the reference clock cycle through the counter, and trigger the adjustment module when the first clock deviation value between the actual number of clocks and the theoretical number of clocks preset in the corresponding frequency cycle exceeds the first threshold value.
調節模組包括寄存器,調節模組用於在實際時鐘個數大於理論時鐘個數時,控制寄存器減小輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流減小,從而降低振盪電路的振盪頻率;在實際時鐘個數小於理論時鐘個數時,控制寄存器增大輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流增大,從而增大振盪電路的振盪頻率。 The regulating module includes a register. When the actual number of clocks is greater than the theoretical number of clocks, the regulating module controls the register to reduce the output value, so that the current input to the oscillator circuit connected to the output end of the register is reduced, thereby reducing the oscillation frequency of the oscillator circuit; when the actual number of clocks is less than the theoretical number of clocks, the regulating module controls the register to increase the output value, so that the current input to the oscillator circuit connected to the output end of the register is increased, thereby increasing the oscillation frequency of the oscillator circuit.
在一些實施例中,第一控制模組還用於:在調節模組調節完成後,獲取觸控晶片在參考時鐘週期內的當前實際時鐘個數。 In some embodiments, the first control module is also used to obtain the current actual clock number of the touch chip in the reference clock cycle after the adjustment module completes the adjustment.
根據當前實際時鐘個數與理論時鐘個數之間的第二時鐘偏差值,判斷作為觸控晶片的參考時鐘週期的頻率週期是否改變,其中,頻率週期為與觸控晶片連接的顯示螢幕的幀同步信號的頻率對應的時鐘週期。 According to the second clock deviation value between the current actual clock number and the theoretical clock number, it is judged whether the frequency cycle of the reference clock cycle of the touch chip has changed, wherein the frequency cycle is the clock cycle corresponding to the frequency of the frame synchronization signal of the display screen connected to the touch chip.
當第二時鐘偏差值大於第二預設閾值時,判斷頻率週期發生改變,則將計數器的理論時鐘個數切換至與當前實際時鐘個數對應的頻率。 When the second clock deviation value is greater than the second preset threshold, it is determined that the frequency cycle has changed, and the theoretical clock number of the counter is switched to the frequency corresponding to the current actual clock number.
在一些實施例中,將計數器的理論時鐘個數切換至與當前 實際時鐘個數對應的頻率,包括:根據當前實際時鐘個數與各個頻率週期對應的理論時鐘個數對應清單,得到幀同步信號切換後的頻率,定義幀同步信號切換後的頻率為自我調整頻率。 In some embodiments, the theoretical clock number of the counter is switched to the frequency corresponding to the current actual clock number, including: obtaining the frequency after the frame synchronization signal is switched according to the corresponding list of the theoretical clock number corresponding to each frequency cycle according to the current actual clock number, and defining the frequency after the frame synchronization signal is switched as the self-adjusting frequency.
將計數器的理論時鐘個數配置值更新為自我調整頻率對應的理論時鐘個數配置值。 Update the theoretical clock number configuration value of the counter to the theoretical clock number configuration value corresponding to the self-adjusting frequency.
在一些實施例中,調節模組還包括第一MOS電晶體、電流鏡像模組及X個調節子模組,調節子模組包括第二MOS電晶體與第三MOS電晶體,X為正整數。 In some embodiments, the regulating module further includes a first MOS transistor, a current mirror module, and X regulating sub-modules, the regulating sub-module includes a second MOS transistor and a third MOS transistor, and X is a positive integer.
寄存器的輸入端為調節模組的第一輸入端,寄存器的輸出端與X個調節子模組的第一控制端連接,第一MOS電晶體的輸入端為調節模組的第二輸入端,第一MOS電晶體的輸出端接地,第一MOS電晶體的控制端與第一MOS電晶體的輸入端連接且連接的公共端與X個調節子模組的第二控制端一一對應連接,X個調節子模組的第二端均接地,X個調節子模組的第一端相互連接且連接的公共端與電流鏡像模組的輸入端,電流鏡像模組的輸出端為電流調節模組的輸出端。 The input end of the register is the first input end of the regulating module, the output end of the register is connected to the first control end of the X regulating sub-modules, the input end of the first MOS transistor is the second input end of the regulating module, the output end of the first MOS transistor is grounded, the control end of the first MOS transistor is connected to the input end of the first MOS transistor and the common end connected is connected to the second control end of the X regulating sub-modules one by one, the second ends of the X regulating sub-modules are all grounded, the first ends of the X regulating sub-modules are connected to each other and the common end connected is connected to the input end of the current mirror module, and the output end of the current mirror module is the output end of the current regulating module.
第二MOS電晶體的輸出端為調節子模組的第一端,第二MOS電晶體的控制端為調節子模組的第一控制端,第二MOS電晶體的輸入端與第三MOS電晶體的輸入端連接,第三MOS電晶體的控制端為調節子模組的第二控制端,第三MOS電晶體的輸出端為調節子模組的第二端。 The output end of the second MOS transistor is the first end of the regulating submodule, the control end of the second MOS transistor is the first control end of the regulating submodule, the input end of the second MOS transistor is connected to the input end of the third MOS transistor, the control end of the third MOS transistor is the second control end of the regulating submodule, and the output end of the third MOS transistor is the second end of the regulating submodule.
在一些實施例中,第一控制模組還用於: 在第二時鐘偏差值介於第二閾值與第四閾值時,通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。 In some embodiments, the first control module is also used to: When the second clock deviation value is between the second threshold value and the fourth threshold value, the output value of the register is adjusted by the counter so that each regulating submodule outputs the target current output value.
若實際時鐘個數大於理論時鐘個數則控制寄存器輸出的電流調節值減小單位調節值;若實際時鐘個數小於理論時鐘個數則控制寄存器輸出的電流調節值增加單位調節值。 If the actual number of clocks is greater than the theoretical number of clocks, the current adjustment value output by the control register is reduced by the unit adjustment value; if the actual number of clocks is less than the theoretical number of clocks, the current adjustment value output by the control register is increased by the unit adjustment value.
在第二時鐘偏差值小於第四閾值時,判定觸控晶片的時鐘準確。 When the second clock deviation value is less than the fourth threshold value, the clock of the touch chip is determined to be accurate.
第二閾值與第四閾值依次減小。 The second and fourth thresholds decrease in sequence.
在一些實施例中,預設閾值還包含數量詞介於第二閾值和第四閾值之間的第三閾值。 In some embodiments, the preset threshold further includes a third threshold whose quantifier is between the second threshold and the fourth threshold.
第一控制模組用於:在第二時鐘偏差值介於第二閾值與第三閾值時,通過軟體調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。 The first control module is used to: when the second clock deviation value is between the second threshold value and the third threshold value, adjust the output value of the register through software so that each regulating sub-module outputs the target current output value.
在第二時鐘偏差值介於第三閾值與第四閾值時,通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。 When the second clock deviation value is between the third threshold and the fourth threshold, the output value of the register is adjusted through the counter so that each regulating submodule outputs the target current output value.
在一些實施例中,第一MOS電晶體與各個調節子模組中的第三MOS電晶體之間的寬長比兩兩之間各不相同。 In some embodiments, the width-to-length ratios between the first MOS transistor and the third MOS transistor in each regulating submodule are different from each other.
在一些實施例中,振盪電路包括第一反相器、第二反相器及M個振盪子電路,振盪子電路包括第四MOS電晶體與第五MOS電晶體,M為正整數。 In some embodiments, the oscillator circuit includes a first inverter, a second inverter, and M oscillator circuits, the oscillator circuit includes a fourth MOS transistor and a fifth MOS transistor, and M is a positive integer.
振盪子電路的輸入端為振盪電路的輸入端,振盪子電路的輸出端與第一反相器的輸入端連接,第一反相器的輸出端與第二反相器 的輸入端連接,第二反相器的輸出端為振盪電路的輸出端。 The input end of the oscillator circuit is the input end of the oscillator circuit, the output end of the oscillator circuit is connected to the input end of the first inverter, the output end of the first inverter is connected to the input end of the second inverter, and the output end of the second inverter is the output end of the oscillator circuit.
M個振盪子電路中的第五MOS電晶體的輸入端相互連接且連接的公共端為振盪子電路的輸入端,第四MOS電晶體的控制端與第五MOS電晶體的控制端連接且連接的公共端為振盪子電路的第一端,第四MOS電晶體的汲極與第五MOS電晶體的汲極連接且連接的公共端為振盪子電路的第二端,M個振盪子電路的第一端與第二端依次串聯,串聯後的電路的兩端連接且連接的公共端為振盪子電路的輸出端。 The input ends of the fifth MOS transistors in the M oscillator circuits are connected to each other and the common end is the input end of the oscillator circuit. The control end of the fourth MOS transistor is connected to the control end of the fifth MOS transistor and the common end is the first end of the oscillator circuit. The drain of the fourth MOS transistor is connected to the drain of the fifth MOS transistor and the common end is the second end of the oscillator circuit. The first end and the second end of the M oscillator circuits are connected in series in sequence. The two ends of the series circuits are connected and the common end is the output end of the oscillator circuit.
為解決上述技術問題本發明還提供了一種觸控顯示裝置,包括上述觸控晶片,還包括與觸控晶片連接的顯示螢幕。 In order to solve the above technical problems, the present invention also provides a touch display device, including the above touch chip and a display screen connected to the touch chip.
綜上,本發明提供了一種觸控晶片的時鐘校準方法、觸控晶片及觸控顯示裝置,首先獲取與觸控晶片連接的顯示螢幕的當前幀同步信號頻率,並將當前幀同步信號頻率對應的時鐘週期作為觸控晶片的參考時鐘週期,使得觸控晶片時鐘校準更加符合標準。然後通過計數器計算參考時鐘週期內的實際時鐘個數;比較實際時鐘個數和理論時鐘個數得到第一時鐘偏差值;在第一時鐘偏差值超出第一閾值時,表示觸控晶片的時鐘不準確,此時計數器向寄存器回饋第一時鐘偏差值並通過寄存器校準觸控晶片的時鐘頻率,最終計算連續M個參考時鐘週期內的第一時鐘偏差值,若連續N個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時鐘頻率已校準穩定。綜上,能夠通過計數器和寄存器以硬體的形式實現對時鐘的自動檢測和校準,校準方式簡單,校準速度快且校準精度高。 In summary, the present invention provides a touch chip clock calibration method, a touch chip and a touch display device, which first obtains the current frame synchronization signal frequency of the display screen connected to the touch chip, and uses the clock cycle corresponding to the current frame synchronization signal frequency as the reference clock cycle of the touch chip, so that the touch chip clock calibration is more in line with the standard. Then the actual number of clocks in the reference clock cycle is calculated by the counter; the actual number of clocks and the theoretical number of clocks are compared to obtain the first clock deviation value; when the first clock deviation value exceeds the first threshold value, it indicates that the clock of the touch chip is inaccurate. At this time, the counter feeds back the first clock deviation value to the register and calibrates the clock frequency of the touch chip through the register. Finally, the first clock deviation value in M consecutive reference clock cycles is calculated. If the N consecutive first clock deviation values are all less than the first threshold value, it is determined that the clock frequency of the touch chip has been calibrated and stabilized. In summary, the automatic detection and calibration of the clock can be realized in the form of hardware through the counter and register, and the calibration method is simple, the calibration speed is fast and the calibration accuracy is high.
1:控制模組 1: Control module
2:調節模組 2: Adjustment module
MP1、MP2、MP3:第四MOS電晶體 MP1, MP2, MP3: the fourth MOS transistor
MN1、MN2、MN3:第五MOS電晶體 MN1, MN2, MN3: Fifth MOS transistor
MN4:第一MOS電晶體 MN4: First MOS transistor
MN5、MN6、MN7、MN8:第三MOS電晶體 MN5, MN6, MN7, MN8: The third MOS transistor
MN9、MN10、MN11、MN12:第二MOS電晶體 MN9, MN10, MN11, MN12: Second MOS transistor
IREF:參考電流 IREF: reference current
TRIM<1>:第一位電流調節值 TRIM<1>: First current adjustment value
TRIM<2>:第二位電流調節值 TRIM<2>: Second current regulation value
TRIM<3>:第三位電流調節值 TRIM<3>: The third current regulation value
TRIM<4>:第四位電流調節值 TRIM<4>: The fourth current regulation value
IOUT:輸出電流 IOUT: output current
INV1:第一反相器 INV1: First inverter
INV2:第二反向器 INV2: Second inverter
S1:第一步驟 S1: First step
S2:第二步驟 S2: Second step
S3:第三步驟 S3: The third step
S4:第四步驟 S4: Step 4
S5:第五步驟 S5: Step 5
S6:第六步驟
S6:
S7:第七步驟 S7: Step 7
為了更清楚地說明本發明實施例中的技術方案,下面將對現有技術和實施例中所需要使用的圖式作簡單地介紹,顯而易見地,下面描述中的圖式僅僅是本發明的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些圖式獲得其他的圖式。 In order to more clearly explain the technical solutions in the embodiments of the present invention, the following will briefly introduce the prior art and the diagrams required for use in the embodiments. Obviously, the diagrams described below are only some embodiments of the present invention. For ordinary technicians in this field, other diagrams can be obtained based on these diagrams without creative labor.
圖1為本發明提供的一種觸控晶片的時鐘校準方法的流程圖; 圖2為本發明提供的另一種觸控晶片的時鐘校準方法的流程圖; 圖3為本發明提供的一種觸控晶片的時鐘校準裝置的結構示意圖; 圖4為本發明提供的一種調節模組的部分電路圖; 圖5為本發明提供的一種調節模組的電路圖。 Figure 1 is a flow chart of a clock calibration method for a touch chip provided by the present invention; Figure 2 is a flow chart of another clock calibration method for a touch chip provided by the present invention; Figure 3 is a structural schematic diagram of a clock calibration device for a touch chip provided by the present invention; Figure 4 is a partial circuit diagram of a regulating module provided by the present invention; Figure 5 is a circuit diagram of a regulating module provided by the present invention.
本發明的核心是提供一種觸控晶片的時鐘校準方法、觸控晶片及觸控顯示裝置,能夠通過計數器和寄存器以硬體的形式實現對時鐘的自動檢測和校準,校準方式簡單,校準速度快且校準精度高。 The core of the present invention is to provide a touch chip clock calibration method, a touch chip and a touch display device, which can realize automatic detection and calibration of the clock in the form of hardware through a counter and a register. The calibration method is simple, the calibration speed is fast and the calibration accuracy is high.
為使本發明實施例的目的、技術方案和優點更加清楚,下面將結合本發明實施例中的圖式,對本發明實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described clearly and completely in combination with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative labor are within the scope of protection of the present invention.
請參照圖1,圖1為本發明提供的一種觸控晶片的時鐘校準方法的流程圖,觸控晶片包括計數器和寄存器。 Please refer to Figure 1, which is a flow chart of a clock calibration method for a touch chip provided by the present invention. The touch chip includes a counter and a register.
觸控晶片的時鐘校準方法包括如下步驟: The clock calibration method of the touch chip includes the following steps:
第一步驟S1:獲取與觸控晶片連接的顯示螢幕的當前幀同步信號頻率,當前幀同步信號頻率對應的時鐘週期為頻率週期,將頻率週期作為觸控晶片的參考時鐘週期。 The first step S1: obtain the current frame synchronization signal frequency of the display screen connected to the touch chip. The clock cycle corresponding to the current frame synchronization signal frequency is the frequency cycle, and the frequency cycle is used as the reference clock cycle of the touch chip.
觸控晶片使用過程中存在溫漂等導致時鐘不準確的現象,並且與觸控晶片配合使用的顯示螢幕在刷屏時也會對觸控晶片的時鐘帶來影響,為解決上述技術問題,在本申請中需要利用計數器和寄存器對觸控晶片的時鐘進行校準。首先為了檢驗觸控晶片的時鐘是否準確需要先為觸控晶片設置參考時鐘週期以便獲取在參考時鐘週期內的時鐘個數並進行後續時鐘校驗等步驟,在本申請中考慮到顯示螢幕的幀同步信號的頻率與觸控晶片的使用性能密切相關,因此將幀同步信號頻率對應的時鐘週期作為觸控晶片的參考時鐘週期。 During the use of the touch chip, there are temperature drifts and other phenomena that cause inaccurate clocks, and the display screen used with the touch chip will also affect the clock of the touch chip when refreshing the screen. To solve the above technical problems, in this application, it is necessary to use counters and registers to calibrate the clock of the touch chip. First, in order to check whether the clock of the touch chip is accurate, it is necessary to set a reference clock cycle for the touch chip in order to obtain the number of clocks in the reference clock cycle and perform subsequent clock calibration steps. In this application, considering that the frequency of the frame synchronization signal of the display screen is closely related to the performance of the touch chip, the clock cycle corresponding to the frame synchronization signal frequency is used as the reference clock cycle of the touch chip.
第二步驟S2:通過計數器計算觸控晶片在參考時鐘週期內的實際時鐘個數。
在本申請通過計數器計算實際時鐘個數,也即利用硬體的形式計算實際時鐘個數,計算更加準確和快速,進一步保證了時鐘校準的準確。 In this application, the actual number of clocks is calculated by a counter, that is, the actual number of clocks is calculated in the form of hardware, which is more accurate and faster, and further ensures the accuracy of clock calibration.
第三步驟S3:比較實際時鐘個數和與頻率週期對應的理論時鐘個數,得到第一時鐘偏差值。 The third step S3: Compare the actual number of clocks with the theoretical number of clocks corresponding to the frequency cycle to obtain the first clock deviation value.
在進行時鐘校準之前,預先設置有觸控晶片的振盪電路未受到干擾時在參考時鐘週期內生成的理論時鐘個數,以便後續進行時鐘校準。在得到實際時鐘個數後,將實際時鐘個數與理論時鐘個數做差得 到第一時鐘偏差值,第一時鐘偏差值的大小反映了觸控晶片中的振盪電路實際生成的時鐘的偏差程度。 Before clock calibration, the theoretical number of clocks generated by the oscillator circuit of the touch chip in the reference clock cycle when it is not disturbed is preset in advance to facilitate subsequent clock calibration. After obtaining the actual number of clocks, the actual number of clocks is subtracted from the theoretical number of clocks to obtain the first clock deviation value. The magnitude of the first clock deviation value reflects the degree of deviation of the clock actually generated by the oscillator circuit in the touch chip.
第四步驟S4:在第一時鐘偏差值超出第一閾值時,計數器向寄存器回饋第一時鐘偏差值,並通過寄存器校準觸控晶片的時鐘頻率,並以校準結果作為觸控晶片下一次工作的時鐘頻率。 Step 4 S4: When the first clock deviation value exceeds the first threshold value, the counter feeds back the first clock deviation value to the register, and calibrates the clock frequency of the touch chip through the register, and uses the calibration result as the clock frequency of the next operation of the touch chip.
第一時鐘偏差值的大小反映了觸控晶片中的振盪電路實際生成的時鐘的偏差程度,在本申請依據實際情況預先設置有第一閾值,第一時鐘偏差值的絕對值超出第一閾值時,表示觸控晶片中的振盪電路需要進行時鐘校準,因此計數器將第一時鐘偏差值回饋給寄存器,並通過寄存器校準觸控晶片的時鐘頻率,具體校準方式可以是通過修改寄存器的輸出值改變觸控晶片中的振盪電路的輸入電流值,當振盪電路的輸入電流增加或減小時振盪電路在參考時鐘週期內生成的時鐘個數也會相應的增加或減小,以實現時鐘校準的目的。將校準結果作為觸控晶片下一次工作的時鐘頻率也即使寄存器的輸出值保持在使振盪電路生成的時鐘個數滿足標準時的輸出值。 The magnitude of the first clock deviation value reflects the degree of deviation of the clock actually generated by the oscillation circuit in the touch chip. In the present application, a first threshold is pre-set according to the actual situation. When the absolute value of the first clock deviation value exceeds the first threshold, it indicates that the oscillation circuit in the touch chip needs to be calibrated. Therefore, the counter feeds back the first clock deviation value to the register, and calibrates the clock frequency of the touch chip through the register. The specific calibration method can be to change the input current value of the oscillation circuit in the touch chip by modifying the output value of the register. When the input current of the oscillation circuit increases or decreases, the number of clocks generated by the oscillation circuit in the reference clock cycle will also increase or decrease accordingly to achieve the purpose of clock calibration. The calibration result is used as the clock frequency for the next operation of the touch chip, that is, the output value of the register is maintained at the output value when the number of clocks generated by the oscillation circuit meets the standard.
此外,在實現寄存器校準觸控晶片的振盪電路的輸入值時,可以在寄存器的輸出端與振盪電路的電路輸入端之間設置調節電路,調節電路能夠輸出寄存器的輸出值對應的標準電流,所以當寄存器的輸出值不同時調節電路輸出的電流也不同,進而實現調節振盪電路的輸入電流的目的。 In addition, when implementing the register to calibrate the input value of the oscillator circuit of the touch chip, a regulating circuit can be set between the output end of the register and the circuit input end of the oscillator circuit. The regulating circuit can output a standard current corresponding to the output value of the register, so when the output value of the register is different, the current output by the regulating circuit is also different, thereby achieving the purpose of regulating the input current of the oscillator circuit.
第五步驟S5:計算連續M個參考時鐘週期內的第一時鐘偏差值,若連續N個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時 鐘頻率已校準穩定,M和N均為正整數,且M大於或等於N。 Step 5 S5: Calculate the first clock deviation value in M consecutive reference clock cycles. If N consecutive first clock deviation values are all less than the first threshold, it is determined that the clock frequency of the touch chip has been calibrated and stabilized. M and N are both positive integers, and M is greater than or equal to N.
為了進一步保證觸控晶片的時鐘準確且穩定,在通過寄存器校準觸控晶片的時鐘頻率之後,計算連續M個參考時鐘週期內的第一時鐘偏差值,若連續N個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時鐘頻率已校準穩定。綜上,本申請將當前幀同步信號頻率對應的時鐘週期也即頻率週期作為觸控晶片的參考時鐘週期,保證了進行時鐘校準的精準度。並通過計數器獲取觸控晶片在參考時鐘週期內的實際時鐘個數,在第一時鐘偏差值超出第一閾值也即觸控晶片的時鐘不準時,通過修改寄存器的輸出值調節觸控晶片的時鐘頻率,以硬體的形式對觸控晶片的時鐘進行校準且校準方式簡單,校準精度高。 In order to further ensure that the clock of the touch chip is accurate and stable, after the clock frequency of the touch chip is calibrated through the register, the first clock deviation value in M consecutive reference clock cycles is calculated. If N consecutive first clock deviation values are all less than the first threshold value, it is determined that the clock frequency of the touch chip has been calibrated and stabilized. In summary, this application uses the clock cycle corresponding to the frequency of the current frame synchronization signal, that is, the frequency cycle, as the reference clock cycle of the touch chip, ensuring the accuracy of clock calibration. The actual number of clocks of the touch chip in the reference clock cycle is obtained through a counter. When the first clock deviation value exceeds the first threshold, that is, the clock of the touch chip is inaccurate, the clock frequency of the touch chip is adjusted by modifying the output value of the register. The clock of the touch chip is calibrated in the form of hardware, and the calibration method is simple and the calibration accuracy is high.
在上述實施例的基礎上:在一些實施例中,第五步驟S5後進一步執行以下步驟: Based on the above embodiments: In some embodiments, the following steps are further performed after the fifth step S5:
第六步驟S6:比較第五步驟S5中時鐘頻率校準穩定後的實際時鐘個數,和與頻率週期對應的理論時鐘個數,得到第二時鐘偏差值。
第七步驟S7:根據第二時鐘偏差值和預設閾值,判斷觸控晶片的當前時鐘頻率的是否準確;若當前時鐘頻率不準確則進一步選擇校準方式,校準方式包含頻率自我調整校準及計數器校準;若當前時鐘頻率準確則不需要進行校準。 Step 7 S7: Based on the second clock deviation value and the preset threshold value, determine whether the current clock frequency of the touch chip is accurate; if the current clock frequency is inaccurate, further select a calibration method, which includes frequency self-adjustment calibration and counter calibration; if the current clock frequency is accurate, no calibration is required.
在本實施例中,考慮到觸控晶片除了受到溫漂等因素的影響,還會受到與觸控晶片連接的顯示螢幕刷屏的影響,並且幀同步信號的頻率改變造成的影響比溫漂造成的影響更強烈,在幀同步信號的頻率 改變時如果還按照原來的理論時鐘個數判斷觸控晶片的時鐘是否準確是不可行的。因此在本實施例中在進行時鐘頻率校準後還需要進一步判斷觸控晶片的當前時鐘頻率是否準確,如果觸控晶片的當前時鐘頻率依然不準則需要考慮是否受到了顯示螢幕刷屏週期改變的影響。 In this embodiment, considering that the touch chip is not only affected by factors such as temperature drift, but also by the refresh of the display screen connected to the touch chip, and the impact caused by the change in the frequency of the frame synchronization signal is stronger than the impact caused by the temperature drift, it is not feasible to judge whether the clock of the touch chip is accurate according to the original theoretical clock number when the frequency of the frame synchronization signal changes. Therefore, in this embodiment, after the clock frequency calibration, it is necessary to further judge whether the current clock frequency of the touch chip is accurate. If the current clock frequency of the touch chip is still inaccurate, it is necessary to consider whether it is affected by the change in the refresh cycle of the display screen.
在判斷觸控晶片的當前時鐘頻率的是否準確之前,預先根據觸控晶片的實際性能設置有預設閾值,可根據第二時鐘偏差值的大小和預設閾值的大小判斷觸控晶片的當前時鐘頻率的是否準確。請參照圖2,圖2為本發明提供的另一種觸控晶片的時鐘校準方法的流程圖,若當前時鐘頻率不準確則進一步選擇校準方式,校準方式包含頻率自我調整校準及計數器校準,例如,在當前時鐘頻率很不準時判斷與觸控晶片連接的顯示螢幕的刷屏週期可能發生了改變,此時可能需要修改觸控晶片的參考時鐘週期才能實現時鐘校準;在當前時鐘頻率只是輕微不準時表示觸控晶片的時鐘可能還是因為溫漂等因素的影響導致不準確,這種情況可以繼續利用計數器和寄存器進行時鐘校準;若當前時鐘頻率準確則不需要進行校準。 Before determining whether the current clock frequency of the touch chip is accurate, a preset threshold is set in advance according to the actual performance of the touch chip. Whether the current clock frequency of the touch chip is accurate can be determined according to the size of the second clock deviation value and the size of the preset threshold. Please refer to Figure 2, which is a flow chart of another touch chip clock calibration method provided by the present invention. If the current clock frequency is inaccurate, a calibration method is further selected, and the calibration method includes frequency self-adjustment calibration and counter calibration. For example, when the current clock frequency is very inaccurate, it is judged that the refresh cycle of the display screen connected to the touch chip may have changed. At this time, the reference clock cycle of the touch chip may need to be modified to achieve clock calibration; when the current clock frequency is only slightly inaccurate, it means that the clock of the touch chip may still be inaccurate due to factors such as temperature drift. In this case, the counter and register can continue to be used for clock calibration; if the current clock frequency is accurate, no calibration is required.
在一些實施例中,第四步驟S4中通過寄存器校準觸控晶片的時鐘頻率,具體為:在實際時鐘個數大於與頻率週期對應的理論時鐘個數時,寄存器減小輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流減小,從而降低觸控晶片的時鐘頻率。 In some embodiments, the clock frequency of the touch chip is calibrated by the register in the fourth step S4, specifically: when the actual number of clocks is greater than the theoretical number of clocks corresponding to the frequency cycle, the register reduces the output value, so that the current input to the oscillator circuit connected to the output end of the register is reduced, thereby reducing the clock frequency of the touch chip.
在實際時鐘個數小於與頻率週期對應的理論時鐘個數時,寄存器增大輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流 增大,從而增大觸控晶片的時鐘頻率。 When the actual number of clocks is less than the theoretical number of clocks corresponding to the frequency cycle, the register increases the output value, causing the current of the oscillator circuit input connected to the output of the register to increase, thereby increasing the clock frequency of the touch chip.
在本實施例中,在實際時鐘個數大於理論時鐘個數時表示振盪電路當前生成的時鐘偏快,因此減小寄存器的輸出值以便將振盪電路的輸入電流減小進而將振盪電路生成的時鐘調慢達到時鐘校準的目的。 In this embodiment, when the actual number of clocks is greater than the theoretical number of clocks, it means that the clock currently generated by the oscillator circuit is too fast, so the output value of the register is reduced to reduce the input current of the oscillator circuit and then slow down the clock generated by the oscillator circuit to achieve the purpose of clock calibration.
在實際時鐘個數小於理論時鐘個數時表示振盪電路當前生成的時鐘偏慢,因此增大寄存器的輸出值以便將振盪電路的輸入電流增大進而將振盪電路生成的時鐘調快達到時鐘校準的目的。 When the actual number of clocks is less than the theoretical number of clocks, it means that the clock currently generated by the oscillator circuit is too slow. Therefore, the output value of the register is increased to increase the input current of the oscillator circuit and thus speed up the clock generated by the oscillator circuit to achieve the purpose of clock calibration.
在一些實施例中,預設閾值包含數量詞依次減小的第二閾值和第四閾值。 In some embodiments, the preset thresholds include a second threshold and a fourth threshold with decreasing quantifiers.
第二時鐘偏差值大於第二閾值時,執行頻率自我調整校準方式。 When the second clock deviation value is greater than the second threshold, the frequency self-adjustment calibration method is executed.
第二時鐘偏差值大於第四閾值且小於第二閾值時,執行計數器校準方式。 When the second clock deviation value is greater than the fourth threshold and less than the second threshold, the counter calibration method is executed.
在本實施例中,設置有數量詞依次減小的第二閾值和第四閾值,當第二時鐘偏差值大於第二閾值時表示觸控晶片的時鐘不準確的程度比較大,需要執行頻率自我調整校準方式對時鐘進行校準,這裡的頻率自我調整校準方式即為基於顯示螢幕當前幀同步信號頻率重新為觸控晶片設置參考時鐘個數。 In this embodiment, the second threshold and the fourth threshold are set with decreasing quantifiers in sequence. When the second clock deviation value is greater than the second threshold, it indicates that the clock of the touch chip is relatively inaccurate, and the frequency self-adjustment calibration method needs to be executed to calibrate the clock. The frequency self-adjustment calibration method here is to re-set the number of reference clocks for the touch chip based on the current frame synchronization signal frequency of the display screen.
第二時鐘偏差值大於第四閾值且小於第二閾值時表示觸控晶片的時鐘不準確的程度比較低,此時需要執行計數器校準方式,也即可以繼續利用計數器和寄存器進行時鐘校準。 When the second clock deviation value is greater than the fourth threshold value and less than the second threshold value, it means that the clock inaccuracy of the touch chip is relatively low. At this time, the counter calibration method needs to be executed, that is, the counter and register can continue to be used for clock calibration.
例如,在振盪電路的頻率不變的情況下,如果幀同步信號的頻率改變,那麼預設時間段內的實際時鐘個數會發生改變。對於同一個幀同步信號頻率,理論時鐘個數是固定的,例如目前使用的幀同步信號頻率有60HZ、90HZ、120HZ和144HZ,各個幀同步信號對應的理論時鐘個數分別為1600000、1066666、800000和666666。 For example, if the frequency of the frame synchronization signal changes while the frequency of the oscillation circuit remains unchanged, the actual number of clocks in the preset time period will change. For the same frame synchronization signal frequency, the theoretical number of clocks is fixed. For example, the frame synchronization signal frequencies currently used are 60HZ, 90HZ, 120HZ and 144HZ, and the theoretical number of clocks corresponding to each frame synchronization signal is 1600000, 1066666, 800000 and 666666 respectively.
如果幀同步信號的頻率從120HZ變為144HZ,那麼實際時鐘個數的改變幅度為((144-120)/120)=16.7%,而由溫漂導致的實際時鐘個數的變化幅度很小通常在2%之內,因此在當前實際時鐘個數與理論時鐘個數之間的第二偏差值變化很大時,可以確定此時顯示螢幕的幀同步信號的頻率發生了改變,也即需要修改觸控晶片的參考時鐘週期也即需要進行頻率自我調整校準。 If the frequency of the frame synchronization signal changes from 120HZ to 144HZ, the actual number of clocks changes by ((144-120)/120)=16.7%, while the actual number of clocks caused by temperature drift changes by a small amount, usually within 2%. Therefore, when the second deviation value between the actual number of clocks and the theoretical number of clocks changes greatly, it can be determined that the frequency of the frame synchronization signal of the display screen has changed, which means that the reference clock cycle of the touch chip needs to be modified, that is, the frequency self-adjustment calibration is required.
在本實施例中,針對第二時鐘偏差值的大小選擇不同的校準方式,使得時鐘校準的過程更加快速和準確。 In this embodiment, different calibration methods are selected according to the size of the second clock deviation value, making the clock calibration process faster and more accurate.
在一些實施例中,執行頻率自我調整校準方式具體為:遍歷預存的各個頻率週期對應的理論時鐘個數,搜尋與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數,將兩個時鐘個數之間的偏差作為第三偏差值,並將與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率定義為自我調整頻率。 In some embodiments, the frequency self-adjustment calibration method is specifically: traversing the theoretical clock numbers corresponding to each pre-stored frequency cycle, searching for the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5, taking the deviation between the two clock numbers as the third deviation value, and defining the frequency corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5 as the self-adjustment frequency.
第三偏差值小於第五閾值時,觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期。 When the third deviation value is less than the fifth threshold value, the reference clock cycle of the touch chip is switched to the frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the stable clock frequency calibration in the fifth step S5.
在本實施例中,執行頻率自我調整校準方式包括首先遍歷預存的各個頻率週期對應的理論時鐘個數,搜尋與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數,並得到時鐘頻率校準穩定時對應的實際時鐘個數與預存的各個理論時鐘個數中偏差最小的理論時鐘個數之間的第三偏差值。如果第三偏差值小於第五閾值,則將觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期,以便後續繼續檢驗觸控晶片的時鐘是否準確。 In this embodiment, the frequency self-adjustment calibration method is executed, including first traversing the theoretical clock numbers corresponding to each pre-stored frequency cycle, searching for the theoretical clock number with the smallest deviation from the actual clock number corresponding to the clock frequency calibration being stable in the fifth step S5, and obtaining a third deviation value between the actual clock number corresponding to the clock frequency calibration being stable and the theoretical clock number with the smallest deviation among the pre-stored theoretical clock numbers. If the third deviation value is less than the fifth threshold value, the reference clock cycle of the touch chip is switched to the frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the clock frequency calibration stabilization in the fifth step S5, so as to continue to check whether the clock of the touch chip is accurate.
例如,連續5次的實際時鐘個數與某個幀同步信號的頻率對應的實際時鐘個數相差很小,表示幀同步信號切換到了該頻率且已經穩定。例如連續五次檢測到的實際時鐘個數從1599950切換到了799950,1599950與理論值1600000很接近,說明以前的幀同步信號頻率為60HZ,799950與理論值800000很接近,說明現在的幀同步信號頻率為120HZ,即幀同步信號從60HZ切換到了120HZ,需要將理論時鐘個數設置為與120HZ對應的時鐘週期對應的時鐘個數。 For example, if the actual number of clocks detected for five consecutive times is very close to the actual number of clocks corresponding to the frequency of a frame synchronization signal, it means that the frame synchronization signal has switched to that frequency and has stabilized. For example, if the actual number of clocks detected for five consecutive times switches from 1599950 to 799950, 1599950 is very close to the theoretical value of 1600000, indicating that the previous frame synchronization signal frequency was 60HZ, and 799950 is very close to the theoretical value of 800000, indicating that the current frame synchronization signal frequency is 120HZ, that is, the frame synchronization signal has switched from 60HZ to 120HZ, and the theoretical number of clocks needs to be set to the number of clocks corresponding to the clock cycle corresponding to 120HZ.
在一些實施例中,執行頻率自我調整校準方式還包括:將觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期之後,計算連續P個參考時鐘週期內的第一時鐘偏差值,若連續Q個第一時鐘偏差值均小於第一閾值則判定觸控晶片的時鐘頻率已校準穩定,P和Q均為正整數,且P大於或等於Q。 In some embodiments, the frequency self-adjustment calibration method further includes: after switching the reference clock cycle of the touch chip to the frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the clock frequency calibration stability in the fifth step S5, calculating the first clock deviation value in P consecutive reference clock cycles, if the consecutive Q first clock deviation values are all less than the first threshold value, it is determined that the clock frequency of the touch chip has been calibrated and stabilized, P and Q are both positive integers, and P is greater than or equal to Q.
在本實施例中,為了進一步保證時鐘校準的準確度,在將 觸控晶片的參考時鐘週期切換至與第五步驟S5中時鐘頻率校準穩定時對應的實際時鐘個數的偏差最小的理論時鐘個數對應的頻率週期之後,繼續連續P次計算第一時鐘偏差值,若有Q個第一時鐘偏差值均小於第一閾值則表示當前觸控晶片的時鐘已經校準,進一步保證了時鐘校準的準確度。 In this embodiment, in order to further ensure the accuracy of clock calibration, after switching the reference clock cycle of the touch chip to the frequency cycle corresponding to the theoretical clock number with the smallest deviation from the actual clock number corresponding to the clock frequency calibration stabilization in the fifth step S5, the first clock deviation value is calculated continuously for P times. If Q first clock deviation values are all less than the first threshold value, it means that the clock of the current touch chip has been calibrated, which further ensures the accuracy of clock calibration.
此外,對於P和Q的具體數值本申請對此不做特別的限定,可根據實際情況進行設置。 In addition, this application does not impose any special restrictions on the specific values of P and Q, which can be set according to actual circumstances.
在一些實施例中,第七步驟S7中的校準方式還包含執行軟體校準方式,預設閾值還包含數量詞介於第二閾值和第四閾值之間的第三閾值。 In some embodiments, the calibration method in the seventh step S7 further includes executing a software calibration method, and the default threshold value further includes a third threshold value whose quantifier is between the second threshold value and the fourth threshold value.
在第二時鐘偏差值大於第三閾值且小於第二閾值時,執行軟體校準方式,其中,執行軟體校準方式為通過軟體程式修改寄存器的輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流變化,從而調整觸控晶片的時鐘頻率。 When the second clock deviation value is greater than the third threshold value and less than the second threshold value, the software calibration method is executed, wherein the software calibration method is executed by modifying the output value of the register through the software program, so that the current input to the oscillation circuit connected to the output end of the register changes, thereby adjusting the clock frequency of the touch chip.
在第二時鐘偏差值大於第四閾值且小於第三閾值時,執行計數器校準方式。 When the second clock deviation value is greater than the fourth threshold and less than the third threshold, the counter calibration method is executed.
在本實施例中,考慮到計數器校準的精度要比直接用軟體寫寄存器校準的精度高,但校準速度慢。所以誤差大時用軟體校準,速度快;誤差小時,採用計數器校準,精度高。 In this embodiment, the accuracy of counter calibration is higher than that of directly using software to calibrate registers, but the calibration speed is slow. Therefore, when the error is large, software calibration is used, which is fast; when the error is small, counter calibration is used, which is high in accuracy.
具體的,預先設置有介於第二閾值和第四閾值之間的第三閾值,在第二時鐘偏差值大於第三閾值且小於第二閾值時表示觸控晶片當前時鐘不準確的程度較大,所以執行軟體校準方式,具體為通過軟體 程式修改寄存器的輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流變化,從而調整觸控晶片的時鐘頻率。在第二時鐘偏差值大於第四閾值且小於第三閾值時表示觸控晶片當前時鐘不準確的程度較小,執行計數器校準方式,校準精度高。 Specifically, a third threshold between the second threshold and the fourth threshold is preset. When the second clock deviation value is greater than the third threshold and less than the second threshold, it indicates that the current clock of the touch chip is relatively inaccurate, so the software calibration method is executed, specifically, the output value of the register is modified by the software program, so that the current input of the oscillation circuit connected to the output end of the register changes, thereby adjusting the clock frequency of the touch chip. When the second clock deviation value is greater than the fourth threshold and less than the third threshold, it indicates that the current clock of the touch chip is relatively inaccurate, and the counter calibration method is executed, with high calibration accuracy.
請參照圖3,圖3為本發明提供的一種觸控晶片的時鐘校準裝置的結構示意圖,該觸控晶片包括控制模組1和調節模組2。
Please refer to Figure 3, which is a schematic diagram of the structure of a clock calibration device for a touch chip provided by the present invention. The touch chip includes a
控制模組1包括計數器,控制模組1用於通過計數器獲取觸控晶片在參考時鐘週期內生成的實際時鐘個數,在實際時鐘個數與對應頻率週期預設的理論時鐘個數之間的第一時鐘偏差值超出第一閾值時觸發調節模組2。
調節模組2包括寄存器,調節模組2用於在實際時鐘個數大於理論時鐘個數時,控制寄存器減小輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流減小,從而降低振盪電路的振盪頻率;在實際時鐘個數小於理論時鐘個數時,控制寄存器增大輸出值,使得與寄存器的輸出端連接的振盪電路輸入的電流增大,從而增大振盪電路的振盪頻率。
The
在本實施例中,觸控晶片包括控制模組1和調節模組2,首先控制模組1通過計數器獲取觸控晶片中用於產生時鐘的振盪電路在參考時鐘週期內生成的實際時鐘個數。在進行時鐘校準之前首先根據觸控晶片的實際情況設置有理論時鐘個數和第一閾值。在得到實際時鐘個數後,將實際時鐘個數與理論時鐘個數做差得到第一時鐘偏差值,若第一時鐘偏差值超出第一閾值,則表示此時振盪電路生成的時鐘不準確,需
要進行時鐘校準,所以控制模組1會觸發調節模組2。
In this embodiment, the touch chip includes a
在實際時鐘個數大於理論時鐘個數時表示振盪電路當前生成的時鐘偏快,因此調節模組2通過寄存器將振盪電路的輸入電流減小進而將振盪電路生成的時鐘調慢達到時鐘校準的目的。
When the actual number of clocks is greater than the theoretical number of clocks, it means that the clock currently generated by the oscillator circuit is too fast. Therefore, the
在實際時鐘個數小於理論時鐘個數時表示振盪電路當前生成的時鐘偏慢,因此調節模組2通過寄存器將振盪電路的輸入電流增大進而將振盪電路生成的時鐘調快達到時鐘校準的目的。
When the actual number of clocks is less than the theoretical number of clocks, it means that the clock currently generated by the oscillator circuit is too slow. Therefore, the
調節模組2對振盪電路的輸入電流的具體調節數值可以為預設單位調解數值,也即每次觸發調節模組2時都將振盪電路的輸入電流減小一個檔位或增大一個檔位元,經過調節模組2多次調節後使得第一差值保持在預設誤差範圍內;還可以是根據實際時鐘個數與理論時鐘個數之間的第一差值設置具體調解數值,使得調節模組2只要被觸發一次就使得第一差值保持在預設誤差範圍內。
The specific adjustment value of the input current of the oscillating circuit by the
此外,本申請對理論時鐘個數和預設誤差範圍的具體數值不做特別限定,根據實際情況進行設定即可。 In addition, this application does not specifically limit the specific values of the theoretical clock number and the preset error range, and can be set according to actual circumstances.
在一些實施例中,控制模組1還用於:在調節模組2調節完成後,獲取觸控晶片在參考時鐘週期內的當前實際時鐘個數。
In some embodiments, the
根據當前實際時鐘個數與理論時鐘個數之間的第二時鐘偏差值,判斷作為觸控晶片的參考時鐘週期的頻率週期是否改變,其中,頻率週期為與觸控晶片連接的顯示螢幕的幀同步信號的頻率對應的時鐘週期。 According to the second clock deviation value between the current actual clock number and the theoretical clock number, it is judged whether the frequency cycle of the reference clock cycle of the touch chip has changed, wherein the frequency cycle is the clock cycle corresponding to the frequency of the frame synchronization signal of the display screen connected to the touch chip.
當第二時鐘偏差值大於第二預設閾值時,判斷頻率週期發生改變,則將計數器的理論時鐘個數切換至與當前實際時鐘個數對應的頻率。 When the second clock deviation value is greater than the second preset threshold, it is determined that the frequency cycle has changed, and the theoretical clock number of the counter is switched to the frequency corresponding to the current actual clock number.
考慮到與觸控晶片連接的顯示螢幕刷屏時,觸控晶片的時鐘也會受到影響,並且顯示螢幕的刷屏週期由幀同步信號的頻率有關,並且,幀同步信號的頻率改變造成的影響比溫漂造成的影響更強烈,幀同步信號的頻率改變造成的時鐘不準確的情況更加明顯,本申請中的觸控晶片的參考時鐘週期又是採用的頻率週期,因此在本實施例中需要判斷作為觸控晶片的參考時鐘週期的頻率週期是否改變,避免對正常的時鐘校準造成不利影響。 Considering that when the display screen connected to the touch chip is refreshed, the clock of the touch chip will also be affected, and the refresh cycle of the display screen is related to the frequency of the frame synchronization signal, and the impact caused by the frequency change of the frame synchronization signal is stronger than the impact caused by temperature drift, and the clock inaccuracy caused by the frequency change of the frame synchronization signal is more obvious. The reference clock cycle of the touch chip in this application is the adopted frequency cycle. Therefore, in this embodiment, it is necessary to determine whether the frequency cycle of the reference clock cycle of the touch chip has changed to avoid adverse effects on normal clock calibration.
在判斷作為觸控晶片的參考時鐘週期的頻率週期是否改變之前,預先根據觸控晶片的實際性能設置有理論時鐘個數和第二時鐘偏差值,可根據第二時鐘偏差值的大小判斷作為觸控晶片的參考時鐘週期的頻率週期是否改變,當第二時鐘偏差值大於第二閾值時,判斷頻率週期發生改變,則將振盪電路切換至理論時鐘個數與當前實際時鐘個數對應的頻率。 Before judging whether the frequency cycle of the reference clock cycle of the touch chip has changed, the theoretical clock number and the second clock deviation value are set in advance according to the actual performance of the touch chip. The frequency cycle of the reference clock cycle of the touch chip can be judged according to the size of the second clock deviation value. When the second clock deviation value is greater than the second threshold value, it is judged that the frequency cycle has changed, and the oscillation circuit is switched to the frequency corresponding to the theoretical clock number and the current actual clock number.
此外,判斷調節模組2是否完成調節可通過判斷實際時鐘個數的穩定性來實現,例如,連續5個預設時間段內獲取實際時鐘個數,並分別計算各個實際時鐘個數與理論時鐘個數之間的差值,只有當5個差值均小於預設值時,才能確定調節模組2調節完成。
In addition, whether the
在一些實施例中,將計數器的理論時鐘個數切換至與當前實際時鐘個數對應的頻率,包括: 根據當前實際時鐘個數與各個頻率週期對應的理論時鐘個數對應清單,得到幀同步信號切換後的頻率,定義幀同步信號切換後的頻率為自我調整頻率。 In some embodiments, the theoretical clock number of the counter is switched to the frequency corresponding to the current actual clock number, including: According to the corresponding list of the theoretical clock number corresponding to the current actual clock number and each frequency cycle, the frequency after the frame synchronization signal is switched is obtained, and the frequency after the frame synchronization signal is switched is defined as the self-adjusting frequency.
將計數器的理論時鐘個數配置值更新為自我調整頻率對應的理論時鐘個數配置值。 Update the theoretical clock number configuration value of the counter to the theoretical clock number configuration value corresponding to the self-adjusting frequency.
在本實施例中,預先設置有理論時鐘個數對應清單,理論時鐘個數對應清單包括時鐘個數與幀同步信號頻率之間的對應關係。在獲取到實際時鐘個數後,將實際時鐘個數與理論時鐘個數對應清單中的各個時鐘個數進行對比,以確定幀同步信號切換後的頻率,定義幀同步信號切換後的頻率為自我調整頻率並將計數器的理論時鐘個數切換至自我調整頻率對應的理論時鐘個數,以便再次對觸控晶片的時鐘進行校準,以保證觸控晶片的穩定工作。 In this embodiment, a theoretical clock number correspondence list is pre-set, and the theoretical clock number correspondence list includes the correspondence between the clock number and the frame synchronization signal frequency. After obtaining the actual clock number, the actual clock number is compared with each clock number in the theoretical clock number correspondence list to determine the frequency after the frame synchronization signal is switched, and the frequency after the frame synchronization signal is switched is defined as the self-adjusting frequency and the theoretical clock number of the counter is switched to the theoretical clock number corresponding to the self-adjusting frequency, so as to calibrate the clock of the touch chip again to ensure the stable operation of the touch chip.
在一些實施例中,調節模組2還包括第一MOS電晶體、電流鏡像模組及X個調節子模組,調節子模組包括第二MOS電晶體與第三MOS電晶體,X為正整數。
In some embodiments, the regulating
寄存器的輸入端為調節模組2的第一輸入端,寄存器的輸出端與X個調節子模組的第一控制端連接,第一MOS電晶體的輸入端為調節模組2的第二輸入端,第一MOS電晶體的輸出端接地,第一MOS電晶體的控制端與第一MOS電晶體的輸入端連接且連接的公共端與X個調節子模組的第二控制端一一對應連接,X個調節子模組的第二端均接地,X個調節子模組的第一端相互連接且連接的公共端與電流鏡像模組的輸入端,電流鏡像模組的輸出端為電流調節模組2的輸出端。
The input end of the register is the first input end of the
第二MOS電晶體的輸出端為調節子模組的第一端,第二MOS電晶體的控制端為調節子模組的第一控制端,第二MOS電晶體的輸入端與第三MOS電晶體的輸入端連接,第三MOS電晶體的控制端為調節子模組的第二控制端,第三MOS電晶體的輸出端為調節子模組的第二端。 The output end of the second MOS transistor is the first end of the regulating submodule, the control end of the second MOS transistor is the first control end of the regulating submodule, the input end of the second MOS transistor is connected to the input end of the third MOS transistor, the control end of the third MOS transistor is the second control end of the regulating submodule, and the output end of the third MOS transistor is the second end of the regulating submodule.
在本實施例中,寄存器輸出位數為X位的電流調節值,並且電流調節值的每一位分別對應控制一個調節子模組是否輸出電流,各個調節子模組的輸出電流的和為調節模組2輸入到振盪電路的電流,因此,當寄存器輸出的電流值減小時,調節模組2輸出到振盪電路的電流就會減小進而實現減小振盪電路在參考時鐘週期內生成的實際時鐘個數的目的。
In this embodiment, the register outputs a current adjustment value with X bits, and each bit of the current adjustment value corresponds to controlling whether a regulating submodule outputs current. The sum of the output currents of each regulating submodule is the current input to the oscillator circuit by the regulating
在一些實施例中,第一MOS電晶體的輸入端用於輸入參考電流,各個調節子模組中的第三MOS電晶體構成共閘共源的電流鏡,因此每一個調節子模組的輸出電流與參考電流成比例,最終電流鏡像模組輸出N個調節子模組的輸出電流的和至振盪電路,以便校準振盪電路生成的時鐘。 In some embodiments, the input terminal of the first MOS transistor is used to input a reference current, and the third MOS transistor in each regulating submodule constitutes a common gate and common source current mirror, so that the output current of each regulating submodule is proportional to the reference current, and finally the current mirror module outputs the sum of the output currents of N regulating submodules to the oscillator circuit to calibrate the clock generated by the oscillator circuit.
請參照圖4,圖4為本發明提供的一種調節模組的部分電路圖。圖4中MN4為第一MOS電晶體,IREF為參考電流,MN9和MN5、MN10和MN6、MN11和MN7以及MN12和MN8分別構成四個調節子模組,其中,MN9、MN10、MN11和MN12均為第二MOS電晶體,MN5、MN6、MN7以及MN8均為第三MOS電晶體,TRIM為寄存器輸出的位數為4位的電流調節值,TRIM<0>至TRIM<3>代表TRIM的第一位 至第四位,IOUT為四個調節子模組的輸出電流的和。 Please refer to Figure 4, which is a partial circuit diagram of a regulating module provided by the present invention. In Figure 4, MN4 is the first MOS transistor, IREF is the reference current, MN9 and MN5, MN10 and MN6, MN11 and MN7, and MN12 and MN8 respectively constitute four regulating sub-modules, wherein MN9, MN10, MN11 and MN12 are all second MOS transistors, MN5, MN6, MN7 and MN8 are all third MOS transistors, TRIM is the current regulation value with 4 bits output by the register, TRIM<0> to TRIM<3> represent the first to fourth bits of TRIM, and IOUT is the sum of the output currents of the four regulating sub-modules.
請參照圖5,圖5為本發明提供的一種調節模組的電路圖,圖5中的輸出模組即為圖4表示的電路,MP4與MP5構成電流鏡像模組。 Please refer to Figure 5, which is a circuit diagram of a regulating module provided by the present invention. The output module in Figure 5 is the circuit shown in Figure 4, and MP4 and MP5 constitute a current mirror module.
在一些實施例中,控制模組1還用於:在第二時鐘偏差值介於第二閾值與第四閾值時,通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。
In some embodiments, the
若實際時鐘個數大於理論時鐘個數則控制寄存器輸出的電流調節值減小單位調節值;若實際時鐘個數小於理論時鐘個數則控制寄存器輸出的電流調節值增加單位調節值。 If the actual number of clocks is greater than the theoretical number of clocks, the current adjustment value output by the control register is reduced by the unit adjustment value; if the actual number of clocks is less than the theoretical number of clocks, the current adjustment value output by the control register is increased by the unit adjustment value.
在第二時鐘偏差值小於第四閾值時,判定觸控晶片的時鐘準確。 When the second clock deviation value is less than the fourth threshold value, the clock of the touch chip is determined to be accurate.
第二閾值與第四閾值依次減小。在本實施例中,若第二時鐘偏差值介於第二閾值與第四閾值之間,則表示時鐘不準確,需要通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值,具體的若實際時鐘個數大於理論時鐘個數則控制寄存器輸出的電流調節值減小單位調節值進而使得振盪電路生成的時鐘個數減小;若實際時鐘個數小於理論時鐘個數則控制寄存器輸出的電流調節值增加單位調節值進而使得振盪電路生成的時鐘個數增大。 The second threshold and the fourth threshold decrease in sequence. In this embodiment, if the second clock deviation value is between the second threshold and the fourth threshold, it means that the clock is inaccurate, and the output value of the register needs to be adjusted through the counter so that each regulating submodule outputs the target current output value. Specifically, if the actual number of clocks is greater than the theoretical number of clocks, the current adjustment value output by the control register is reduced by the unit adjustment value, thereby reducing the number of clocks generated by the oscillation circuit; if the actual number of clocks is less than the theoretical number of clocks, the current adjustment value output by the control register is increased by the unit adjustment value, thereby increasing the number of clocks generated by the oscillation circuit.
若第二時鐘偏差值小於第四閾值,則表示實際時鐘個數和理論時鐘個數相差不大,判定觸控晶片的時鐘準確。 If the second clock deviation value is less than the fourth threshold value, it means that the actual clock number is not much different from the theoretical clock number, and the touch chip clock is judged to be accurate.
綜上,在本實施例中針對第二時鐘偏差值具體的偏差大小判斷觸控晶片的時鐘是否準確,並選擇對應的時鐘校準方式,保證了時 鐘校準的準確度。 In summary, in this embodiment, the accuracy of the clock of the touch chip is determined based on the specific deviation of the second clock deviation value, and the corresponding clock calibration method is selected to ensure the accuracy of the clock calibration.
在一些實施例中,預設閾值還包含數量詞介於第二閾值和第四閾值之間的第三閾值。 In some embodiments, the preset threshold further includes a third threshold whose quantifier is between the second threshold and the fourth threshold.
控制模組1用於:在第二時鐘偏差值介於第二閾值與第三閾值時,通過軟體調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。
在第二時鐘偏差值介於第三閾值與第四閾值時,通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。 When the second clock deviation value is between the third threshold and the fourth threshold, the output value of the register is adjusted through the counter so that each regulating submodule outputs the target current output value.
在本實施例中,考慮到時鐘不準確的情況下還可以進一步根據時鐘不準確的程度大小選擇最合適的校準方式,考慮到計數器校準的精度要比直接用軟體寫寄存器校準的精度高,但速度慢,所以誤差大的情況可以選用軟體校準,誤差小的情況時選用計數器校準。 In this embodiment, considering the inaccuracy of the clock, the most appropriate calibration method can be further selected according to the degree of the clock inaccuracy. Considering that the accuracy of counter calibration is higher than that of directly writing register calibration with software, but the speed is slow, software calibration can be selected when the error is large, and counter calibration can be selected when the error is small.
具體的,在第二時鐘偏差值介於第二閾值與第三閾值時表示時鐘不準確的程度比較大,通過軟體調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值;在第二時鐘偏差值介於第三閾值與第四閾值時表示時鐘偏差程度小,通過計數器調整寄存器的輸出值,使得各個調節子模組輸出目標電流輸出值。 Specifically, when the second clock deviation value is between the second threshold value and the third threshold value, it indicates that the clock is relatively inaccurate. The output value of the register is adjusted by the software so that each regulating submodule outputs the target current output value. When the second clock deviation value is between the third threshold value and the fourth threshold value, it indicates that the clock deviation is small. The output value of the register is adjusted by the counter so that each regulating submodule outputs the target current output value.
在一些實施例中,第一MOS電晶體與各個調節子模組中的第三MOS電晶體之間的寬長比兩兩之間各不相同。 In some embodiments, the width-to-length ratios between the first MOS transistor and the third MOS transistor in each regulating submodule are different from each other.
第一MOS電晶體與第三MOS電晶體構成共閘共源的電流鏡,第一MOS電晶體的輸出電流與第三MOS電晶體的輸出電流之間的比例由二者的寬長比決定,在本實施例中,第一MOS電晶體與各個調節子 模組中的第三MOS電晶體之間的寬長比兩兩之間各不相同,因此通過改變第二控制模組輸出的電流調節值能夠實現對振盪電路的輸入電流不同程度的調節,調節方式更加靈活,調節範圍更大。 The first MOS transistor and the third MOS transistor form a common gate and common source current mirror. The ratio between the output current of the first MOS transistor and the output current of the third MOS transistor is determined by the width-to-length ratio of the two. In this embodiment, the width-to-length ratios between the first MOS transistor and the third MOS transistor in each regulating sub-module are different from each other. Therefore, by changing the current regulation value output by the second control module, the input current of the oscillation circuit can be regulated to different degrees, and the regulation method is more flexible and the regulation range is larger.
在一些實施例中,振盪電路包括第一反相器、第二反相器及M個振盪子電路,振盪子電路包括第四MOS電晶體與第五MOS電晶體,M為正整數。 In some embodiments, the oscillator circuit includes a first inverter, a second inverter, and M oscillator circuits, the oscillator circuit includes a fourth MOS transistor and a fifth MOS transistor, and M is a positive integer.
振盪子電路的輸入端為振盪電路的輸入端,振盪子電路的輸出端與第一反相器的輸入端連接,第一反相器的輸出端與第二反相器的輸入端連接,第二反相器的輸出端為振盪電路的輸出端。 The input end of the oscillator circuit is the input end of the oscillator circuit, the output end of the oscillator circuit is connected to the input end of the first inverter, the output end of the first inverter is connected to the input end of the second inverter, and the output end of the second inverter is the output end of the oscillator circuit.
M個振盪子電路中的第五MOS電晶體的輸入端相互連接且連接的公共端為振盪子電路的輸入端,第四MOS電晶體的控制端與第五MOS電晶體的控制端連接且連接的公共端為振盪子電路的第一端,第四MOS電晶體的汲極與第五MOS電晶體的汲極連接且連接的公共端為振盪子電路的第二端,M個振盪子電路的第一端與第二端依次串聯,串聯後的電路的兩端連接且連接的公共端為振盪子電路的輸出端。 The input ends of the fifth MOS transistors in the M oscillator circuits are connected to each other and the common end is the input end of the oscillator circuit. The control end of the fourth MOS transistor is connected to the control end of the fifth MOS transistor and the common end is the first end of the oscillator circuit. The drain of the fourth MOS transistor is connected to the drain of the fifth MOS transistor and the common end is the second end of the oscillator circuit. The first end and the second end of the M oscillator circuits are connected in series in sequence. The two ends of the series circuits are connected and the common end is the output end of the oscillator circuit.
請參照圖5,圖5為本發明提供的一種調節模組的電路圖,圖5中的MP1與MN1、MP2與MN2以及MP3與MN3分別構成3個振盪子電路,其中,MP1、MP2以及MP3為第四MOS電晶體,MN1、MN2以及MN3為第五MOS電晶體,INV1為第一反相器,INV2為第二反相器。 Please refer to FIG. 5, which is a circuit diagram of a regulating module provided by the present invention. In FIG. 5, MP1 and MN1, MP2 and MN2, and MP3 and MN3 respectively constitute three oscillator circuits, wherein MP1, MP2, and MP3 are fourth MOS transistors, MN1, MN2, and MN3 are fifth MOS transistors, INV1 is the first inverter, and INV2 is the second inverter.
本發明還提供了一種觸控顯示裝置,包括上述觸控晶片,還包括與觸控晶片連接的顯示螢幕。 The present invention also provides a touch display device, including the above-mentioned touch chip and a display screen connected to the touch chip.
對於本發明提供的一種觸控顯示裝置的相關介紹請參照上 述觸控晶片和觸控晶片的控制方法的實施例,在此不做贅述。 For the relevant introduction of the touch display device provided by the present invention, please refer to the above-mentioned embodiments of the touch chip and the control method of the touch chip, which will not be elaborated here.
本說明書中各個實施例採用遞進的方式描述,每個實施例重點說明的都是與其他實施例的不同之處,各個實施例之間相同相似部分互相參見即可。對於實施例公開的裝置而言,由於其與實施例公開的方法相對應,所以描述的比較簡單,相關之處參見方法部分說明即可。 Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For the relevant parts, please refer to the method part.
還需要說明的是,在本說明書中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個實體或操作區分開來,而不一定要求或者暗示這些實體或操作之間存在任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括要素的過程、方法、物品或者設備中還存在另外的相同要素。 It should also be noted that in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus including a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or apparatus. In the absence of more restrictions, the elements defined by the phrase "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or apparatus including the elements.
S1~S5:步驟S1~S5: Steps
Claims (16)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210826783.3A CN115097961B (en) | 2022-07-14 | 2022-07-14 | A clock calibration method for a touch chip, a touch chip, and a touch display device. |
| CN202210826783.3 | 2022-07-14 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202403521A TW202403521A (en) | 2024-01-16 |
| TWI837951B true TWI837951B (en) | 2024-04-01 |
Family
ID=83297640
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW111143829A TWI837951B (en) | 2022-07-14 | 2022-11-16 | Clock calibration method of touch chip, touch chip and touch display device |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN115097961B (en) |
| TW (1) | TWI837951B (en) |
| WO (1) | WO2024012436A1 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115097961B (en) * | 2022-07-14 | 2025-11-14 | 敦泰科技(深圳)有限公司 | A clock calibration method for a touch chip, a touch chip, and a touch display device. |
| CN116909351B (en) * | 2023-09-14 | 2023-12-19 | 深圳扬兴科技有限公司 | Clock chip internal clock precision correction method |
| CN118860061B (en) * | 2024-07-05 | 2025-02-25 | 广芯微电子(广州)股份有限公司 | A chip clock correction method, circuit, system, device and storage medium |
| CN119254568B (en) * | 2024-11-29 | 2025-02-14 | 深圳前海深蕾半导体有限公司 | Audio data transmission bus interface for abnormal time sequence processing |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104133577A (en) * | 2013-04-30 | 2014-11-05 | 乐金显示有限公司 | Display device with integrated touch screen and method of driving the same |
| TWI588701B (en) * | 2015-01-30 | 2017-06-21 | 樂金顯示科技股份有限公司 | Display device, and device and method for driving the same |
| US20190102020A1 (en) * | 2017-09-29 | 2019-04-04 | Japan Display Inc. | Detection apparatus and display apparatus |
| CN110568958A (en) * | 2019-08-30 | 2019-12-13 | 国微集团(深圳)有限公司 | Method for scanning touch screen by using intelligent DMA (direct memory access) and touch chip |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101247123A (en) * | 2007-10-24 | 2008-08-20 | 吴明星 | Single-chip system clock calibration method |
| WO2012096259A1 (en) * | 2011-01-14 | 2012-07-19 | シャープ株式会社 | Liquid crystal display device and drive method therefor |
| CN103513698B (en) * | 2012-06-29 | 2017-03-01 | 联想(北京)有限公司 | A kind of clock signal calibration, device and electronic equipment |
| CN103149970A (en) * | 2013-03-20 | 2013-06-12 | 珠海市杰理科技有限公司 | Clock calibration method and system |
| JP6208975B2 (en) * | 2013-05-07 | 2017-10-04 | シナプティクス・ジャパン合同会社 | Display driver IC |
| JP2015191120A (en) * | 2014-03-28 | 2015-11-02 | シナプティクス・ディスプレイ・デバイス合同会社 | display drive circuit |
| CN107256065B (en) * | 2017-07-14 | 2023-12-22 | 广东华芯微特集成电路有限公司 | Real-time clock processing system and method |
| CN108111166B (en) * | 2018-01-08 | 2024-05-28 | 深圳信息职业技术学院 | On-chip oscillator with self-calibration function and calibration method thereof |
| CN114285409A (en) * | 2020-09-28 | 2022-04-05 | 深圳英集芯科技股份有限公司 | A kind of chip clock frequency automatic calibration method and related device |
| CN113721702A (en) * | 2021-09-06 | 2021-11-30 | 合肥松豪电子科技有限公司 | Clock compensation method applied to externally-hung touch chip |
| CN115097961B (en) * | 2022-07-14 | 2025-11-14 | 敦泰科技(深圳)有限公司 | A clock calibration method for a touch chip, a touch chip, and a touch display device. |
-
2022
- 2022-07-14 CN CN202210826783.3A patent/CN115097961B/en active Active
- 2022-11-16 TW TW111143829A patent/TWI837951B/en active
-
2023
- 2023-07-11 WO PCT/CN2023/106731 patent/WO2024012436A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104133577A (en) * | 2013-04-30 | 2014-11-05 | 乐金显示有限公司 | Display device with integrated touch screen and method of driving the same |
| TWI588701B (en) * | 2015-01-30 | 2017-06-21 | 樂金顯示科技股份有限公司 | Display device, and device and method for driving the same |
| US20190102020A1 (en) * | 2017-09-29 | 2019-04-04 | Japan Display Inc. | Detection apparatus and display apparatus |
| CN110568958A (en) * | 2019-08-30 | 2019-12-13 | 国微集团(深圳)有限公司 | Method for scanning touch screen by using intelligent DMA (direct memory access) and touch chip |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115097961B (en) | 2025-11-14 |
| WO2024012436A1 (en) | 2024-01-18 |
| TW202403521A (en) | 2024-01-16 |
| CN115097961A (en) | 2022-09-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI837951B (en) | Clock calibration method of touch chip, touch chip and touch display device | |
| JP5132337B2 (en) | On-chip adaptive voltage compensation | |
| JP5147435B2 (en) | Digital adaptive voltage source | |
| US10204588B2 (en) | Temperature compensation circuit, display panel and temperature compensation method | |
| KR100888806B1 (en) | Semiconductor integrated circuit device | |
| US20090058543A1 (en) | Temperature detecting semiconductor device | |
| US20090196326A1 (en) | Semiconductor device | |
| US7834680B2 (en) | Internal voltage generation circuit for generating stable internal voltages withstanding varying external conditions | |
| JP6209978B2 (en) | Memory controller, information processing apparatus and reference voltage adjusting method | |
| US20220404847A1 (en) | On-chip resistor correction circuit | |
| CN108319319B (en) | LDO with automatic process and temperature adjustment | |
| CN106656162B (en) | Device characteristic aging self-adaptive control method and device | |
| US20230046522A1 (en) | Duty cycle detection circuit and duty cycle correction circuit including the same | |
| US20140333811A1 (en) | CMOS Charge Pump Circuit | |
| TWI818534B (en) | Voltage detection circuit and method for integrated circuit, and integrated circuit | |
| US20100194446A1 (en) | Source driver, delay cell implemented in the source driver, and calibration method for calibrating a delay time thereof | |
| TWI389449B (en) | Signal receiver and voltage compensation method | |
| US8004345B2 (en) | Minimizing non-linearity errors | |
| KR20060096118A (en) | Calibration of Integrated Circuits for Electronic Devices | |
| TW202403738A (en) | Memory device, voltage generating device and voltage generating method thereof | |
| CN118800725B (en) | Resistance trimming circuit of integrated circuit chip and control method thereof | |
| US20240072779A1 (en) | Jitter cancellation circuit | |
| JP2006211064A (en) | Characteristic adjustment circuit for logic circuit, its method, and semiconductor integrated circuit using it | |
| JP7547562B2 (en) | Temperature stabilization device with accelerated response to power supply fluctuations | |
| KR20240094527A (en) | Reference voltage generating device with temperature compensation |