
iv
11.
Asynchronous Serial interface (UART )
11.1
Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.2
Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
11.3
Transfer Data Format
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
11.4
Transfer Rate
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
11.5
Data Sampling Method
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
11.6
STOP Bit Length
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.7
Parity
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.8
Transmit/Receive Operation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.8.1
Data Transmit Operation
.................................................................................................................... 130
11.8.2
Data Receive Operation
..................................................................................................................... 130
11.9
Status Flag
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
11.9.1
Parity Error
.......................................................................................................................................... 131
11.9.2
Framing Error
...................................................................................................................................... 131
11.9.3
Overrun Error
...................................................................................................................................... 131
11.9.4
Receive Data Buffer Full
..................................................................................................................... 132
11.9.5
Transmit Data Buffer Empty
............................................................................................................... 132
11.9.6
Transmit End Flag
.............................................................................................................................. 133
12.
Synchronous Serial Interface (SIO)
12.1
Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
12.2
Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
12.3
Serial clock
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
12.3.1
Clock source
....................................................................................................................................... 138
12.3.1.1
Internal clock
12.3.1.2
External clock
12.3.2
Shift edge
............................................................................................................................................ 139
12.3.2.1
Leading edge
12.3.2.2
Trailing edge
12.4
Number of bits to transfer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
12.5
Number of words to transfer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
12.6
Transfer Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
12.6.1
4-bit and 8-bit transfer modes
............................................................................................................. 140
12.6.2
4-bit and 8-bit receive modes
............................................................................................................. 142
12.6.3
8-bit transfer / receive mode
............................................................................................................... 143
13.
10-bit AD Converter (ADC)
13.1
Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
13.2
Register configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
13.3
Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
13.3.1
Software Start Mode
........................................................................................................................... 151
13.3.2
Repeat Mode
...................................................................................................................................... 151
13.3.3
Register Setting
................................................................................................................................ 152
13.4
STOP/SLOW Modes during AD Conversion
. . . . . . . . . . . . . . . . . . . . . . . . . . . 153
13.5
Analog Input Voltage and AD Conversion Result
. . . . . . . . . . . . . . . . . . . . . . . 154
13.6
Precautions about AD Converter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
13.6.1
Restrictions for AD Conversion interrupt (INTADC) usage
................................................................. 155
13.6.2
Analog input pin voltage range
........................................................................................................... 155
13.6.3
Analog input shared pins
.................................................................................................................... 155
13.6.4
Noise Countermeasure
....................................................................................................................... 155