![](http://datasheet.mmic.net.cn/370000/UPD789022_datasheet_16740811/UPD789022_14.png)
User's Manual U11919EJ3V0UM00
14
3.3.2
3.3.3
3.3.4
Immediate addressing.................................................................................................................61
Table indirect addressing............................................................................................................62
Register addressing ....................................................................................................................62
3.4 Operand Address Addressing..................................................................................................63
3.4.1
Direct addressing ........................................................................................................................63
3.4.2
Short direct addressing ...............................................................................................................64
3.4.3
Special function register (SFR) addressing.................................................................................65
3.4.4
Register addressing ....................................................................................................................66
3.4.5
Register indirect addressing........................................................................................................67
3.4.6
Based addressing........................................................................................................................68
3.4.7
Stack addressing.........................................................................................................................68
CHAPTER 4 PORT FUNCTIONS..............................................................................................................69
4.1 Functions of Ports .....................................................................................................................69
4.2 Port Configuration .....................................................................................................................71
4.2.1
Port 0...........................................................................................................................................71
4.2.2
Port 1...........................................................................................................................................72
4.2.3
Port 2...........................................................................................................................................73
4.2.4
Port 3...........................................................................................................................................76
4.2.5
Port 4...........................................................................................................................................77
4.2.6
Port 5...........................................................................................................................................78
4.3 Port Function Control Registers ..............................................................................................81
4.4 Operation of Port Functions .....................................................................................................83
4.4.1
Writing to I/O port ........................................................................................................................83
4.4.2
Reading from I/O port..................................................................................................................83
4.4.3
Arithmetic operation of I/O port....................................................................................................83
CHAPTER 5 CLOCK GENERATION CIRCUIT.........................................................................................85
5.1 Function of Clock Generation Circuit......................................................................................85
5.2 Configuration of Clock Generation Circuit..............................................................................85
5.3 Register Controlling Clock Generation Circuit.......................................................................86
5.4 System Clock Oscillation Circuits............................................................................................87
5.4.1
System clock oscillation circuit....................................................................................................87
5.4.2
Divider circuit...............................................................................................................................89
5.5 Operation of Clock Generation Circuit ....................................................................................90
5.6 Changing Setting of System Clock and CPU Clock ...............................................................91
5.6.1
Time required for switching between system clock and CPU clock ............................................91
5.6.2
Switching CPU clock ...................................................................................................................91
CHAPTER 6 16-BIT TIMER.......................................................................................................................93
6.1 16-Bit Timer Functions..............................................................................................................93
6.2 16-Bit Timer Configuration........................................................................................................94
6.3 Registers Controlling 16-Bit Timer...........................................................................................96
6.4 16-Bit Timer Operation ..............................................................................................................99
6.4.1
Operation as timer interrupt.........................................................................................................99