Port - Samsung S3C80A5B User Manual

8-bit cmos
Table of Contents

Advertisement

I/O PORTS

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.
9-8
Port 2 Control Register (P2CON)
MSB
.7
.6
.5
P2.2
P2.1 Alternative Function Enable
0
Normal I/O Function
1
REM/T0CK
P2.0 Alternative Function Enable
0
Normal I/O Function
1
T0PWM
P2CON Pin Configuration Setting:
00
C-MOS input mode
01
Open-drain output mode
10
Push-pull output mode
11
C-MOS input mode with pull-up
Figure 9-8. Port 2 Control Register (P2CON)
F0H, R/W
.4
.3
.2
P2.1
P2.2
.1
.0
LSB
P1.0
S3C80A5B

Advertisement

Table of Contents
loading

Table of Contents