Port - Samsung S3C80A5B User Manual

8-bit cmos
Table of Contents

Advertisement

I/O PORTS

PORT 1

Port 1 is a bit-programmable 8-bit I/O port. Port 1 pins are accessed directly by read/write operations to the port 1
data register, P1 (set 1, E1H).
To configure port 1, the initialization routine writes the appropriate values to the two port 1 control registers: P1CONH
(set 1, EAH) for the upper nibble pins, P1.7–P1.4, and P1CONL (set 1, EBH) for the lower nibble pins, P1.3–P1.0.
Each 8-bit control register contains four bit-pairs and each 2-bit value configures one port pin (see Figures 9-6 and 9-
7).
Following a hardware reset, the port 1 control registers are cleared to '00H', configuring port 0 initially to Input mode.
To assign pull-up resistors to P1 pins, you make the appropriate settings to the port 1 pull-up resistor enable
register, P1PUR.
9-6
Port 1 Control Register, High Byte (P1CONH)
MSB
.7
.6
.5
P1.7
P1CONH Pin Configureation Settings:
00
Input mode
01
Open-drain output mode
10
Push-pull output mode
11
Invalid setting
Figure 9-6. Port 1 High-Byte Control Register (P1CONH)
EAH, Set 1, R/W
.4
.3
.2
P1.5
P1.6
.1
.0
LSB
P1.4
S3C80A5B

Advertisement

Table of Contents
loading

Table of Contents