Lucent Technologies MN10285K User Manual

Page of 338
Timers
16-Bit Timer Setup Examples
Panasonic  Semiconductor  Development  Company
MN102H75K/F75K/85K/F85K LSI User Manual
124
Panasonic
TM5CA (example)
x’00FE94’
3.
Set the TM5NLD bit of the TM5MD register to 1 and the TM5EN bit to 0. 
This enables TM5BC and the S-R flip-flop. This step ensures stable opera-
tion. If it is omitted, the binary counter may not count the first cycle.
4.
Set TM5NLD and TM5EN to 1. This starts the timer. Counting begins at the 
start of the next cycle.
From this point on, whenever the TM5IC signal is high, timer 5 will be reset 
asynchronously. This is an easy way to synchronize the microcontroller operation 
with an external event. You can use it to adjust motor speed or to initialize the 
timers through the hardware.
Timer 5 does not operate in STOP mode, when B
OSC
 is off. If you use an external 
clock, it must be synchronized to B
OSC
.
Figure 4-53 shows an example timing chart.
Bit:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TM5
CA15
TM5
CA14
TM5
CA13
TM5
CA12
TM5
CA11
TM5
CA10
TM5
CA9
TM5
CA8
TM5
CA7
TM5
CA6
TM5
CA5
TM5
CA4
TM5
CA3
TM5
CA2
TM5
CA1
TM5
CA0
Setting:
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
Figure 4-53 External Reset Control Timing (Timer 5)
TM5BC
B
OSC
/4
TM5IC
0000
0001
0003
0002
0001
0000
0002
0004
0003