S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X I/O PORTS
9-3
PORT 0
Port 0 is an 8-bit I/O port with individually configurable pins. Port 0 pins are accessed directly by writing or reading
the port 0 data register, P0 at location F0H in set 1, bank 0. P0.0-P0.7 can serve as inputs (with or without pull-
up), as outputs (push-pull or open-drain) or you can be configured the following functions.
• Low-nibble pins (P0.0−P0.3): INT0–INT2, T1CLK
• High-nibble pins (P0.4−P0.7): TAOUT, TBOUT, CLKOUT, BUZ
Port 0 Control Registers (P0CONH, P0CONL)
Port 0 has two 8-bit control registers: P0CONH for P0.4−P0.7 and P0CONL for P0.0−P0.3. A reset clears the
P0CONH and P0CONL registers to "00H", configuring P0.0−P0.2 pins to input mode with interrupt and P0.3−P0.7
pins to input mode. You use control registers setting to select input or output mode (push-pull or open-drain) and
enable the alternative functions.
When programming this port, please remember that any alternative peripheral I/O function you configure using the
port 0 control registers must also be enabled in the associated peripheral module.
Port 0 Pull-up Resistor Control Register (P0PUR)
Using the port 0 pull-up resistor control register, P0PUR (E6H, set 1, bank 0) you can configure pull-up resistors
to individual port 0 pins.
Port 0 Interrupt Control Registers (EXTICONL.5−.0, EXTIPND.2−.0)
To process external interrupts at the port 0 pins, two additional control registers are provided: the external
interrupt control register EXTICONL.5−.0 (F9H, set 1, bank 0) and the external interrupt pending register
EXTIPND.2−.0 (F7H, set 1, bank 0)
The external interrupt pending register EXTIPND.2−.0 lets you check for interrupt pending conditions and clear
the pending condition when the interrupt service routine has been initiated. The application program detects
interrupt requests by polling the EXTIPND.2−.0 register at regular intervals.
When the interrupt enable bit of any port 0 pin is "1", a rising or falling edge at that pin will generate an interrupt
request. The corresponding pending bit is then automatically set to "1" and the IRQ level goes low to signal the
CPU that an interrupt request is waiting. When the CPU acknowledges the interrupt request, application software
must the clear the pending condition by writing a "0" to the corresponding EXTIPND bit.