Chapter 9
16-bit Timer
IX - 66 1-Shot Output
9.10 1-Shot Output
9.10.1 1-Shot Output Operation
1-shot output is to count only one time at a certain period of time.
■ Setting One Shot Output
1-shot operation is set by setting the TM0NE flag of the timer mode register (TMnMD) to “1”. 1-shot operation
stops the timer by matching the binary counter and the timer compare/capture A register
■ Count Timing of One Shot Output (TMCLE flag= 0)
The binary counter stops at the next count clock after the value of the binary counter matches the value of the
compare/capture register, and the TMXF flag is set to “0”. The setting value of the binary counter is “setting + 1”
of the compare/capture register.
Figure:9.10.1 Count Timing of One Shot Output (TMCLE flag= 0)
■ Count Timing of One Shot Output (TMCLE flag= 1)
The binary counter stops operating at the next count clock after the binary and the compare/capture register
match, and the TMXF flag is set to “0”. The binary counter is cleared to 0x0000. Set the TMCNE flag to “1”
again after setting “0” to restart.
Figure:9.10.2 Count Timing of One Shot Output (TMCLE flag= 1)
TMnCNE
flag
TMnXF
flag
0003
00010000 0002 0003 0004
Count
clock
Compare/capture
register
Binary counter
TMnCNE
flag
TMnXF
flag
0003
0001 0002 0003 0000
Count
clock
Compare/capture
register
Binary counter