Index - 2
5.2.6 Port 6 .................................................................................................................................. 70
5.2.7 Port 7 .................................................................................................................................. 70
5.2.8 Port 8 .................................................................................................................................. 70
5.2.9 Port 10 ................................................................................................................................ 71
5.2.10 Port 12 ................................................................................................................................ 71
5.2.11 Port 13 ................................................................................................................................ 71
5.2.12 Port 14 ................................................................................................................................ 72
5.2.13 Port 15 ................................................................................................................................ 72
5.2.14 GPIO port ........................................................................................................................... 72
5.3 Registers Controlling Port Function ........................................................................................ 73
5.3.1 Port mode registers (PMxx) ................................................................................................ 76
5.3.2 Port registers (Pxx) ............................................................................................................. 78
5.3.3 Pull-up resistor option registers (PUxx) .............................................................................. 80
5.3.4 Port input mode registers (PIMxx) ...................................................................................... 81
5.3.5 Port output mode registers (POMxx) .................................................................................. 82
5.3.6 Port mode control registers (PMCxx) ................................................................................. 83
5.3.7 A/D port configuration register (ADPC) .............................................................................. 84
5.4 Port Function Operations ........................................................................................................ 85
5.4.1 Writing to I/O port ............................................................................................................... 85
5.4.2 Reading from I/O port ......................................................................................................... 85
5.4.3 Operations on I/O port ........................................................................................................ 85
5.4.4 Handling different potential (1.8 V, 2.5 V, 3 V) by using I/O buffers .................................... 86
5.5 Register Settings When Using Alternate Function .................................................................. 87
5.5.1 Basic concept when using alternate function ..................................................................... 87
5.5.2 Register settings for alternate function whose output function is not used ......................... 88
5.5.3 Register setting examples for used port and alternate functions ........................................ 89
5.6 Cautions When Using Port Function ...................................................................................... 95
5.6.1 Cautions on 1-Bit Manipulation Instruction for Port Register n (Pn) ................................... 95
5.6.2 Notes on specifying the pin settings ................................................................................... 96
6. CLOCK GENERATOR .................................................................................................................. 97
6.1 Functions of Clock Generator ................................................................................................. 97
6.2 Configuration of Clock Generator ........................................................................................... 99
6.3 Registers Controlling Clock Generator ................................................................................. 101
6.3.1 Clock operation mode control register (CMC) .................................................................. 101
6.3.2 System clock control register (CKC) ................................................................................. 104
6.3.3 Clock operation status control register (CSC) .................................................................. 105
6.3.4 Oscillation stabilization time counter status register (OSTC) ............................................ 106
6.3.5 Oscillation stabilization time select register (OSTS) ......................................................... 108
6.3.6 Peripheral enable registers 0, 1 (PER0, PER1) ................................................................ 110
6.3.7 Subsystem clock supply mode control register (OSMC) ................................................... 114
6.3.8 High-speed on-chip oscillator frequency select register (HOCODIV) ................................ 115
6.3.9 High-speed on-chip oscillator trimming register (HIOTRM) ............................................... 116
6.4 System Clock Oscillator ......................................................................................................... 117
6.4.1 X1 oscillator ....................................................................................................................... 117
6.4.2 XT1 oscillator ..................................................................................................................... 117
6.4.3 High-speed on-chip oscillator ........................................................................................... 121
6.4.4 Low-speed on-chip oscillator ............................................................................................ 121
6.5 Clock Generator Operation ................................................................................................... 122