I/O PORTS
S3C80A5B
9-8
PORT 2
Port 2 is a bit-programmable 3-bit I/O port. Port 2 pins are accessed directly by read/write operations to the port 2
data register, P2 (set 1, E2H). You can configure port 2 pins individually to Input mode, open-drain output mode, or
push-pull output mode.
P2.0, P2.1 and P2.2 are configured by writing 6-bit data value to the port 2 control register, P2CON. You can
configure these pins to support input functions (Input mode, with or without pull-up, for T0CK) or output functions
(push-pull or open-drain output mode for REM and timer 0 PWM).
Port 2 pins have high current drive capability to support LED applications.
A reset operation clears P2CON to '00H', selecting Input mode as the initial port 2 function.
Port 2 Control Register (P2CON)
F0H, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
P2.2
P2.2
P2.1
P1.0
P2.1 Alternative Function Enable
0
1
Normal I/O Function
REM/T0CK
P2.0 Alternative Function Enable
0
1
Normal I/O Function
T0PWM
P2CON Pin Configuration Setting:
00
01
10
11
C-MOS input mode
Open-drain output mode
Push-pull output mode
C-MOS input mode with pull-up
Figure 9-8. Port 2 Control Register (P2CON)