vii
CHAPTER 7 8-BIT PWM TIMER ................................................................................... 135
7.1 Overview of 8-bit PWM Timer ................................................................. ........................................ 136
7.2 Configuration of 8-bit PWM Timer .................................................................................................. 139
7.3 Pin of 8-bit PWM Timer ............................................................................................... .................... 141
7.4 Registers of 8-bit PWM Timer ..................................................................................... .................... 142
7.4.1 PWM Control Register (CNTR) ............................................................................................. . .. . 143
7.4.2 PWM Compare Register (COMR) ............................................................................................. 145
7.5 Interrupt of 8-bit PWM Timer .......................................................................................................... 147
7.6 Operations of the Interval Timer Functions .......................................................................... ........... 148
7.7 Operations of the 8-bit PWM Timer Functions ..................................................................... ........... 150
7.8 States in Each Mode During Operation .......................................................................................... 152
7.9 Notes on Using 8-bit PWM Timer ................................................................................................... 155
7.10 Program Example for PWM Timer .................................................................................................. 157
CHAPTER 8 8/16-BIT CAPTURE TIMER/COUNTER ................................................... 161
8.1 Overview of 8/16-bit Capture Timer/Counter ................. ................................................................. 162
8.2 Configuration of 8/16-bit Capture Timer/Counter .............................................................. .............. 166
8.3 Pins of 8/16-bit Capture Timer/Counter ..................... ..................................................................... 168
8.4 Registers of 8/16-bit Capture Timer/Counter .................................................... ... ........................... 170
8.4.1 Capture Control Register (TCCR ) ...................................................................... ....................... 171
8.4.2 Timer 0 Control Register (TCR0 ) ............................................................................................... 173
8.4.3 Timer 1 Control Register (TCR1 ) ............................................................................................... 175
8.4.4 Timer Output Control Regist er (TCR2) ...................................................................................... 177
8.4.5 Timer 0 Data Register (TDR0) ................................................................................................... 178
8.4.6 Timer 1 Data Register (TDR1) ................................................................................................... 180
8.4.7 Capture Data Registers H and L (TCPH and TCPL) ................................................................. 182
8.5 8/16-bit Capture Timer/Counter of Interrupts ................................................. ... ... .... ... ... ... .............. 183
8.6 Explanation of Operations of Interval Timer Functions ............................................... ... ................. 185
8.7 Operation of Counter Functions ............................................................................................... ....... 189
8.8 Functions of Operations of Capture Functions ............................................................................... 193
8.9 8/16-bit Capture Timer/Counter Operation in Each Mode .............................................................. 197
8.10 Notes on Using 8/16-bit Capture Timer/Counter ............................................................................ 198
8.11 Program Example for 8/16-bit Capture Timer/Counter ................................................................... 200
CHAPTER 9 12-BIT PPG TIMER .................................................................................. 205
9.1 Overview of 12-bit PPG Timer .......................... .............................................................................. 206
9.2 Configuration of 12-bit PPG Timer Circuit ...................................................................................... 209
9.3 Pin of 12-bit PPG Timer .......................................................................... ........................................ 211
9.4 Registers of 12-bit PPG Timer ................................................................................. ....................... 213
9.4.1 12-bit PPG Control Register 1 (RCR21) .................................................................................... 214
9.4.2 12-bit PPG Control Register 2 (RCR22) .................................................................................... 215
9.4.3 12-bit PPG Control Register 3 (RCR23) .................................................................................... 216
9.4.4 12-bit PPG Control Register 4 (RCR24) .................................................................................... 218
9.5 Operations of 12-bit PPG Timer Functions ....................................................... .............................. 219
9.6 Notes on Using 12-bit PPG Timer .................................................................................................. 221
9.7 Program Example for 12-bit PPG Timer ........................ ................................................................. 223