![](http://datasheet.mmic.net.cn/380000/-PD784214Y_datasheet_16744924/-PD784214Y_14.png)
14
4.4
System Clock Oscillator ....................................................................................................... 108
4.4.1
Main system clock oscillator ...................................................................................................... 108
4.4.2
Subsystem clock oscillator......................................................................................................... 109
4.4.3
Frequency divider ...................................................................................................................... 112
4.4.4
When no subsystem clocks are used ........................................................................................ 112
Clock Generator Operations................................................................................................. 113
4.5.1
Main system clock operations.................................................................................................... 114
4.5.2
Subsystem clock operations ...................................................................................................... 115
Changing System Clock and CPU Clock Settings.............................................................. 115
4.5
4.6
CHAPTER 5 PORT FUNCTIONS ...................................................................................................... 117
5.1
5.2
Port Functions ....................................................................................................................... 117
Port Configuration................................................................................................................. 119
5.2.1
Port 0 ......................................................................................................................................... 119
5.2.2
Port 1 ......................................................................................................................................... 121
5.2.3
Port 2 ......................................................................................................................................... 122
5.2.4
Port 3 ......................................................................................................................................... 124
5.2.5
Port 4 ......................................................................................................................................... 125
5.2.6
Port 5 ......................................................................................................................................... 126
5.2.7
Port 6 ......................................................................................................................................... 127
5.2.8
Port 7 ......................................................................................................................................... 129
5.2.9
Port 8 ......................................................................................................................................... 131
5.2.10
Port 9 ......................................................................................................................................... 132
5.2.11
Port 10 ....................................................................................................................................... 133
5.2.12
Port 12 ....................................................................................................................................... 134
5.2.13
Port 13 ....................................................................................................................................... 135
Control Registers .................................................................................................................. 136
Operations ............................................................................................................................. 142
5.4.1
Writing to input/output port......................................................................................................... 142
5.4.2
Reading from input/output port .................................................................................................. 142
5.4.3
Operations on input/output port ................................................................................................. 143
5.3
5.4
CHAPTER 6 REAL-TIME OUTPUT FUNCTIONS ............................................................................ 145
6.1
6.2
6.3
6.4
6.5
6.6
Functions ............................................................................................................................... 145
Structure ................................................................................................................................ 145
Control Registers .................................................................................................................. 148
Operation ............................................................................................................................... 150
Using this Function............................................................................................................... 151
Cautions ................................................................................................................................. 151
CHAPTER 7 TIMER/COUNTER OVERVIEW .................................................................................... 153
CHAPTER 8 16-BIT TIMER/COUNTER ............................................................................................. 157
8.1
8.2
8.3
Function ................................................................................................................................. 157
Configuration......................................................................................................................... 158
16-Bit Timer/Counter Control Register ................................................................................ 162