English
Language : 

TMP86CH12MG Datasheet, PDF (7/182 Pages) Toshiba Semiconductor – 8 Bit Microcontroller
9. 10-Bit Timer/Counter (TC7)
9.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
9.2 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
9.3 Configuring Control and Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
9.4 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
9.4.1 Programmable pulse generator output (PPG output) ............................................................................. 76
9.4.1.1 50% duty mode
9.4.1.2 Variable duty mode
9.4.1.3 PPG1/PPG2 independent mode
9.4.2 Starting a count....................................................................................................................................... 80
9.4.2.1 Command start and capture mode
9.4.2.2 Command start and trigger start mode
9.4.2.3 Trigger start mode
9.4.2.4 Trigger capture mode (CSTC = 00)
9.4.2.5 Trigger start/stop acceptance mode
9.4.3 Configuring how the timer stops ............................................................................................................. 87
9.4.3.1 Counting stopped with the outputs initialized
9.4.3.2 Counting stopped with the outputs maintained
9.4.3.3 Counting stopped with the outputs initialized at the end of the period
9.4.4 One-time/continuous output mode.......................................................................................................... 87
9.4.4.1 One-time output mode
9.4.4.2 Continuous output mode
9.4.5 PPG output control (Initial value/output logic, enabling/disabling output) ............................................... 89
9.4.5.1 Specifying initial values and output logic for PPG outputs
9.4.5.2 Enabling or disabling PPG outputs
9.4.5.3 Using the TC7 as a normal timer/counter
9.4.6 Eliminating noise from the TC7 pin input ................................................................................................ 89
9.4.7 Interrupts................................................................................................................................................. 91
9.4.7.1 INTTC7T (Trigger start interrupt)
9.4.7.2 INTTC7P (Period interrupt)
9.4.7.3 INTEMG (Emergency output stop interrupt)
9.4.8 Emergency PPG output stop feature ...................................................................................................... 92
9.4.8.1 Enabling/disabling input on the EMG pin
9.4.8.2 Monitoring the emergency PPG output stop state
9.4.8.3 EMG interrupt
9.4.8.4 Canceling the emergency PPG output stop state
9.4.8.5 Restarting the timer after canceling the emergency PPG output stop state
9.4.8.6 Response time between EMG pin input and PPG outputs being initialized
9.4.9 TC7 operation and microcontroller operating mode ............................................................................... 94
10. 16-Bit TimerCounter 1 (TC1)
10.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
10.2 TimerCounter Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.3 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
10.3.1 Timer mode........................................................................................................................................... 98
10.3.2 External Trigger Timer Mode .............................................................................................................. 100
10.3.3 Event Counter Mode ........................................................................................................................... 102
10.3.4 Window Mode ..................................................................................................................................... 103
10.3.5 Pulse Width Measurement Mode........................................................................................................ 104
10.3.6 Programmable Pulse Generate (PPG) Output Mode ......................................................................... 107
11. 8-Bit TimerCounter (TC3, TC4)
11.1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.2 TimerCounter Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.3 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.3.1 8-Bit Timer Mode (TC3 and 4) ............................................................................................................ 117
11.3.2 8-Bit Event Counter Mode (TC3, 4) .................................................................................................... 118
11.3.3 8-Bit Programmable Divider Output (PDO) Mode (TC3, 4)................................................................. 118
11.3.4 8-Bit Pulse Width Modulation (PWM) Output Mode (TC3, 4).............................................................. 121
111
112
117
iii