15 THEORETICAL REGULATION (TR)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
15-1
(Rev. 1.0)
Theoretical Regulation (TR)
15
Overview
15.1
TR is a theoretical regulation function that theoretically corrects time clock errors due to deviation in oscillation
frequencies. The main features of TR are outlined below.
• Adjusts the OSC1A clock (32.768 kHz Typ.).
(Note that other oscillation clocks cannot be adjusted.)
• Adjustable range: -31/32,768 to +32/32,768 seconds in a correction operation
• Allows software to execute theoretical regulation at any time.
Figure 15.1.1 shows the configuration of TR.
Peripheral circuits that can use the regulated clock (F256) in this IC
• Real-time clock
• Clock timer
• 16-bit PWM timer
TR
Theoretical
regulation
control circuit
TRIM[5:0]
REGTRIG
REGFREQ
REGMONEN
Inter
nal data
bu
s
F256
(256 Hz)
F256 (256 Hz)
F1 (1 Hz)
RTC reset
To peripheral circuits
OSC1A
oscillator
(32.768 kHz)
Clock generator
OSC1A
divider
REGMON
1.1 TR Configuration
Figure 15.
Output Pin
15.2
Table 15.2.1 shows the TR output pin.
2.1 TR Output Pin
Table 15.
Pin name
I/O
*
Initial status
*
Function
REGMON
O
O (L)
Theoretical regulation clock monitor output
*
Indicates the status when the pin is configured for TR.
If the port is shared with the REGMON pin and other functions, the REGMON function must be assigned to the
port before starting the monitor output. For more information, refer to the “I/O Ports” chapter.
Operations
15.3
Executing Theoretical Regulation
15.3.1
Follow the sequences shown below to execute theoretical regulation.
1. Set the correction value to the TRCTL.TRIM[5:0] bits.
2. Generate interrupts in the theoretical regulation execution cycles using a timer to perform theoretical regulation
periodically.
3. Write 1 to the TRCTL.REGTRIG bit (using the interrupt handler in Step 2). (Execute theoretical regulation)