MC80F0304/08/16
48
November 4, 2011 Ver 2.12
Figure 9-3 R1 Port Register
9.3 R2 and R2IO register
R2 is an 8-bit CMOS bidirectional I/O port (address 0C4
H
). Each
I/O pin can independently used as an input or an output through
the R3IO register (address 0C5
H
). 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.
R1 Data Register
R1
ADDRESS: 0C2
H
RESET VALUE: 00
H
R17
R16 R15 R14 R13 R12 R11 R10
Port Direction
R1 Direction Register
R1IO
ADDRESS: 0C3
H
RESET VALUE: 00
H
0: Input
1: Output
Input / Output data
R1 Pull-up
PU1
ADDRESS: 0FD
H
RESET VALUE: 00
H
Selection Register
0: Disable
1: Enable
Pull-up Resister Selection
R1 Open Drain
R1OD
ADDRESS: 0C9
H
RESET VALUE: 00
H
Selection Register
0: Disable
1: Enable
Open Drain Resister Selection
PSR0
ADDRESS: 0F8
H
RESET VALUE: 0000 0000
B
INT2E
Port / INT Selection
0: R11, R12, R03, R00
1: INT0, INT1,INT2, INT3
INT0E
INT1E
INT3E
PWM3OE
EC0E
EC1E
Port / EC Selection
0: R04, R07
1: EC0, EC1
Port / PWM Selection
0: R10, R11
1: PWM1O, PWM3O
PWM1OE
PSR1
ADDRESS: 0F9
H
RESET VALUE: ---- 0000
B
BUZOE
R12/BUZO Selection
0: R12 port (Turn off buzzer)
1: BUZO port (Turn on buzzer)
T0OE
T2OE
AVREFS
-
-
-
-
Port / TO Selection
0: R04, R07
1: EC0, EC1
R10 / AVREF Selection
0: R10 port
1: AVREF port
Port Pin
Alternate Function
R20
R21
R22
R23
R24
R25
R26
R27
-
-
-
AN9 (ADC input channel 9)
AN10 (ADC input channel 10)
AN11 (ADC input channel 11)
AN12 (ADC input channel 12)
-