9.3 R2 and R2IO register
R2 is an 8-bit CMOS bidirectional I/O port (address 0C4H). Each
I/O pin can independently used as an input or an output through
the R3IO register (address 0C5H). When R20 through R27 pins
are used as input ports, an on-chip pull-up resistor can be connect-
ed to them in 1-bit units with a pull-up selection register 2 (PU2).
R20 through R27 pins can be used to open drain output port by
setting the corresponding bit of the open drain selection register
2 (R2OD).
In addition, Port R2 is multiplexed with alternate functions. R23
R24,R25,and R26 can be used as ADC input channel 9 to 12 by
setting ADCM to enable ADC and select channel 9 to 12.
Port Pin
R20
R21
R22
R23
R24
R25
R26
R27
Alternate Function
-
-
-
AN9 (ADC input channel 9)
AN10 (ADC input channel 10)
AN11 (ADC input channel 11)
AN12 (ADC input channel 12)
-
MC80F0704/0708/0804/0808
R2 Data Register
ADDRESS: 0C4H
RESET VALUE: 00H
R2
R27 R26 R25 R24 R23 R22 R21 R20
Input / Output data
R2 Direction Register
R2IO
ADDRESS: 0C5H
RESET VALUE: 00H
R2 Pull-up
Selection Register
PU2
Port Direction
0: Input
1: Output
ADDRESS: 0FEH
RESET VALUE: 00H
R2 Open Drain
Selection Register
R2OD
Pull-up Resister Selection
0: Disable
1: Enable
ADDRESS: 0CAH
RESET VALUE: 00H
Open Drain Resister Selection
0: Disable
1: Enable
October 31, 2011 Ver 1.03
41