![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_114.png)
7540 Group User
’
s Manual
APPLICATION
2-39
2.3 Timer 1
2.3.3 Timer 1 operation description
Timer 1 always operates in the timer mode.
Prescaler 1 counts the selected count source. Each time the count clock is input, the contents of Prescaler
1 is decremented by 1.
When the contents of Prescaler 1 reach
“
00
16
”
, an underflow occurs at the next count clock, and the
prescaler 1 latch is reloaded into Prescaler 1 and count continues. The division ratio of Prescaler 1 is 1/
(n+1) provided that the value of Prescaler 1 is n.
The contents of Timer 1 is decremented by 1 each time the underflow signal of Prescaler 1 is input. When
the contents of Timer 1 reach
“
00
16
”
, an underflow occurs at the next count clock, and the timer 1 latch
is reloaded into Timer 1 and count continues. The division ratio of Timer 1 is 1/(m+1) provided that the
value of Timer 1 is m. Accordingly, the division ratio of Prescaler 1 and Timer 1 is provided as follows that
the value of Prescaler 1 is n and the value of Timer 1 is m.
1
(n+1)
(m+1)
Timer 1 cannot stop counting by software.
Also, when timer 1 underflows, the timer 1 interrupt request bit is set to
“
1
”
.
2.3.4 Notes on timer 1
Note on using timer 1 is described below.
(1) Notes on set of the oscillation stabilizing time
Timer 1 can be used to set the oscillation stabilizing time after release of the
STP
instruction. The
oscillation stabilizing time after release of
STP
instruction can be selected from
“
set automatically
”
/
“
not set automatically
”
by the oscillation stabilizing time set bit after release of the
STP
instruction
of MISRG. When
“
0
”
is set to this bit,
“
01
16
”
is set to timer 1 and
“
FF
16
”
is set to prescaler 1
automatically. When
“
1
”
is set to this bit, nothing is set to timer 1 and prescaler 1. Therefore, set the
wait time according to the oscillation stabilizing time of the oscillation. Also, when timer 1 is used,
set values again to timer 1 and prescaler 1 after system is returned from the stop mode.
Division ratio =