Anda di halaman 1dari 1

LPC2148 Block Diagram.

LPC214x Pin Diagram..

Pin Connect Block


Most of the pins on LPC2148 are multiplexed so we can use the same pin for different
purpose. Pin connect Block is used to configure the microcontroller pins to the desired
function.
Configuration registers (PINSEL0, PINSEL1 and PINSEL2) control the multiplexers to allow
connection between the pin and the on chip peripherals.
LPC214x User Manual PAGE 75 for table

General Purpose Input/Output


LPC2148 has two ports P0 32 Pins and P1 16 Pins and can be operated in two
modes legacy mode and fast GPIO mode.
Legacy / slow GPIO mode is the general way of usage and has backward
compatibility with earlier family devices. The register set used are IOPIN, IOSET,
IOCLR and IODIR.
Gen. Name
IOPIN

Access
PORT0
R/W
0xE002 8000
IO0PIN

PORT1
0xE002 8010
IO1PIN

IODIR

Description
To read the current state of
the PIN regardless of pin
direction
Controls the direction of pin

R/W

IOSET

Writing 1s sets the port pins

R/W

IOCLR

Writing 1s clear the port pins

R/W

0xE002 8018
IO1DIR
0xE002 8014
IO1SET
0xE002 801C
IO1CLR

0xE002 8008
IO0DIR
0xE002 8004
IO0SET
0xE002 800C
IO0CLR

Enhanced / Fast GPIO mode is the new feature available in LPC214x family
controllers. FIODIR, FIOMASK, FIOPIN, FIOSET, FIOCLR and FIODIR.
All of these registers are located directly on the local bus of the CPU for
the fastest possible read and write timing.

A mask register allows treating groups of bits in a single GPIO port separately from other
bits on the same port.
Writing 0 on MASK register gives access to that bit.

Anda mungkin juga menyukai