
S3C821A/P821A
I/O PORTS
9-1
9
I/O PORTS
OVERVIEW
The S3C821A microcontroller has two nibble-programmable and four bit-programmable I/O ports, P0-P5. The
ports from P0 to P4 are 8-bit ports and port 5 is a 7-bit port. This gives a total of 47 I/O pins. Each port can be
flexibly configured to meet application design requirements. The CPU accesses ports by directly writing or
reading port registers. No special I/O instructions are required.
Table 9-1 gives you a general overview of the S3C821A I/O port functions.
Table 9-1. S3C821A Port Configuration Overview
Port
Configuration Options
0
4-bit-programmable I/O port.
Pull-up resistors and open-drain outputs are software assignable. Pull-up resistors are
automatically disabled for output pins. Configurable as LCD segments/external interface
address lines.
1
4-bit-programmable I/O port.
Pull-up resistors and open-drain outputs are software assignable. Pull-up resistors are
automatically disabled for output pins. Configurable as LCD segment/external interface
address and data lines.
2
1-bit-programmable I/O port.
Pull-up resistors are software assignable, and automatically disabled for output pins. P2.0–
P2.3 can alternately be used as external interface lines. P2.4–P2.7 are configurable as
alternate functions or external interrupts at falling edge with noise filters.
3
1-bit-programmable I/O port.
Pull-up resistors are software assignable, and automatically disabled for output pins. P3.0–P3.3
can alternately be used as ADC. P3.7 is configurable as an alternate function.
4
1-bit-programmable I/O port.
Pull-up resistors and open-drain outputs are software assignable. Pull-up resistors are
automatically disabled for output pins. P4.0–P4.7 are configurable as external interrupts at a
selectable edge with noise filters.
5
1-bit-programmable I/O port.
Pull-up resistors are software assignable, and automatically disabled for output pins.
P5.0–P5.3 are configurable as alternate functions. When SCK and SI are used as input, these
pins have noise filters.