Lucent Technologies MN10285K Benutzerhandbuch

Seite von 338
Timers
16-Bit Timer Setup Examples
Panasonic  Semiconductor  Development  Company
MN102H75K/F75K/85K/F85K LSI User Manual
116
Panasonic
To service the interrupts:
Run the interrupt service routine. The routine must determine the interrupt group, 
then clear the interrupt request flag.
Timer 5 can input a two-phase encoder signal. 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
.
Table 4-5 shows the count direction for the timing diagram in figure 4-46. In 
down counting, when the binary counter reaches 0, it loops to the value in 
TM5CA. An interrupt B occurs when the contents of TM5BC match those of 
TM5CB.
Table 4-5 Count Direction for 1x Two-Phase Encoder Timing Example
Up Counting
Down Counting
TM5IA
TM5IB
1
1
Figure 4-46 1x Two-Phase Encoder Input Timing (Timer 5)
TM5CA
TM5CB
TM5BC
TM5IA
TM5IB
Interrupts
0000
1FFF
1FFE
1FFD
1FFE
1FFF
1FFF
0000
0001
0FFF
1000
1000
1001
B
A
A