Preliminary User’s Manual U16315EJ1V0UD
10
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 ........................................................................................................................... 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 ............................................................................................................................................. 84
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 .......................................................................................... 104
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
Ring-OSC oscillator ..................................................................................................................... 115
5.4.5
Prescaler ..................................................................................................................................... 115
5.5
Clock Generator Operation ..................................................................................................... 115
5.6
Time Required to Switch Between Ring-OSC Clock and X1 Input Clock........................... 122
5.7
Changing System Clock and CPU Clock Settings ................................................................ 123
5.7.1
Time required for switching between system clock and CPU clock ............................................. 123
5.8
Clock Switching Flowchart and Register Setting ................................................................. 124
5.8.1
Switching from Ring-OSC clock to X1 input clock........................................................................ 124