English
Language : 

UPD70F3793GC-UEU-AX Datasheet, PDF (489/1113 Pages) Renesas Technology Corp – RENESAS MCU V850ES/Jx3-L Microcontrollers
V850ES/JG3-L
CHAPTER 11 REAL-TIME COUNTER (μPD70F3792, 70F3793, 70F3841, 70F3842)
As shown in Figure 11-10, the watch can be accurately counted by incrementing the RC1SUBC count value, if a
positive error faster than 32.768 kHz occurs at the resonator. Similarly, if a negative error slower than 32.768 kHz
occurs at the resonator, the watch can be accurately counted by decrementing the RC1SUBC count value.
The RC1SUBC correction value is determined by using the RC1SUBU.F6 to RC1SUBU.F0 bits.
The F6 bit is used to determine whether to increment or decrement RC1SUBC and the F5 to F0 bits to determine
the RC1SUBC value.
(1) Incrementing the RC1SUBC count value
The RC1SUBC count value is incremented by the value set using the F5 to F0 bits, by setting the F6 bit to 0.
Expression for calculating the increment value: (F5 to F0 bit value − 1) × 2
[Example of incrementing the RC1SUBC count value: F6 bit = 0]
If 15H (010101B) is set to the F5 to F0 bits
(15H − 1) × 2 = 40 (increments the RC1SUBC count value by 40)
RC1SUBC count value = 32,768 + 40 = 32,808
(2) Decrementing the RC1SUBC count value
The RC1SUBC count value is decremented by an inverted value of the value set using the F5 to F0 bits, by
setting the F6 bit to 1.
Expression for calculating the decrement value: (Inverted value of F5 to F0 bit value + 1) × 2
[Example of decrementing the RC1SUBC count value: F6 bit = 1]
If 15H (010101B) is set to the F5 to F0 bits
Inverted data of 15H (010101B) = 2AH (101010B)
(2AH + 1) × 2 = 86 (decrements the RC1SUBC count value by 86)
RC1SUBC count value = 32,768 − 86 = 32,682
R01UH0165EJ0700 Rev.7.00
Sep 22, 2011
Page 489 of 1113