13
User’s Manual U12697EJ4V1UD
4.4.1
Main system clock oscillator .....................................................................................................
97
4.4.2
Subsystem clock oscillator ........................................................................................................
98
4.4.3
Examples of incorrect resonator connection .............................................................................
99
4.4.4
Frequency divider ..................................................................................................................... 100
4.4.5
When subsystem clock is not used ........................................................................................... 100
4.5
Clock Generator Operations ................................................................................................ 101
4.5.1
Main system clock operations ................................................................................................... 102
4.5.2
Subsystem clock operations ..................................................................................................... 103
4.6
Changing System Clock and CPU Clock Settings ............................................................. 103
CHAPTER 5 PORT FUNCTIONS ....................................................................................................... 105
5.1
Digital I/O Ports ..................................................................................................................... 105
5.2
Port Configuration ................................................................................................................ 107
5.2.1
Port 0 ........................................................................................................................................ 107
5.2.2
Port 1 ........................................................................................................................................ 109
5.2.3
Port 2 ........................................................................................................................................ 110
5.2.4
Port 3 ........................................................................................................................................ 114
5.2.5
Port 4 ........................................................................................................................................ 116
5.2.6
Port 5 ........................................................................................................................................ 118
5.2.7
Port 6 ........................................................................................................................................ 120
5.2.8
Port 7 ........................................................................................................................................ 124
5.2.9
Port 12 ...................................................................................................................................... 127
5.2.10
Port 13 ...................................................................................................................................... 128
5.3
Control Registers .................................................................................................................. 129
5.4
Operations ............................................................................................................................. 134
5.4.1
Writing to I/O port ...................................................................................................................... 134
5.4.2
Reading from I/O port ............................................................................................................... 134
5.4.3
Operations on I/O port .............................................................................................................. 134
CHAPTER 6 REAL-TIM OUTPUT FUNCTION ................................................................................. 135
6.1
Function ................................................................................................................................. 135
6.2
Configuration ........................................................................................................................ 135
6.3
Control Registers .................................................................................................................. 138
6.4
Operation ............................................................................................................................... 140
6.5
Usage of Real-Time Output Function ................................................................................. 141
6.6
Cautions ................................................................................................................................ 141
CHAPTER 7 TIMER OVERVIEW ....................................................................................................... 142
CHAPTER 8 16-BIT TIMER/EVENT COUNTER ............................................................................... 145
8.1
Function ................................................................................................................................. 145
8.2
Configuration ........................................................................................................................ 146
8.3
Control Registers .................................................................................................................. 150
8.4
Operation ............................................................................................................................... 156
8.4.1
Operation as interval timer (16 bits) .......................................................................................... 156
8.4.2
PPG output operation ............................................................................................................... 158
8.4.3
Pulse width measurement ......................................................................................................... 159