黃蘇芳
摘? 要:針對目前批量RTC常溫校正流程復(fù)雜、精度低、每個廠家都要獨立設(shè)計一套等問題,筆者提出在芯片燒寫階段,由燒寫器完成RTC校正工作。這種方法的采用使得廠家不需要為RTC常溫校正專門設(shè)計一套軟件或?qū)iT購置一套工具,就可以滿足低成本、快速量產(chǎn)的需要。
關(guān)鍵詞:RTC;燒寫器;批量常溫補償
中圖分類號:TN98? ? ? 文獻標識碼:A 文章編號:2096-4706(2019)01-0030-03
Design and Implementation of RTC Correction Tool Based on Programmer
HUANG Sufang
(Hangzhou Vango Technologies,Inc,Hangzhou? 310000,China)
Abstract:In order to solve the problems of complex process,low precision and independent design for each manufacturer of batch RTC at room temperature correction,the author proposes that RTC correction should be completed by programmer in the chip burning stage. The adoption of this method makes it possible for the manufacturer to meet the needs of low cost and fast mass production without designing a set of software or purchasing a set of tools for RTC normal temperature calibration.
Keywords:RTC;programmer;batch normal temperature compensation
1? 校正原理
1.1? 晶振特性簡介
本文所介紹的RTC校正方法所涉及的數(shù)據(jù)與公式,均根據(jù)我們所使用的日本精工的晶體VT-200-F得到。
1.2? 晶體的振蕩頻率-溫度特性
根據(jù)音叉型石英晶體的振蕩頻率與溫度之間存在的關(guān)系(如圖1所示),在頂點溫度(即25℃)時,晶體的振蕩頻率偏差最小。溫度偏離頂點溫度越遠,則晶體的振蕩頻率偏差越大。晶體的振蕩頻率偏移率(ppm)與溫度之間存在如下關(guān)系:
1.3? 測溫度
目標芯片自帶溫度傳感器,可以測試溫度Tosc,但是由于芯片生產(chǎn)工藝偏差,每個芯片都存在差異,該Tosc與實際晶體溫度T存在常溫偏移。
2? 校正方案
根據(jù)式(2)可知,我們的主要目標是要獲取ΔT和Δftem,可以根據(jù)式(5)和式(6)計算。也就是說常溫(15℃至35℃)RTC校正目的就是獲取溫度的常溫偏移和標準秒脈沖的常溫頻率偏移率。其它條件都是已知的。
在常溫下,開啟目標芯片高精度秒脈沖輸出(未校正前),標準秒脈沖輸出比對。使用高頻工作的MCU(比如48M)的32位定時器分別捕獲目標芯片秒脈沖和標準秒脈沖。得到對應(yīng)的秒脈沖的捕獲值N0和Nosc,帶入式(9),得到。將和獲取到的標準環(huán)境溫度T帶入式(6),計算Δftem。……