
User’s Manual U17473EJ2V0UD
10
3.2.2 General-purpose registers .............................................................................................................. 62
3.2.3 Special function registers (SFRs).................................................................................................... 63
3.3 Instruction Address Addressing................................................................................................. 68
3.3.1 Relative addressing......................................................................................................................... 68
3.3.2 Immediate addressing..................................................................................................................... 69
3.3.3 Table indirect addressing ................................................................................................................ 70
3.3.4 Register addressing ........................................................................................................................ 70
3.4 Operand Address Addressing .................................................................................................... 71
3.4.1 Implied addressing .......................................................................................................................... 71
3.4.2 Register addressing ........................................................................................................................ 72
3.4.3 Direct addressing ............................................................................................................................ 73
3.4.4 Short direct addressing ................................................................................................................... 74
3.4.5 Special function register (SFR) addressing ..................................................................................... 75
3.4.6 Register indirect addressing............................................................................................................ 76
3.4.7 Based addressing ........................................................................................................................... 77
3.4.8 Based indexed addressing .............................................................................................................. 78
3.4.9 Stack addressing............................................................................................................................. 79
CHAPTER 4 MEMORY BANK SELECT FUNCTION (
μPD78F0396, 78F0397, AND 78F0397D ONLY)............80
4.1 Memory Bank ................................................................................................................................ 80
4.2 Memory Bank Select Register (BANK) ....................................................................................... 81
4.3 Selecting Memory Bank ............................................................................................................... 82
4.3.1 Referencing values between memory banks................................................................................... 82
4.3.2 Branching instruction between memory banks................................................................................ 84
4.3.3 Subroutine call between memory banks ......................................................................................... 86
4.3.4 Instruction branch to bank area by interrupt .................................................................................... 88
CHAPTER 5 PORT FUNCTIONS..................................................................................................................................................90
5.1 Port Functions .............................................................................................................................. 90
5.2 Port Configuration........................................................................................................................ 92
5.2.1 Port 0 .............................................................................................................................................. 93
5.2.2 Port 1 .............................................................................................................................................. 99
5.2.3 Port 2 .............................................................................................................................................104
5.2.4 Port 3 .............................................................................................................................................105
5.2.5 Port 6 .............................................................................................................................................107
5.2.6 Port 7 .............................................................................................................................................108
5.2.7 Port 12 ...........................................................................................................................................109
5.3 Registers Controlling Port Function ........................................................................................ 111
5.4 Port Function Operations .......................................................................................................... 115
5.4.1 Writing to I/O port ...........................................................................................................................115
5.4.2 Reading from I/O port.....................................................................................................................115
5.4.3 Operations on I/O port....................................................................................................................115
5.5 Settings of Port Mode Register and Output Latch When Using Alternate Function........... 116
5.6 Cautions on 1-Bit Manipulation Instruction for Port Register n (Pn).................................... 118
CHAPTER 6 CLOCK GENERATOR ......................................................................................................................................... 119
6.1 Functions of Clock Generator................................................................................................... 119