
14
User’s Manual U12790EJ2V0UD
CHAPTER 5 CLOCK GENERATOR ................................................................................................. 110
5.1
Clock Generator Functions ............................................................................................. 110
5.2
Clock Generator Configuration ....................................................................................... 111
5.3
Clock Generator Control Registers ................................................................................ 112
5.4
System Clock Oscillator .................................................................................................. 114
5.4.1
System clock oscillator ..........................................................................................................
114
5.4.2
Incorrect resonator connection .............................................................................................
115
5.4.3
Divider ....................................................................................................................................
116
5.5
Clock Generator Operations ........................................................................................... 117
5.6
Changing System Clock and CPU Clock Settings ....................................................... 118
5.6.1
Time required for switchover between system clock and CPU clock .................................
118
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 0 ........................................................................... 119
6.1
Functions of 16-Bit Timer/Event Counter 0 .................................................................. 119
6.2
Configuration of 16-Bit Timer/Event Counter 0 ............................................................ 121
6.3
Registers Controlling 16-Bit Timer/Event Counter 0 ...................................................
124
6.4
Operation of 16-Bit Timer/Event Counter 0 ................................................................... 130
6.4.1
Operation as interval timer ....................................................................................................
130
6.4.2
Operation as external event counter ....................................................................................
132
6.4.3
Pulse width measurement .....................................................................................................
134
6.4.4
Square wave output operation ..............................................................................................
141
6.4.5
One-shot pulse output operation ..........................................................................................
142
6.4.6
PPG output operation ............................................................................................................
147
6.5
Program List ...................................................................................................................... 149
6.5.1
Interval timer ..........................................................................................................................
150
6.5.2
Pulse width measurement by free-running counter and one capture register ....................
151
6.5.3
Two-pulse-width measurement by free-running counter .....................................................
152
6.5.4
Pulse width measurement by restart ....................................................................................
154
6.5.5
PPG output .............................................................................................................................
155
6.6
Notes on 16-Bit Timer/Event Counter 0 ......................................................................... 156
CHAPTER 7 8-BIT TIMER/EVENT COUNTERS 50, 51 ................................................................... 161
7.1
Functions of 8-Bit Timer/Event Counters 50, 51 ..........................................................
161
7.2
Configuration of 8-Bit Timer/Event Counters 50, 51 ...................................................
163
7.3
Registers Controlling 8-Bit Timer/Event Counters 50, 51 ........................................... 165
7.4
Operations of 8-Bit Timer/Event Counters 50, 51 ........................................................ 170
7.4.1
Operation as interval timer (8-bit) .........................................................................................
170
7.4.2
Operation as external event counter ....................................................................................
174
7.4.3
Square-wave output operation (8-bit resolution) ..................................................................
175
7.4.4
8-bit PWM output operation ..................................................................................................
176
7.4.5
Operation as interval timer (16-bit) .......................................................................................
179
7.5
Program List ...................................................................................................................... 181
7.5.1
Interval timer (8-bit) ...............................................................................................................
181
7.5.2
External event counter ..........................................................................................................
182
7.5.3
Interval timer (16-bit) .............................................................................................................
183