数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN3133 数据表(PDF) 7 Page - STMicroelectronics

部件名 AN3133
功能描述  A real-time clock is a computer clock that keeps track of the current time
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN3133 数据表(HTML) 7 Page - STMicroelectronics

Back Button AN3133 Datasheet HTML 3Page - STMicroelectronics AN3133 Datasheet HTML 4Page - STMicroelectronics AN3133 Datasheet HTML 5Page - STMicroelectronics AN3133 Datasheet HTML 6Page - STMicroelectronics AN3133 Datasheet HTML 7Page - STMicroelectronics AN3133 Datasheet HTML 8Page - STMicroelectronics AN3133 Datasheet HTML 9Page - STMicroelectronics AN3133 Datasheet HTML 10Page - STMicroelectronics AN3133 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 43 page
background image
AN3133
Real-time clock overview
Doc ID 16956 Rev 5
7/43
The STM8L/STM8AL RTC calendar is provided in BCD format: this saves from having to
perform binary to BCD software conversion routines, which use significant program memory
space and CPU-time that may be critical in certain real-time applications.
Figure 2.
Example of calendar display on an LCD
1.1.1
Sub-seconds
Sub-second values are read from RTC registers RTC_SSRH and RTC_SSRL.
The sub-seconds field is adjustable and can be up to 0xFFFF, or 65535 in decimal,
depending on the value set on RTC_SSRH and RTC_SSRL.
SSSS[15:0] (included in RTC_SSRH/RTC_SSRL) is the value in the synchronous
prescaler’s counter. Given that this counter continually counts down to zero and then
reloads the value from RTC_SPRE[14:0], following is the formula for calculating the fraction
of a second:
Second fraction = (PREDIV_S – SS) / (PREDIV_S + 1)
For example: If RTC_SPRE[14:0] = 0x7FFF, then calendar sub-seconds SS starts
downcounting from 0x7FFF to 0. which means that the sub-second resolution is equal to
1/(PREDIV_S + 1) = 30.517578125 µs.
Note:
1
The sub-seconds field can be up to 0xFFFF when using the “shift control” feature, by adding
0x7FFF sub-second fractions.
2
SS can be larger than RTC_SPRE only after a shift operation. In this case, the “second
fraction” is negative which (intuitively) indicates that the correct time/date is at least a
second less than indicated by RTC_TRx/RTC_DRx.
1.1.2
Fine RTC calendar adjustments
For accurate RTC adjustments, a “shift control” feature enables the user to add/subtract a
number of sub-seconds to/from the current calendar.
The shift is used to synchronize the RTC to a master clock: SS[15:0] (included in
RTC_SSRH/RTC_SSRL) can be read with RTCCLK/PREDIV_A resolution, and a correction
can be applied with RTCCLK/(PREDIV_A+1).
The number of sub-seconds that can be added is “1s– n” and the number of sub-seconds
that can be subtracted is “–n” (where n can be up to 32767 (0x7FFF) sub-seconds).
RTC calendar adjustment examples
If RTC_SPRE[14:0] = 1023, RTC_APRE = 31 and RTC current calendar time is 3h, 25mn,
32s and SS = 511, the calendar time is read as 3h, 25mn, 32s and 500ms (03h25’32’’500)
since (1023–511)*32/32768 = 500 ms.
11:15:28 PM
WED NOV 19 2010



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com