– ii –
3.8.1
3.8.2
SPECIAL FUNCTION REGISTERS (SFRS) ..............................................................
CAUTIONS.......................................................................................................................
Configuration ....................................................................................................................
Functions ..........................................................................................................................
64
66
69
75
3.9
3.10
CHAPTER 4 CLOCK GENERATOR ...........................................................................................
4.1
CONFIGURATION AND FUNCTION ...........................................................................
4.2
CONTROL REGISTERS ................................................................................................
4.2.1
Standby Control Register (STBC)...................................................................................
4.2.2
Oscillation Stabilization Time Specification Register (OSTS) .......................................
4.3
CLOCK GENERATOR OPERATION...........................................................................
4.3.1
Clock Oscillator ................................................................................................................
4.3.2
Divider ..............................................................................................................................
4.4
CAUTIONS.......................................................................................................................
4.4.1
When an External Clock is Input ....................................................................................
4.4.2
When Crystal/Ceramic Oscillation is Used.....................................................................
77
77
79
79
81
82
82
83
84
84
85
CHAPTER 5 PORT FUNCTIONS ................................................................................................
5.1
DIGITAL INPUT/OUTPUT PORTS ..............................................................................
5.2
PORT 0 ...........................................................................................................................
5.2.1
Hardware Configuration...................................................................................................
5.2.2
I/O Mode/Control Mode Setting ......................................................................................
5.2.3
Operating Status ..............................................................................................................
5.2.4
Internal Pull-Up Resistors................................................................................................
5.2.5
Transistor Drive................................................................................................................
5.3
PORT 1 ...........................................................................................................................
5.3.1
Hardware Configuration...................................................................................................
5.3.2
I/O Mode/Control Mode Setting ......................................................................................
5.3.3
Operating Status ..............................................................................................................
5.3.4
Internal Pull-Up Resistors................................................................................................
5.3.5
Direct LED Drive ..............................................................................................................
5.4
PORT 2 ...........................................................................................................................
5.4.1
Hardware Configuration...................................................................................................
5.4.2
Input Mode/Control Mode Setting ...................................................................................
5.4.3
Operating Status ..............................................................................................................
5.4.4
Internal Pull-Up Resistors................................................................................................
5.5
PORT 3 ...........................................................................................................................
5.5.1
Hardware Configuration...................................................................................................
5.5.2
I/O Mode/Control Mode Setting ......................................................................................
5.5.3
Operating Status ..............................................................................................................
5.5.4
Internal Pull-Up Resistors................................................................................................
5.6
PORT 4 ...........................................................................................................................
5.6.1
Hardware Configuration...................................................................................................
5.6.2
I/O Mode/Control Mode Setting ......................................................................................
5.6.3
Operating Status ..............................................................................................................
5.6.4
Internal Pull-Up Resistors................................................................................................
5.6.5
Direct LED Drive ..............................................................................................................
5.7
PORT 5 ...........................................................................................................................
89
89
91
91
92
93
95
97
98
99
104
106
109
110
111
113
115
115
115
117
119
123
125
128
130
130
132
133
135
137
138