HD404818 Series
42
D Port:
Consists of ten 1-bit I/O ports and four input ports. Pins D
0
to D
9
are high-current I/O pins (15 mA
max.). The sum of the current for all D-port pins is up to 100 mA. D port can be set/reset by the SED/RED
and SEDD/REDD instructions, and can be tested by the TD/TDD instruction. Output data is stored in the
port data register. The output buffer for port D can be turned on/off by the D-port data control registers
(DCRB, DCRC, DCRD). The DCR is located in the memory address area. Pins D
10
to D
13
are input-only
pins.
Two operation modes are available for pins D
12
and D
13
: digital input mode and analog input mode. The
operation modes can be selected by port mode register B (PMRB; bits 1, 0). In the digital input mode, these
pins can be used as input with the same characteristics as other I/O pins. In the analog input mode, users
can read the result of the comparison between the reference voltage as input data. The reference voltage is
input through D
11
/VC
ref
.
R Port:
Consists of four 4-bit I/O ports and can receive/transmit data by the LAR/LRA and LBR/LRB
instructions. Output data is stored in the port data register (PDR) of each pin.
The output buffers of the R ports can be turned on/off by the R-port data control registers (DCR0–DCR3).
The DCR is located in the memory address area.
Pins R0
0
, R0
1
, and R0
2
are multiplexed with
SCK
, SI, and SO, respectively.
Pins R3
1
, R3
2
, and R3
3
are multiplexed with TIMO,
INT
0
, and
INT
1
, respectively. Refer to figure 23.
Pull-Up MOS Transfer Control:
All I/O ports, except for pins D
10
–D
13
, contain programmable pull-up
MOS.
Bit 3 of port mode register B (PMRB3) controls the activation of all pull-up MOS simultaneously. Pull-up
MOS is controlled by the port data register (PDR) of each pin. Therefore, each bit of pull-up MOS can be
individually turned on or off. Refer to table 20.
The on/off status of each transistor and the peripheral function mode of each pin can be set independently.
Unused I/O Pins:
If unused pins are left floating, the LSI may malfunction because of noise. The I/O pins
should be fixed as follows to prevent this: pull-up to V
CC
through internal pull-up MOS, or pull-up to V
CC
through a resistor of approximately 100 k
.