![](http://datasheet.mmic.net.cn/380000/-PD784214Y_datasheet_16744924/-PD784214Y_56.png)
56
CHAPTER 2 PIN FUNCTIONS
(13)P130, P131 (Port13)
This port is a 2-bit I/O port. In addition to being an I/O port, it has the analog output function of the D/A converter.
The following operating modes can be specified in 2-bit units.
(a) Port mode
The port functions as a 2-bit I/O port. The port 13 mode register can specify input ports or output ports in
1-bit units. There are no internal pull-up resistors.
(b) Control mode
The port functions as the analog outputs (ANO0, ANO1) of the D/A converter. The values are undefined
when the pins specified as analog output are read.
Caution If the D/A converter uses only one channel when AV
REF1
< V
DD
, use either of the following
processes at pins that are not used for analog output.
Set 1 (input mode) in the port mode register (PM13X) and connect to V
SS
.
(output mode) in the port mode register (PM13X). Set the output latch to 0 and output
a low level.
(14)AV
REF0
This is the reference voltage input pin of the A/D converter.
If the A/D converter is not used, connect to V
SS
.
(15)AV
REF1
This is the reference voltage input pin of the D/A converter.
If the D/A converter is not used, connect to V
DD
.
(16)AV
DD
This is the analog voltage supply pin of the A/D converter. Even if the A/D converter is not used, always use
this pin at the same potential as pin V
DD
.
(17)AV
SS
This is the ground potential pin of the A/D converter. Even if the A/D converter is not used, always use this pin
at the same potential as pin V
SS
.
(18)RESET
This is the active low system reset input pin.
(19)X1, X2
These are the crystal oscillator connection pins for main system clock oscillation.
When an external clock is supplied, input this clock signal at X1, and its inverted signal at X2.
(20)XT1, XT2
These are the crystal oscillator connection pins for subsystem clock oscillation.
When an external clock is supplied, input this clock signal at XT1, and its inverted signal at XT2.