电子工程世界电子工程世界电子工程世界

关键词

搜索

型号

搜索

AN2326

产品描述Calibrating the RC oscillator of the ST7ULTRALITE MCU using the mains
文件大小183KB,共20页
制造商ST(意法半导体)
官网地址http://www.st.com/
下载文档 全文预览

AN2326概述

Calibrating the RC oscillator of the ST7ULTRALITE MCU using the mains

文档预览

下载PDF文档
AN2326
Application note
Calibrating the RC oscillator of the
ST7ULTRALITE MCU using the mains
Introduction
The ST7ULTRALITE microcontroller contains an internal RC oscillator which can be
trimmed to a specific frequency with the required accuracy. The oscillator frequency has to
be calibrated by software using the RCCR register (RC Control Register) and the SICSR
register (System Integrity Control/Status Register). The value entered in the RCCR/SICSR
registers will switch ON a corresponding number of resistors that will modify the oscillator
frequency. Whenever the ST7ULTRALITE microcontroller is reset, the 10-bit value
contained in the RCCR/SICSR registers is restored to its default value (3FFh) i.e. the lower
possible frequency, so each time the device is reset, you have to load the calibration value in
the RCCR/SICSR registers. There are predefined calibration values stored in memory (refer
to the” Internal RC Oscillator Adjustment” section in the ST7ULTRALITE datasheet). You
can load one of these values in the RCCR/SICSR registers if one of the operating conditions
matches that in your application. Otherwise, you can define your own value, store it in non
volatile memory and load it in the RCCR/SICSR registers after each reset. However, if any
of the external conditions (temperature or voltage, for instance) changes too drastically, the
stored value may no longer produce the required accuracy. One solution is to recalculate the
RCCR/SICSR register values after each reset, based on an external reference.
The purpose of this application note is to present a software solution using the frequency of
the European standard mains (220V/50Hz) as a timebase to adjust the internal RC oscillator
of the ST7ULTRALITE to 8 MHz. The same approach can also be used for the US mains
standard (110V/60Hz).
The basic software takes less than 200 ms to calibrate the oscillator and uses less than128
bytes of program memory and five bytes of RAM for its simplest version. These RAM bytes
can be freed for other purposes when the calibration is done. Another example using
averages is given in this application note. This can be useful with noisy mains.
O
so
b
te
le
This application note also contains the diagram of a low cost circuit which converts the
mains into a 5 volt power supply and protects the microcontroller from overcurrent on the
input connected to the mains.
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
April 2006
Rev 1
1/20
www.st.com

技术资料推荐更多

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 大学堂 TI培训 Datasheet 电子工程 索引文件: 2380  44  590  1902  1523  48  1  12  39  31 

器件索引   0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved