
User’s Manual U19780EJ2V0UD
9
3.3.1 Relative addressing .........................................................................................................................67
3.3.2 Immediate addressing......................................................................................................................68
3.3.3 Table indirect addressing.................................................................................................................69
3.3.4 Register addressing .........................................................................................................................70
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 ....................................................................................................................... 82
4.2.1 Port 0 ...............................................................................................................................................83
4.2.2 Port 1 ...............................................................................................................................................85
4.2.3 Port 2 ...............................................................................................................................................91
4.2.4 Port 3 ...............................................................................................................................................97
4.2.5 Port 4 .............................................................................................................................................100
4.2.6 Port 6 .............................................................................................................................................102
4.2.7 Port 7 .............................................................................................................................................104
4.2.8 Port 8 .............................................................................................................................................105
4.2.9 Port 12 ...........................................................................................................................................109
4.3 Registers Controlling Port Function ........................................................................................ 113
4.4 Port Function Operations.......................................................................................................... 119
4.4.1 Writing to I/O port...........................................................................................................................119
4.4.2 Reading from I/O port ....................................................................................................................120
4.4.3 Operations on I/O port ...................................................................................................................120
4.5 Settings of Port Mode Register and Output Latch When Using Alternate Function........... 120
4.6 Cautions on 1-Bit Manipulation Instruction for Port Register n (Pn).................................... 126
CHAPTER 5 CLOCK GENERATOR .................................................................................................... 127
5.1 Functions of Clock Generator................................................................................................... 127
5.2 Configuration of Clock Generator ............................................................................................ 128
5.3 Registers Controlling Clock Generator ................................................................................... 131
5.4 System Clock Oscillator ............................................................................................................ 140
5.4.1 X1 oscillator ...................................................................................................................................140
5.4.2 XT1 oscillator .................................................................................................................................140
5.4.3 When subsystem clock is not used ................................................................................................143
5.4.4 Internal high-speed oscillator .........................................................................................................143
5.4.5 Internal low-speed oscillator ..........................................................................................................143
5.4.6 Prescaler........................................................................................................................................143
5.5 Clock Generator Operation ....................................................................................................... 144
5.6 Controlling Clock ....................................................................................................................... 148