Precautions - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

15 CLOCK TIMER (CT)

15.7 Precautions

• Before the clock timer can start counting, the OSC1 oscillator must be turned on.
• To avoid occurrence of unnecessary interrupts, be sure to reset the interrupt flags in the CT_IFLG register before
the clock timer interrupt is enabled using the CT_IMSK register.
• The clock timer is actually made to Run/Stop in sync with the falling edge of the 256 Hz signal after writing to
CTRUN (D0/CT_CTL register). Therefore, when 0 is written to the CTRUN, the timer stops after the counter is
incremented. The CTRUN maintains 1 for reading until the timer actually enters Stop status.
Figure 15.7.1 shows the timer operation at start/stop.
• If the slp instruction is executed while the clock timer is running (CTRUN = 1), the clock timer will be unstable
immediately after SLEEP status is canceled. Therefore, the clock timer should be stopped (CTRUN = 0) before
the slp instruction is executed to enter SLEEP mode.
• If the counter register is read while the counter is running, the read value may not represent the current counter
value (an indefinite value may be read out).
To obtain the counter value, read the counter register after stopping the counter. Or read the counter value twice
to determine that both read results are the same and that the read value is significant.
15-12
256 Hz
CTRUN(RD)
CTRUN(WR)
CT_CNT register
0x57
Figure 15.7.1 Clock Timer Start/Stop Operation
0x58 0x59 0x5a 0x5b
EPSON
0x5c
S1C17704 TECHNICAL MANUAL

Advertisement

Table of Contents
loading

Table of Contents