Unit 5-APP
Unit 5-APP
LPC21XX controller
Memory map
• The Memory Map Peripherals on the LPC2104 are memory-mapped,
meaning that their configuration registers, receive and transmit
buffers, status registers, etc., are each mapped to an address.
• You can use LDR and STR instructions just as you would if you were
writing a value to memory; although, you should be aware that some
peripherals are sensitive to reads and writes. For example, a memory-
mapped register may automatically clear its contents after being read.
System Memory Map
Memory map
• Looking at the Figure, you can see the memory map for the entire
microcontroller.
• Notice that distinct memory regions are defined. The controller
comes with 128 KB of Flash memory for your programs, and in the
case of the LPC2104, 16 KB of on-chip RAM for building stacks and
holding variables.
• All of the peripherals lie in the very highest addresses, between
addresses 0xE0000000 and 0xFFFFFFFF
ARM7 based LPC2148 Microcontroller Pin diagram
Features of LPC 2148
• It is founded by NXP Semiconductors (Phillips).
• LPC2148 based microcontrollers are based on a 16 bit/32 bit
ARM7TDMI-S CPU with LQFP64 package (Low Profile Flat Package-64
pins)
• 512kb Flash Memory. NOTE: (8051 has only 4kb of Flash Memory)
• Static RAM 32kb + 8kb shared with USB DMA
• 45 GPIO pins to connects the peripherals
• Port0 (P0.0-31 = 32 pins), Port1 (P1.16-1.31 = 16 pins) => 48 pins
• 3 pins are not used P0.24, P0.26 and P0.27 Not Available
• Pre-written Bootloader Software in side the Flash Memory
Features of LPC 2148
• Real Time Debugging using Embedded ICE RT & Embedded Trace
Interface
• USB 2.0 with 2kb of end point RAM
• Channel 1 = 8 ADC, Channel 2 = 6 ADC => Total 14 ADC’s of 10 bit
(Conversion Time = 2.44Micro Sec)
• Single 10 bit DAC
• Low Power Real Time Clock 32kHz Input clock
• Two 32 bit Timer/ External Event Counter with 4 Capture and 4
compare channels
• PWM unit (6 outputs) & watchdog for debugging (software error) and
resetting the CPU
Features of LPC 2148
• Unknown channel connected to this pin will be captured to calculate
unknown frequency or time period
• 2 UART, 2 I2C BUS (400 kbit/s), SPI, SSP and USB <= Communication
Protocol
• Vector Interrupt Controller which gives Vector addresses
• 21 External Interrupt pins
• CPU woks on 60 MHz Internal Clock using PLL, External only 12 MHz
crystal
• CPU voltage operating range 3.0 to 3.6v, upto 5v tolerant I/O Pads
ARM Processor and Programming – Dr. Feroz Morab
UART IN LPC2148
For Baudrate of 9600
0x01 0x87
PINSEL0 =0x05
0x01 0x87
3 Functions
LPC2148- Digital to Analog Converter
(DAC)
Saved in datacon.h file
-
-
-