Precautions - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

16.8 Precautions

• Before the stopwatch 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 SWT_IFLG register
before the stopwatch timer interrupt is enabled using the SWT_IMSK register.
• The Stopwatch timer is actually made to Run/Stop in sync with the falling edge of the 256 Hz signal after writing
to SWTRUN. Therefore, when 0 is written to the SWTRUN, the timer stops after the counter is incremented. The
SWTRUN maintains 1 for reading until the timer actually enters Stop status.
Figure 16.8.1 shows the timer operation at start/stop.
SWT_BCNT register
• If the slp instruction is executed while the stopwatch timer is running (SWTRUN = 1), the stopwatch timer
will be unstable immediately after SLEEP status is canceled. Therefore, the stopwatch timer should be stopped
(SWTRUN = 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.
S1C17704 TECHNICAL MANUAL
256 Hz
SWTRUN(RD)
SWTRUN(WR)
27
Figure 16.8.1 Stopwatch Timer Start/Stop Operation
EPSON
16 STOPWATCH TIMER (SWT)
28
29
30
31
32
16-13

Advertisement

Table of Contents
loading

Table of Contents