
13
User’s Manual U12790EJ2V0UD
CHAPTER 3 CPU ARCHITECTURE .................................................................................................
54
3.1
Memory Spaces .................................................................................................................
54
3.1.1
Internal program memory space ...........................................................................................
58
3.1.2
Internal data memory space ..................................................................................................
59
3.1.3
Special-function register (SFR) area ....................................................................................
59
3.1.4
Data memory addressing ......................................................................................................
60
3.2
Processor Registers .........................................................................................................
63
3.2.1
Control registers ....................................................................................................................
63
3.2.2
General-purpose registers .....................................................................................................
68
3.2.3
Special-function registers (SFR) ...........................................................................................
70
3.3
Instruction Address Addressing ....................................................................................
75
3.3.1
Relative Addressing ...............................................................................................................
75
3.3.2
Immediate addressing ...........................................................................................................
76
3.3.3
Table indirect addressing ......................................................................................................
77
3.3.4
Register addressing ...............................................................................................................
78
3.4
Operand Address Addressing ........................................................................................
79
3.4.1
Implied addressing .................................................................................................................
79
3.4.2
Register addressing ...............................................................................................................
80
3.4.3
Direct addressing ...................................................................................................................
81
3.4.4
Short direct addressing .........................................................................................................
82
3.4.5
Special-function register (SFR) addressing ..........................................................................
83
3.4.6
Register indirect addressing ..................................................................................................
84
3.4.7
Based addressing ..................................................................................................................
85
3.4.8
Based indexed addressing ....................................................................................................
86
3.4.9
Stack addressing ...................................................................................................................
87
CHAPTER 4 PORT FUNCTIONS ......................................................................................................
88
4.1
Port Functions ...................................................................................................................
88
4.2
Port Configuration ............................................................................................................
91
4.2.1
Port 0 ......................................................................................................................................
91
4.2.2
Port 1 ......................................................................................................................................
92
4.2.3
Port 2 ......................................................................................................................................
93
4.2.4
Port 3 ......................................................................................................................................
95
4.2.5
Port 4 ......................................................................................................................................
96
4.2.6
Port 5 ......................................................................................................................................
97
4.2.7
Port 6 ......................................................................................................................................
98
4.2.8
Port 7 ......................................................................................................................................
99
4.2.9
Port 10 ....................................................................................................................................
101
4.2.10 Port 12 ....................................................................................................................................
103
4.2.11 Port 13 ....................................................................................................................................
105
4.3
Registers Controlling Port Function .............................................................................. 106
4.4
Port Function Operations ................................................................................................ 109
4.4.1
Writing to I/O port ..................................................................................................................
109
4.4.2
Reading from I/O port ............................................................................................................
109
4.4.3
Operations on I/O port ...........................................................................................................
109