Getting started with LPC2148

LPC2148 is the widely used IC from ARM-7 family. It is manufactured by Philips and it is pre-loaded with many inbuilt peripherals making it more efficient and a reliable option for the beginners as well as high end application developer.

Features of lpc2148:
  • 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.
  • 40 kB of on-chip static RAM and 512 kB of on-chip flash memory.
  • In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot loader software.
  • Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with the on-chip Real Monitor software and high-speed tracing of instruction execution.
  • USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.
  • Two 10-bit ADCs provide a total of 14 analog inputs
  • Single 10-bit DAC provides variable analog output
  • Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog.
  • Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input.
  • Multiple serial interfaces including two UARTs, two Fast I²C-bus (400 kbit/s), SPI and SSP with buffering and variable data length capabilities.
  • Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses.
  • Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.
  • 60 MHz maximum CPU clock available from programmable on-chip PLL with settling time of 100 us.
  • On-chip integrated oscillator operates with an external crystal from 1 MHz to 25 MHz
  • Power saving modes include Idle and Power-down.
  • Individual enable/disable of peripheral functions as well as peripheral clock scaling for additional power optimization.
  • Processor wake-up from Power-down mode via external interrupt or BOD.
  • Single power supply chip with POR and BOD circuits:
  • CPU operating voltage range of 3.0 V to 3.6 V (3.3 V +- 10 pct) with 5 V tolerant I/O pads.
The LPC2148 incorporates a 512 kB Flash memory system. This memory may be used for both code and data storage. The FLASH memory can be programmed by means of
1. Serialbuilt-in JTAG interface
2. Using In System Programming (ISP) and UART0
Note:- Inorder to use ISP and UART0, we need to use FLASHMAGIC.

LPC2148 has two IO ports (P0 and P1) each of 32 bit wide thus giving us total of 64 pins. Each pin can be used as GPIO (General Purpose IO) or can perorm alternate functions i.e ADC, I2C, SPI etc.

Basic registers:
  • PINSEL/IOSEL are 16 bit wide registers, used for setting the function of the PIN. Function can be either GPIO or Alternate Function.
  • There are 3 PINSEL registers in LPC2148 i.e. PISEL0/IOSEL0 (PORT0.0-PORT0.15),              PINSEL1/IOSEL1 (PORT0.16-PORT0.31) and PINSEL2/IOSEL2 (PORT1.16-PORT1.31).
  • GPIO Port Direction control register. IODIR are 32 bit wide registers, used for setting the direction of the PIN. Direction can be either input or output. Writing 1 to a particular bit will set the PIN as output and writing 0 will set the PIN as input.
  • Threre are 2 IODIR registers i.e. IODIR0 (PORT0.0-PORT0.31) and IODIR1 (PORT1.0-PORT1.31).
  • For eg- if we want to set PIN 3 of PORT0 as output, IODIR0 = 0x00000008; Here all other PINs except PIN 3 are set as input (because they are all 0s) and PIN 3 is output (It is 1).
  • GPIO Port Output Clear registers. IOCLR are 32 bit wide registers, they controls the state of output pins. Writing ones produces lows at the corresponding port pins and clears the corresponding bits in the IOSET register. Writing zeroes has no effect.
  • There are 2 IOCLR registers i.e. IOCLR0 (PORT0) and IOCLR1 (PORT1).
  • GPIO Port Output Set registers.IOSET are 32 bit wide register, they 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.
  • There are 2 IOSET registers i.e. IOSET0 (PORT0) and IOSET1 (PORT1).

  • GPIO Port Pin value register. The current state of the GPIO configured port pins can always be read from this register.
Getting started with LPC2148 Getting started with LPC2148 Reviewed by arun singh on May 25, 2017 Rating: 5

1 comment:

  1. Ye to bhout badiya h es me sampurn gyan ek hi sthan pe vidhyamaan h plz jayda se jaya es gyan ko logo tak prasarit kre or es blog k madhyam se ghar pe baith k computer or mobile banaye


Powered by Blogger.