DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
243 of 571
NXP Semiconductors
UM10316
Chapter 16: LPC29xx General Purpose Input/Output (GPIO)
The signal line is normally pulled up to a HIGH voltage level (logic 1) by an external
resistor. Each of the devices connected to the signal line can either drive the signal line to
a LOW voltage level (logic 0) or stay at high impedance (open-drain). If none of the
devices drives the signal line to a LOW voltage level the signal line is pulled-up by the
resistor (logic 1).
Devices in high-impedance can also read the value of the signal line to detect a logic 0 or
logic 1. This allows communication in multiple directions.
The open-drain configuration is achieved by:
•
Initially:
–
Configuring the pin direction as input (high impedance/open drain).
–
Setting the pin output to a LOW voltage level (logic 0).
•
Configuring the pin direction as output to drive a LOW voltage level (logic 0).
•
Configuring the pin direction as input to provide an open drain. In this case the other
devices and external resistor determine the voltage level. The actual level (logic 0 or
logic 1) can be read from the GPIO pin.
3.
GPIO register overview
The General-Purpose I/O registers have an offset to the base address GPIO RegBase
which can be found in the memory map, see
.
The general purpose I/O registers are shown in
.
3.1 GPIO port input register
The port input register is used to reflect the synchronized input level on each I/O pin
individually. In the case of writing to the port input register, the contents are written into the
port output register.
shows the bit assignment of the PINS register. Bits for for unavailable ports
), do not modify, and read as logic 0.
Table 200. General purpose I/O register overview (base address: E004 A000h (GPIO0), E004
B000h (GPIO1), E004 C000h (GPIO2), E004 D000h (GPIO3), 0xE004 E000h (GPIO4),
E004 F000h (GPIO5))
Address
offset
Access
Reset value
Name
Description
Reference
0h
R
-
PINS
Port input register
see
4h
R/W
0000 0000h
OR
Port output register
see
8h
R/W
0000 0000h
DR
Port direction register
see