
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
126 of 487
NXP Semiconductors
UM10800
Chapter 9: LPC82x General Purpose I/O (GPIO)
9.5.3 GPIO port direction registers
Each GPIO port has one direction register for configuring the port pins as inputs or
outputs.
9.5.4 GPIO port mask registers
These registers affect writing and reading the MPORT registers. Zeroes in these registers
enable reading and writing; ones disable writing and result in zeros in corresponding
positions when reading.
9.5.5 GPIO port pin registers
Reading these registers returns the current state of the pins read, regardless of direction,
masking, or alternate functions, except that pins configured as analog I/O always read as
0s. Writing these registers loads the output bits of the pins written to, regardless of the
Mask register.
Table 115. GPIO port word pin registers (W[0:28], addresses 0xA000 1000 (W0) to 0xA000
1074 (W28)) bit description
Bit
Symbol
Description
Reset
value
Access
31:0
PWORD
Read 0: pin PIOm_n is LOW.
Write 0: clear output bit.
Read 0xFFFF FFFF: pin PIOm_n is HIGH.
Write any value 0x0000 0001 to 0xFFFF FFFF: set output
bit.
Remark:
Only 0 or 0xFFFF FFFF can be read. Writing any
value other than 0 will set the output bit.
One register for each port pin: n = pin 0 to 28.
ext
R/W
Table 116. GPIO direction port register (DIR0, address 0xA000 2000) bit description
Bit
Symbol
Description
Reset
value
Access
28:0
DIRP
Selects pin direction for pin PIO0_n (bit 0 = PIO0_0, bit 1 =
PIO0_1, ..., bit 28 = PIO0_28).
0 = input.
1 = output.
0
R/W
31:29 -
Reserved.
0
-
Table 117. GPIO mask port register (MASK0, address 0xA000 2080) bit description
Bit
Symbol
Description
Reset
value
Access
28:0
MASKP
Controls which bits corresponding to PIO0_n are active in the
MPORT register (bit 0 = PIO0_0, bit 1 = PIO0_1, ..., bit 28 =
PIO0_28).
0 = Read MPORT: pin state; write MPORT: load output bit.
1 = Read MPORT: 0; write MPORT: output bit not affected.
0
R/W
31:29
-
Reserved.
0
-