© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
72
Philips Semiconductors
UM10161
Volume 1
Chapter 8: GPIO
The registers in
represent the enhanced GPIO features available on the
LPC2101/02/03. 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 23
). 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 64:
GPIO register map (legacy APB accessible registers)
Generic
Name
Description
Acces
s
Reset value
PORT0
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
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
IODIR
GPIO Port Direction control register. This
register individually controls the direction
of each port pin.
R/W
0x0000 0000
0xE002 8008
IO0DIR
IOCLR
GPIO Port Output Clear register. This
register controls the state of output pins.
Writing ones produces LOW 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