![](http://datasheet.mmic.net.cn/190000/UPD780123GB-A1--XXX-8ET_datasheet_14990904/UPD780123GB-A1--XXX-8ET_11.png)
User’s Manual U16315EJ3V1UD
11
3.2.3
Special function registers (SFRs) ...................................................................................................63
3.3
Instruction Address Addressing ..............................................................................................67
3.3.1
Relative addressing ........................................................................................................................67
3.3.2
Immediate addressing ....................................................................................................................68
3.3.3
Table indirect addressing ...............................................................................................................69
3.3.4
Register addressing........................................................................................................................69
3.4
Operand Address Addressing ..................................................................................................70
3.4.1
Implied addressing .........................................................................................................................70
3.4.2
Register addressing........................................................................................................................71
3.4.3
Direct addressing............................................................................................................................72
3.4.4
Short direct addressing...................................................................................................................73
3.4.5
Special function register (SFR) addressing ....................................................................................74
3.4.6
Register indirect addressing ...........................................................................................................75
3.4.7
Based addressing...........................................................................................................................76
3.4.8
Based indexed addressing .............................................................................................................77
3.4.9
Stack addressing ............................................................................................................................78
CHAPTER 4 PORT FUNCTIONS ........................................................................................................... 79
4.1
Port Functions............................................................................................................................ 79
4.2
Port Configuration ..................................................................................................................... 81
4.2.1
Port 0..............................................................................................................................................82
4.2.2
Port 1..............................................................................................................................................85
4.2.3
Port 2..............................................................................................................................................90
4.2.4
Port 3..............................................................................................................................................91
4.2.5
Port 6..............................................................................................................................................93
4.2.6
Port 7..............................................................................................................................................94
4.2.7
Port 12 ............................................................................................................................................95
4.2.8
Port 13 ............................................................................................................................................96
4.2.9
Port 14 ............................................................................................................................................97
4.3
Registers Controlling Port Function ........................................................................................ 98
4.4
Port Function Operations........................................................................................................ 102
4.4.1
Writing to I/O port .........................................................................................................................102
4.4.2
Reading from I/O port ...................................................................................................................102
4.4.3
Operations on I/O port ..................................................................................................................102
CHAPTER 5 CLOCK GENERATOR .................................................................................................... 103
5.1
Functions of Clock Generator ................................................................................................ 103
5.2
Configuration of Clock Generator .......................................................................................... 103
5.3
Registers Controlling Clock Generator ................................................................................. 105
5.4
System Clock Oscillator.......................................................................................................... 112
5.4.1
X1 oscillator ..................................................................................................................................112
5.4.2
Subsystem clock oscillator............................................................................................................112
5.4.3
When subsystem clock is not used...............................................................................................115
5.4.4
Internal oscillator ..........................................................................................................................115
5.4.5
Prescaler ......................................................................................................................................115
5.5
Clock Generator Operation ..................................................................................................... 116
5.6
Time Required to Switch Between Internal Oscillation Clock and X1 Input Clock ........... 123
5.7
Time Required for CPU Clock Switchover ............................................................................ 124