![](http://datasheet.mmic.net.cn/230000/7721_datasheet_15568108/7721_10.png)
7721 Group User’s Manual
iii
Table of contents
CHAPTER 8 TIMER A
8.1 Overview ..................................................................................................................................8-2
8.2 Block description .................................................................................................................. 8-3
8.2.1 Counter and reload register (timer Ai register) ......................................................... 8-4
8.2.2 Count start register........................................................................................................ 8-5
8.2.3 Timer Ai mode register ................................................................................................. 8-6
8.2.4 Timer Ai interrupt control register ............................................................................... 8-7
8.2.5 Port P5 direction register ............................................................................................. 8-8
8.3 Timer mode ............................................................................................................................ 8-9
8.3.1 Setting for timer mode ................................................................................................ 8-11
8.3.2 Count source ................................................................................................................ 8-13
8.3.3 Operation in timer mode............................................................................................. 8-14
8.3.4 Selectable functions .................................................................................................... 8-15
[Precautions for timer mode]................................................................................................ 8-17
8.4 Event counter mode ........................................................................................................... 8-18
8.4.1 Setting for event counter mode ................................................................................. 8-21
8.4.2 Operation in event counter mode.............................................................................. 8-23
8.4.3 Switching between countup and countdown ............................................................ 8-24
8.4.4 Selectable functions .................................................................................................... 8-25
[Precautions for event counter mode]................................................................................. 8-28
8.5 One-shot pulse mode......................................................................................................... 8-29
8.5.1 Setting for one-shot pulse mode ............................................................................... 8-31
8.5.2 Count source ................................................................................................................ 8-33
8.5.3 Trigger........................................................................................................................... 8-34
8.5.4 Operation in one-shot pulse mode ............................................................................ 8-35
[Precautions for one-shot pulse mode] ............................................................................... 8-37
8.6 Pulse width modulation (PWM) mode ............................................................................ 8-38
8.6.1 Setting for PWM mode ............................................................................................... 8-40
8.6.2 Count source ................................................................................................................ 8-42
8.6.3 Trigger........................................................................................................................... 8-42
8.6.4 Operation in PWM mode ............................................................................................ 8-43
[Precautions for PWM mode] ............................................................................................... 8-47
CHAPTER 9 TIMER B
9.1 Overview ..................................................................................................................................9-2
9.2 Block description .................................................................................................................. 9-2
9.2.1 Counter and reload register (timer Bi register) ......................................................... 9-3
9.2.2 Count start register........................................................................................................ 9-4
9.2.3 Timer Bi mode register ................................................................................................. 9-5
9.2.4 Timer Bi interrupt control register ............................................................................... 9-6
9.2.5 Port P5 direction register ............................................................................................. 9-7
9.3 Timer mode ............................................................................................................................ 9-8
9.3.1 Setting for timer mode ................................................................................................ 9-10
9.3.2 Count source ................................................................................................................ 9-11
9.3.3 Operation in timer mode............................................................................................. 9-12
[Precautions for timer mode]................................................................................................ 9-13
9.4 Event counter mode ........................................................................................................... 9-14
9.4.1 Setting for event counter mode ................................................................................. 9-16
9.4.2 Operation in event counter mode.............................................................................. 9-17
[Precautions for event coutner mode]................................................................................. 9-18