
Preliminary User’s Manual U17473EJ1V0UD
10
3.2.2
General-purpose registers......................................................................................................... 60
3.2.3
Special function registers (SFRs) .............................................................................................. 61
3.3
Instruction Address Addressing ............................................................................................ 66
3.3.1
Relative addressing................................................................................................................... 66
3.3.2
Immediate addressing ............................................................................................................... 67
3.3.3
Table indirect addressing .......................................................................................................... 68
3.3.4
Register addressing .................................................................................................................. 68
3.4
Operand Address Addressing ................................................................................................ 69
3.4.1
Implied addressing .................................................................................................................... 69
3.4.2
Register addressing .................................................................................................................. 70
3.4.3
Direct addressing ...................................................................................................................... 71
3.4.4
Short direct addressing ............................................................................................................. 72
3.4.5
Special function register (SFR) addressing ............................................................................... 73
3.4.6
Register indirect addressing ...................................................................................................... 74
3.4.7
Based addressing...................................................................................................................... 75
3.4.8
Based indexed addressing ........................................................................................................ 76
3.4.9
Stack addressing....................................................................................................................... 77
CHAPTER 4 PORT FUNCTIONS ........................................................................................................... 78
4.1
Port Functions .......................................................................................................................... 78
4.2
Port Configuration ................................................................................................................... 80
4.2.1
Port 0......................................................................................................................................... 81
4.2.2
Port 1......................................................................................................................................... 87
4.2.3
Port 2......................................................................................................................................... 92
4.2.4
Port 3......................................................................................................................................... 94
4.2.5
Port 7......................................................................................................................................... 96
4.2.6
Port 12....................................................................................................................................... 97
4.3
Registers Controlling Port Function ...................................................................................... 99
4.4
Port Function Operations...................................................................................................... 103
4.4.1
Writing to I/O port .....................................................................................................................103
4.4.2
Reading from I/O port...............................................................................................................103
4.4.3
Operations on I/O port..............................................................................................................103
4.5
Settings of Port Mode Register and Output Latch When Using Alternate Function....... 104
CHAPTER 5 CLOCK GENERATOR .................................................................................................... 106
5.1
Functions of Clock Generator............................................................................................... 106
5.2
Configuration of Clock Generator ........................................................................................ 107
5.3
Registers Controlling Clock Generator ............................................................................... 109
5.4
System Clock Oscillator ........................................................................................................ 118
5.4.1
X1 oscillator..............................................................................................................................118
5.4.2
XT1 oscillator ...........................................................................................................................118
5.4.3
When subsystem clock is not used ..........................................................................................121
5.4.4
High-speed Ring-OSC oscillator...............................................................................................121
5.4.5
Low-speed Ring-OSC oscillator ...............................................................................................121
5.4.6
Prescaler ..................................................................................................................................121
5.5
Clock Generator Operation ................................................................................................... 122
5.6
Controlling Clock ................................................................................................................... 124
5.6.1
Example of controlling high-speed system clock ......................................................................124