3.2 Processor Registers.................................................................................................................. 68
3.2.1
3.2.2
3.2.3
Control registers .............................................................................................................................68
General-purpose registers..............................................................................................................72
Special Function Registers (SFRs).................................................................................................73
3.3 Instruction Address Addressing.............................................................................................. 78
3.3.1
3.3.2
3.3.3
3.3.4
Relative addressing........................................................................................................................78
Immediate addressing ....................................................................................................................79
Table indirect addressing ...............................................................................................................80
Register addressing........................................................................................................................80
3.4 Operand Address Addressing.................................................................................................. 81
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7
3.4.8
3.4.9
Implied addressing .........................................................................................................................81
Register addressing........................................................................................................................82
Direct addressing............................................................................................................................83
Short direct addressing...................................................................................................................84
Special function register (SFR) addressing ....................................................................................85
Register indirect addressing ...........................................................................................................86
Based addressing...........................................................................................................................87
Based indexed addressing .............................................................................................................88
Stack addressing............................................................................................................................89
CHAPTER 4 PORT FUNCTIONS........................................................................................................... 90
4.1 Port Functions............................................................................................................................ 90
4.2 Port Configuration ..................................................................................................................... 92
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.2.7
4.2.8
4.2.9
Port 0..............................................................................................................................................93
Port 1..............................................................................................................................................97
Port 2............................................................................................................................................102
Port 3............................................................................................................................................103
Port 4............................................................................................................................................105
Port 5............................................................................................................................................106
Port 6............................................................................................................................................107
Port 7............................................................................................................................................108
Port 12..........................................................................................................................................109
4.2.10 Port 13..........................................................................................................................................110
4.2.11 Port 14..........................................................................................................................................111
4.3 Registers Controlling Port Function...................................................................................... 112
4.4 Port Function Operations........................................................................................................ 116
4.4.1
4.4.2
4.4.3
Writing to I/O port .........................................................................................................................116
Reading from I/O port...................................................................................................................116
Operations on I/O port..................................................................................................................116
CHAPTER 5 CLOCK GENERATOR.................................................................................................... 117
5.1 Functions of Clock Generator ................................................................................................ 117
5.2 Configuration of Clock Generator.......................................................................................... 117
5.3 Registers Controlling Clock Generator ................................................................................. 119
5.4 System Clock Oscillator.......................................................................................................... 126
User’s Manual U16228EJ2V0UD
11