xi
5.3
5.4
5.5
5.6
5.7
Timebase Timer Control Register (TBTC) ......................................................................................... 164
Timebase Timer Interrupt .................................................................................................................. 166
Operation of the Timebase Timer ...................................................................................................... 167
Notes on Using the Timebase Timer ................................................................................................. 169
Program Example of the Timebase Timer ......................................................................................... 171
CHAPTER 6
6.1
6.2
6.3
6.4
6.5
6.6
WATCHDOG TIMER ................................................................................. 173
Overview of the Watchdog Timer ...................................................................................................... 174
Configuration of the Watchdog Timer ................................................................................................ 175
Watchdog Timer Control Register (WDTC) ....................................................................................... 177
Operation of the Watchdog Timer ...................................................................................................... 179
Notes on Using the Watchdog Timer ................................................................................................. 181
Program Example of the Watchdog Timer ......................................................................................... 182
CHAPTER 7
7.1
7.2
7.3
7.4
7.5
7.6
7.7
WATCH PRESCALER .............................................................................. 185
Overview of the Watch Prescaler ...................................................................................................... 186
Configuration of the Watch Prescaler ................................................................................................ 188
Watch Prescaler Control Register (WPCR) ....................................................................................... 190
Watch Prescaler Interrupt .................................................................................................................. 192
Operation of the Watch Prescaler ...................................................................................................... 193
Notes on Using the Watch Prescaler ................................................................................................. 195
Program Example of the Watch Prescaler ......................................................................................... 196
CHAPTER 8
8.1
8.2
8.3
8.4
8.4.1
8.4.2
8.4.3
8.4.4
8.5
8.6
8.7
8.8
8.9
8.10 Status of the 8/16-bit Timer/Counter in Each Mode ........................................................................... 228
8.11 Notes on Using the 8/16-bit Timer/Counter ....................................................................................... 229
8/16-BIT TIMER/COUNTER ...................................................................... 199
Overview of the 8/16-bit Timer/Counter ............................................................................................. 200
Configuration of the 8/16-bit Timer/Counter ...................................................................................... 203
Pins of the 8/16-bit Timer/Counter ..................................................................................................... 205
Registers of the 8/16-bit Timer/Counter ............................................................................................. 207
Timer 1 Control Register (T1CR) .................................................................................................. 208
Timer 2 Control Register (T2CR) .................................................................................................. 211
Timer 1 Data Register (T1DR) ...................................................................................................... 214
Timer 2 Data Register (T2DR) ...................................................................................................... 216
8/16-bit Timer/Counter Interrupts ....................................................................................................... 218
Operation of the Interval Timer Function ........................................................................................... 220
Operation of the Counter Function .................................................................................................... 222
Operation of the Square Wave Output Initial Setting Function .......................................................... 225
Operation of Stopping and Restarting the 8/16-bit Timer/Counter .................................................... 227
CHAPTER 9
9.1
9.2
9.3
9.4
9.4.1
9.4.2
9.5
16-BIT TIMER/COUNTER ......................................................................... 233
Overview of the 16-bit Timer/Counter ................................................................................................ 234
Configuration of the 16-bit Timer/Counter ......................................................................................... 236
Pin of the 16-bit Timer/Counter ......................................................................................................... 238
Registers of the 16-bit Timer/Counter ................................................................................................ 239
Timer Control Register (TMCR) .................................................................................................... 240
16-bit Timer Count Register (TCR) ............................................................................................... 242
16-bit Timer/Counter Interrupts .......................................................................................................... 243