
171
8.3
R Ports
8.3.1
Overview
The R port consists of the three 4-bit I/O ports and one 3-bit port, ports R0 to R3. These ports are
accessed in 4-bit units.
Ports R0 and R3 are standard voltage I/O ports, R1
0 to R12 are medium voltage NMOS open drain
I/O ports, and R1
3 and R2 are standard voltage NMOS open drain I/O ports.
The individual ports R0 to R3 are accessed in 4-bit units with the LRA and LRB output
instructions to control the output levels (high or low) on each pin. Output data is stored in the PDR
built into each pin. Similarly, the LAR and LBR input instructions can be used to access the R
ports in 4-bit units to read the input levels on the port pins.
DCR registers are used to control the port R0 to R3 output buffer on/off states. When the DCR bit
corresponding to a pin in one of the ports R0 to R3 is set to 1, the data in the corresponding PDR
is output from that pin. Thus the output buffer on/off states can be controlled on an individual pin
basis for the R port pins. The DCR registers are allocated in the RAM address space.
The pins in ports R1 and R2 are high current pins that can accept current influxes of up to 15 mA.
The R0 and R3 port pins have shared functions as built-in peripheral module pins. Register
settings are used to switch these functions. (See table 8-7.)
Figure 8-2 shows the R port pin structure.
R00/SCK (I/O or I/O)
R01/SI (I/O or input)
R02/SO (I/O or output)
R03/TOC (I/O or output)
R31/AN1 (I/O or input)
R32/AN2 (I/O or input)
R33/AN3 (I/O or input)
R20 (I/O)
R21 (I/O)
R22 (I/O)
R23 (I/O)
R10 (I/O)
R11 (I/O)
R12 (I/O)
R13 (I/O)
R0 port
R2 port
R1 port
R3 port
Standard
voltage
NMOS
open drain
Medium voltage
NMOS open
drain
Standard voltage
NMOS open drain
: High current pins
Figure 8-2 R Port Structure