English
Language : 

E202075_HD404889 Datasheet, PDF (74/202 Pages) Renesas Technology Corp – Low-Voltage AS Microcomputers with On-Chip LCD Circuit
HD404889/HD404899/HD404878/HD404868 Series
R Port
The R port consists of 34 I/O pins (31 I/O pins in the HD404868 Series) that are addressed in 4-bit units.
Input can be performed by means of the LAR and LBR instructions, and output by means of the LRA and
LRB instructions. Output data is stored in the port data register (PDR) for each pin.
The R port output buffer is turned on and off by the R port data control registers (DCR0 to DCR8: $034 to
$03C). The DCR registers are mapped onto memory addresses (figure 27).
Ports R00 to R03 are multiplexed as wakeup input pins WU0 to WU3, respectively. Setting of these pins as
peripheral function pins is performed by port mode register 1 (PMR1: $009) (figure 29).
Ports R10 and R11 are multiplexed as peripheral function pins EVNB and EVND, respectively. Setting of
these pins as peripheral function pins is performed by bits 0 and 1 (PMR20, PMR21) of port mode register
2 (PMR2: $00A) (figure 30).
Ports R12 to R13 and R20 are multiplexed as peripheral function pins BUZZ, TOB, and TOC, respectively.
Setting of these pins as peripheral function pins is performed by bits 2 and 3 (PMR22, PMR23) of port
mode register 2 (PMR2: $00A) and bit 0 (PMR30) of port mode register 3 (PMR3: $00B)(figures 30 and
31).
Ports R21 and R22 are multiplexed as peripheral function pins SCK and SI/SO, respectively. Setting of
these pins as peripheral function pins is performed by bits 1 to 3 (PMR31 to PMR33) of port mode register
3 (PMR3: $00B) (figure 31).
Ports R3 to R6 are multiplexed as peripheral function pins SEG1 to SEG16, respectively. Setting of these
pins as segment pins is performed every 4 pins in 4-bit units by port mode register 4 (PMR4: $00C) (figure
32).
Ports R70 to R73 and R80 to R81 also function as peripheral function pins AN0 to AN5 (HD404889,
HD404899, and HD404868 series only). Peripheral function pin setting of these pins is performed using
bits 1 to 3 (AMR1 to AMR3) of the A/D mode register (AMR :$028). (See Figure 74 in A/D Converter.)
72