© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
82
Philips Semiconductors
UM10139
Volume 1
Chapter 8: GPIO
The registers in
represent the enhanced GPIO features available on the
LPC2141/2/4/6/8. All of these registers are located directly on the local bus of the CPU for
the fastest possible read and write timing. An additional feature has been added that
provides byte addressability of all GPIO registers. A mask register allows treating groups
of bits in a single GPIO port separately from other bits on the same port.
User must select whether a GPIO will be accessed via registers that provide enhanced
features or a legacy set of registers (see
Section 3.6.1 “System Control and Status flags
register (SCS - 0xE01F C1A0)” on page 26
). While both of a port’s fast and legacy GPIO
registers are controlling the same physical pins, these two port control branches are
mutually exclusive and operate independently. For example, changing a pin’s output via a
fast register will not be observable via the corresponding legacy register.
The following text will refer to the legacy GPIO as "the slow" GPIO, while GPIO equipped
with the enhanced features will be referred as "the fast" GPIO.
[1]
Reset value reflects the data stored in used bits only. It does not include reserved bits content.
Table 65:
GPIO register map (legacy VPB accessible registers)
Generic
Name
Description
Access Reset
value
PORT0
Address & Name
PORT1
Address & Name
IOPIN
GPIO Port Pin value register. The current
state of the GPIO configured port pins can
always be read from this register, regardless
of pin direction.
R/W
NA
0xE002 8000
IO0PIN
0xE002 8010
IO1PIN
IOSET
GPIO Port Output Set register. This register
controls the state of output pins in
conjunction with the IOCLR register. Writing
ones produces highs at the corresponding
port pins. Writing zeroes has no effect.
R/W
0x0000 0000 0xE002 8004
IO0SET
0xE002 8014
IO1SET
IODIR
GPIO Port Direction control register. This
register individually controls the direction of
each port pin.
R/W
0x0000 0000 0xE002 8008
IO0DIR
0xE002 8018
IO1DIR
IOCLR
GPIO Port Output Clear register. This
register controls the state of output pins.
Writing ones produces lows at the
corresponding port pins and clears the
corresponding bits in the IOSET register.
Writing zeroes has no effect.
WO
0x0000 0000 0xE002 800C
IO0CLR
0xE002 801C
IO1CLR