3.3 Instruction Address Addressing ............................................................................................. 79
3.3.1 Relative addressing ...................................................................................................................... 79
3.3.2 Immediate addressing................................................................................................................... 79
3.3.3 Table indirect addressing.............................................................................................................. 80
3.3.4 Register direct addressing ............................................................................................................ 81
3.4 Addressing for Processing Data Addresses.......................................................................... 82
3.4.1 Implied addressing........................................................................................................................ 82
3.4.2 Register addressing...................................................................................................................... 82
3.4.3 Direct addressing.......................................................................................................................... 83
3.4.4 Short direct addressing................................................................................................................. 84
3.4.5 SFR addressing............................................................................................................................ 85
3.4.6 Register indirect addressing ......................................................................................................... 86
3.4.7 Based addressing ......................................................................................................................... 87
3.4.8 Based indexed addressing............................................................................................................ 91
3.4.9 Stack addressing .......................................................................................................................... 92
CHAPTER 4 PORT FUNCTIONS ........................................................................................................... 96
4.1 Port Functions........................................................................................................................... 96
4.2 Port Configuration..................................................................................................................... 97
4.2.1 Port 0 ............................................................................................................................................ 98
4.2.2 Port 1 ............................................................................................................................................ 98
4.2.3 Port 2 ............................................................................................................................................ 99
4.2.4 Port 3 ............................................................................................................................................ 99
4.2.5 Port 4 .......................................................................................................................................... 100
4.2.6 Port 5 .......................................................................................................................................... 100
4.2.7 Port 6 .......................................................................................................................................... 100
4.2.8 Port 7 .......................................................................................................................................... 101
4.2.9 Port 12 ........................................................................................................................................ 101
4.2.10 Port 13 ........................................................................................................................................ 101
4.2.11 Port 14 ........................................................................................................................................ 102
4.2.12 Port 15 ........................................................................................................................................ 102
4.3 Registers Controlling Port Function ..................................................................................... 103
4.3.1 Port mode registers (PMxx) ........................................................................................................ 105
4.3.2 Port registers (Pxx) ..................................................................................................................... 106
4.3.3 Pull-up resistor option registers (PUxx)....................................................................................... 107
4.3.4 Port input mode registers (PIMxx) .............................................................................................. 108
4.3.5 Port output mode registers (POMxx) .......................................................................................... 109
4.3.6 Port mode control registers (PMCxx).......................................................................................... 110
4.3.7 A/D port configuration register (ADPC)....................................................................................... 111
4.3.8 Peripheral I/O redirection register (PIOR)................................................................................... 112
4.3.9 Global digital input disable register (GDIDIS) ............................................................................. 113
4.3.10 Global analog input disable register (GAIDIS) ............................................................................ 114
4.4 Port Function Operations....................................................................................................... 115
4.4.1 Writing to I/O port........................................................................................................................ 115
4.4.2 Reading from I/O port ................................................................................................................. 115
4.4.3 Operations on I/O port ................................................................................................................ 115
Index-2