© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
81
8.1 Features
•
Every physical GPIO port is accessible via either the group of registers providing an
enhanced features and accelerated port access or the legacy group of registers
•
Accelerated GPIO functions:
– GPIO registers are relocated to the ARM local bus so that the fastest possible I/O
timing can be achieved
– Mask registers allow treating sets of port bits as a group, leaving other bits
unchanged
– All registers are byte and half-word addressable
– Entire port value can be written in one instruction
•
Bit-level set and clear registers allow a single instruction set or clear of any number of
bits in one port
•
Direction control of individual bits
•
All I/O default to inputs after reset
•
Backward compatibility with other earlier devices is maintained with legacy registers
appearing at the original addresses on the VPB bus
8.2 Applications
•
General purpose I/O
•
Driving LEDs, or other indicators
•
Controlling off-chip devices
•
Sensing digital inputs
8.3 Pin description
8.4 Register description
LPC2141/2/4/6/8 has two 32-bit General Purpose I/O ports. Total of 30 input/output and a
single output only pin out of 32 pins are available on PORT0. PORT1 has up to 16 pins
available for GPIO functions. PORT0 and PORT1 are controlled via two groups of 4
registers as shown in
Legacy registers shown in
allow backward compatibility with earlier family
devices, using existing code. The functions and relative timing of older GPIO
implementations is preserved.
UM10139
Chapter 8: General Purpose Input/Output ports (GPIO)
Rev. 01 — 15 August 2005
User manual
Table 64:
GPIO pin description
Pin
Type
Description
P0.0-P.31
P1.16-P1.31
Input/
Output
General purpose input/output. The number of GPIOs actually available depends on the
use of alternate functions.