EasyManuals Logo
Home>Renesas>Computer Hardware>RL78/D1A

Renesas RL78/D1A User Manual

Renesas RL78/D1A
1879 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #715 background imageLoading...
Page #715 background image
RL78/F13, F14 CHAPTER 9 REAL-TIME CLOCK
R01UH0368EJ0210 Rev.2.10 683
Dec 10, 2015
9.4.6 Example of watch error correction of real-time clock
The watch can be corrected with high accuracy when it is slow or fast, by setting a value to the 16-bit watch error
correction register (SUBCUDW).
(1) Example of calculating the correction value
The correction value used when correcting the count value of the internal counter (16 bits) is calculated by using the
following expression.
Set the DEV bit to 0 when the correction range is 4165.6 ppm or less, or 4165.6 ppm or more.
(When DEV = 0)
Correction value
Note
= Number of correction counts in 1 minute 3 = (Oscillation frequency Target frequency 1)
32768 60 3
(When DEV = 1)
Correction value
Note
= Number of correction counts in 1 minute = (Oscillation frequency Target frequency 1)
32768 60
Note The correction value is the watch error correction value calculated by using bits 12 to 0 of the 16-bit watch error
correction register (SUBCUDW).
(When F12 = 0) Correction value = {(F11, F10, F9, F8, F7, F6, F5, F4, F3, F2, F1, F0) 1} 2
(When F12 = 1) Correction value = {(/F11, /F10, /F9, /F8, /F7, /F6, /F5, /F4, /F3, /F2, /F1, /F0) + 1} 2
When (F12, F11, F10, F9, F8, F7, F6, F5, F4, F3, F2, F1, F0) is (*, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *), watch error
correction is not performed. “*” is 0 or 1.
/F11 to /F0 are bit-inverted values (000000000011 when 111111111100).
Remarks 1. The correction value is 2, 4, 6, 8, … 8186, 8188 or 2, 4, 6, 8, … 8186, 8188.
2. The oscillation frequency is the input clock (f
RTC).
It can be calculated from the output frequency of the RTC1HZ pin 32768 when the 16-bit watch error
correction register (SUBCUDW) is set to its initial value (0000H).
3. The target frequency is the frequency resulting after correction performed by using the 16-bit watch error
correction register (SUBCUDW).

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RL78/D1A and is the answer not in the manual?

Renesas RL78/D1A Specifications

General IconGeneral
BrandRenesas
ModelRL78/D1A
CategoryComputer Hardware
LanguageEnglish

Related product manuals