
User’s Manual U18417EJ3V0UD
10
4.2.17 Port 16...........................................................................................................................................162
4.3 Registers Controlling Port Function.................................................................................................. 163
4.4 Port Function Operations.................................................................................................................... 172
4.4.1 Writing to I/O port ............................................................................................................................172
4.4.2 Reading from I/O port......................................................................................................................172
4.4.3 Operations on I/O port.....................................................................................................................172
4.4.4 Connecting to external device with different power potential (2.5 V, 3 V)........................................173
4.5 Settings of Port Mode Register and Output Latch When Using Alternate Function .................. 175
4.6 Cautions on 1-Bit Manipulation Instruction for Port Register n (Pn) ............................................ 179
CHAPTER 5 EXTERNAL BUS INTERFACE ...................................................................................... 180
5.1 Functions of External Bus Interface .................................................................................................. 180
5.2 Registers Controlling External Bus Interface Functions................................................................ 185
5.3 Setting Port Mode Register and Output Latch ................................................................................. 188
5.4 Number of Instruction Wait Clocks or Data Access........................................................................ 189
5.5 Number of Instruction Execution Clocks and Instruction Wait Clocks for Fetch Access......... 189
5.6 Timing of External Bus Interface Function ....................................................................................... 190
5.6.1 Multiplexed bus mode .....................................................................................................................191
5.6.2 Separate bus mode .........................................................................................................................195
5.7 Example of Connection to Memory ................................................................................................... 199
5.7.1 Connection of external logic (ASIC, etc.).........................................................................................199
5.7.2 Connection of synchronous memory ...............................................................................................199
5.7.3 Connection of asynchronous memory .............................................................................................200
CHAPTER 6 CLOCK GENERATOR .................................................................................................... 201
6.1 Functions of Clock Generator ............................................................................................................ 201
6.2 Configuration of Clock Generator...................................................................................................... 202
6.3 Registers Controlling Clock Generator ............................................................................................. 204
6.4 System Clock Oscillator ...................................................................................................................... 218
6.4.1 X1 oscillator.....................................................................................................................................218
6.4.2 XT1 oscillator ..................................................................................................................................218
6.4.3 Internal high-speed oscillator ..........................................................................................................221
6.4.4 Internal low-speed oscillator............................................................................................................221
6.4.5 Prescaler .........................................................................................................................................221
6.5 Clock Generator Operation ................................................................................................................. 222
6.6 Controlling Clock.................................................................................................................................. 226
6.6.1 Example of controlling high-speed system clock .............................................................................226
6.6.2 Example of controlling internal high-speed oscillation clock............................................................229
6.6.3 Example of controlling subsystem clock..........................................................................................231
6.6.4 Example of controlling internal low-speed oscillation clock .............................................................233
6.6.5 CPU clock status transition diagram................................................................................................234
6.6.6 Condition before changing CPU clock and processing after changing CPU clock ..........................239
6.6.7 Time required for switchover of CPU clock and main system clock ................................................241
6.6.8 Conditions before clock oscillation is stopped .................................................................................242