
v
16.2
Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
16.3
Serial clock
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
16.3.1
Clock source
....................................................................................................................................... 159
16.3.1.1
Internal clock
16.3.1.2
External clock
16.3.2
Shift edge
............................................................................................................................................ 161
16.3.2.1
Leading edge
16.3.2.2
Trailing edge
16.4
Number of bits to transfer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
16.5
Number of words to transfer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
16.6
Transfer Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
16.6.1
4-bit and 8-bit transfer modes
............................................................................................................. 162
16.6.2
4-bit and 8-bit receive modes
............................................................................................................. 164
16.6.3
8-bit transfer / receive mode
............................................................................................................... 165
17.
10-bit AD Converter (ADC)
17.1
Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
17.2
Register configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
17.3
Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
17.3.1
Software Start Mode
........................................................................................................................... 173
17.3.2
Repeat Mode
...................................................................................................................................... 173
17.3.3
Register Setting
................................................................................................................................ 174
17.4
STOP/SLOW Modes during AD Conversion
. . . . . . . . . . . . . . . . . . . . . . . . . . . 175
17.5
Analog Input Voltage and AD Conversion Result
. . . . . . . . . . . . . . . . . . . . . . . 176
17.6
Precautions about AD Converter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
17.6.1
Analog input pin voltage range
........................................................................................................... 177
17.6.2
Analog input shared pins
.................................................................................................................... 177
17.6.3
Noise Countermeasure
....................................................................................................................... 177
18.
Key-on Wakeup (KWU)
18.1
Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
18.2
Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
18.3
Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
19.
OTP operation
19.1
Operating mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
19.1.1
MCU mode
.......................................................................................................................................... 181
19.1.1.1
Program Memory
19.1.1.2
Data Memory
19.1.1.3
Input/Output Circuiry
19.1.2
PROM mode
....................................................................................................................................... 183
19.1.2.1
Programming Flowchart (High-speed program writing)
19.1.2.2
Program Writing using a General-purpose PROM Programmer
20.
Input/Output Circuitry
20.1
Control Pins
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
20.2
Input/Output Ports
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188