ARM7 Based (LPC2148) Microcontroller Pin Configuration

Embedded system and SOC (system on chip) designers choose particular microprocessor cores, libraries, and different tools to develop microprocessor based applications. An ARM processor is one of the best alternatives obtainable for embedded system designers. In the past few years, the ARM architecture has become very popular and these are available from different IC manufacturers. The applications of ARM processors involves in mobile phones, automotive braking systems, etc. A global ARM community partners have developed semiconductor as well as product-design corporations includes an employs like engineers, designers, & developers. This article is about ARM7 based LPC2148 microcontroller, architecture and pin configuration. This article will assist you to understand the basics of the microcontroller.

ARM7 based LPC2148 Microcontroller

The full form of an ARM is an advanced reduced instruction set computer (RISC) machine, and it is a 32-bit processor architecture expanded by ARM holdings. The applications of an ARM processor include several microcontrollers as well as processors. The architecture of an ARM processor was licensed by many corporations for designing ARM processor-based SoC products and CPUs. This allows the corporations to manufacture their products using ARM architecture. Likewise, all main semiconductor companies will make ARM-based SOCs such as Samsung, Atmel, TI etc.

What is an ARM7 Processor?

ARM7 processor is commonly used in embedded system applications. Also, it is a balance among classic as well as new-Cortex sequence. This processor is tremendous in finding the resources existing on the internet with excellence documentation offered by NXP Semiconductors. It suits completely for an apprentice to obtain in detail hardware & software design implementation.

LPC2148 Microcontroller

 The LPC2148 microcontroller is designed by Philips (NXP Semiconductor) with several in-built features & peripherals. Due to these reasons, it will make more reliable as well as the efficient option for an application developer. LPC2148 is a 16-bit or 32-bit microcontroller based on ARM7 family.

Features of LPC2148

The main features of LPC2148 include the following.

  • The LPC2148 is a 16 bit or 32 bit ARM7 family based microcontroller and available in a small LQFP64 package.
  • ISP (in system programming) or IAP (in application programming) using on-chip boot loader software.
  • On-chip static RAM is 8 kB-40 kB, on-chip flash memory is 32 kB-512 kB, the wide interface is 128 bit, or accelerator allows 60 MHz high-speed operation.
  • It takes 400 milliseconds time for erasing the data in full chip and 1 millisecond time for 256 bytes of programming.
  • Embedded Trace interfaces and Embedded ICE RT offers real-time debugging with high-speed tracing of instruction execution and on-chip Real Monitor software.
  • It has 2 kB of endpoint RAM and USB 2.0 full speed device controller. Furthermore, this microcontroller offers 8kB on-chip RAM nearby to USB with DMA.
  • One or two 10-bit ADCs offer 6 or 14 analogs i/ps with low conversion time as 2.44 μs/ channel.
  • Only 10 bit DAC offers changeable analog o/p.
  • External event counter/32 bit timers-2, PWM unit, & watchdog.
  • Low power RTC (real time clock) & 32 kHz clock input.
  • Several serial interfaces like two 16C550 UARTs, two I2C-buses with 400 kbit/s speed.
  • 5 volts tolerant quick general purpose Input/output pins in a small LQFP64 package.
  • Outside interrupt pins-21.
  • 60 MHz of utmost CPU CLK-clock obtainable from the programmable-on-chip phase locked loop by resolving time is 100 μs.
  • The incorporated oscillator on the chip will work by an exterior crystal that ranges from 1 MHz-25 MHz
  • The modes for power-conserving mainly comprise idle & power down.
  • For extra power optimization, there are individual enable or disable of peripheral functions and peripheral CLK scaling.

Memory

The LPC2148 microcontroller has 512-kB on-chip FLASH memory as well as 32-kB on-chip SRAM. Also, this microcontroller includes inherent support up to 2kB finish point USB RAM. This memory is well matched for all the microcontroller applications.

On-chip FLASH Memory System

This microcontroller includes a 512-kB Flash memory system and this memory may be useful for both the data storage as well as code. The programming of this memory can be done by the following.

  • By incorporating JTAG interface in serial
  • Using UART or ISP (in system programming)
  • Capabilities of IAP (In Application Programming)

The IAP function Based application program may also remove while the program is running. Whenever the microcontroller LPC2148 on-chip boot-loader is utilized, then 500 kB of Flash memory is obtainable for consumer code. The Flash memory of this microcontroller offers the smallest amount of 100,000 writes/erase cycles as well as 20-years of data preservation.

On-chip SRAM

This microcontroller offers static RAM with 32-kB and very useful for data storage or code. It is accessible for 8-bits, 16-bits, & 32-bits.

 Input/Output Ports

The LPC2148 microcontroller has two input/output ports and these are termed as P0 &P1. Every port pins are branded with PX.Y. Here, ‘X’ denotes port number like 0 or 1, whereas ‘Y’ denotes pin number 0-31. All the pins can execute alternate tasks also. For instance, P0.8 provides as GPIO and Tx pin of the UART1, AD1.1, PWM4. On RST (RESET), every pin is arranged as GPIO.

How to Start with Programming?

The initial step toward lpc2148 programming is an arrangement of GPIO Pins. So here are the related concepts as well as registers. The general purpose I/O port pins in LPC2148 includes P0.0 to P0.31 and P1.16 to P1.31, and actually, these pins are available based on the alternate function utilization.

Port-0 and Port-1 are 32-bit Input/output ports, and every bit of these ports can be controlled by an individual direction. The operations of port-0 & port-1 depend upon the function of a pin that is selected using the pin connected block. In Port-0, pins like P0.24, P0.26 & P0.27 are not obtainable whereas, in Port-1, the Pins 0 to 15 are not obtainable. Here, both the pins like Port-0 & Port-1 are controlled by two groups of registers discussed below.

LPC2148 Pin Configuration

ARM7 Based Microcontroller (LPC2148) Pin Configuration
ARM7 Based Microcontroller (LPC2148) Pin Configuration

Pin1-(P0.21/ PWM5CAP1.3/ AD1.6)

  • P0.21 is a GPIO pin (general purpose I/O pin)
  • AD1.6 is obtainable in LPC2144/46/48 microcontrollers only where an AD1.6 denotes ADC-1, i/p-6.
  • PWM5 is a pulse width modulator output-5.
  • CAP1.3 is a Capture i/p for Timer-1, channel-3

Pin2-(P0.22/ CAP0.0/AD1.7/ MAT0.0 2

  • P0.22 is a GPIO digital pin
  • AD1.7 pin is available in LPC2144/46/48 only where an AD1.7 denotes ADC-1, input-7
  • CAP0.0 is a capture input pin for Timer-0, channel-0.
  • MAT0.0 is a match o/p for Timer-0, channel-0

Pin3-RTXC1 3

It is an I/p to the RTC-oscillator circuit

Pin4- TRACEPKT3/ P1.19

  • TRACEPKT3 is a trace packet, bit-3, standard input/output port by the inner pull-up.
  • P1.19 is a GPIO digital pin

Pin5-RTXC2

This is an output pin from the RTC oscillator circuit

Pin6, Pin18, Pin25, Pin42, and Pin50

These pins are a ground reference

Pin7-VDDA

This pin is an analog voltage power supply (3.3V), and this voltage is very useful for the on-chip analog to digital converters and digital to analog converters.

Pin8- P1.18/TRACEPKT2

  • P1.18 is a GPIO digital pin
  • TRACEPKT2 is a trace packet, bit-2, standard input/output port by the inner pull-up.

Pin9- P0.25/AOUT/AD0.4

  • P0.25 is a GPIO digital pin I
  • AD0.4 denotes ADC-0, input-4
  • Aout- the output of DAC and that is accessible only in LPC2142/ LPC2144/ LPC2146/ LPC2148

Pin10- D+

This pin is a USB bidirectional D+ line

Pin11- D-

This pin is a USB bidirectional D- line

Pin12-P1.17/TRACEPKT1

  • P1.17 is a GPIO digital pin
  • TRACEPKT1 is a trace packet, bit-1, standard input/output port by the inner pull-up.

Pin13-P0.28/ CAP0.2/ AD0.1/MAT0.2

  • P0.28 is a GPIO digital pin
  • AD0.1 denotes ADC-0, input-1
  • CAP0.2 is a capture i/p for Timer-0, channel-2.
  • MAT0.2 is a match o/p for Timer-0, channel-2

Pin14-P0.29/ CAP0.3/ AD0.2/MAT0.3

  • P0.29 is a GPIO digital pin
  • AD0.2 denotes ADC-0, input-2
  • CAP0.3 is a capture i/p for Timer-0, channel-3.
  • MAT0.3 is a match o/p for Timer-0, channel-3

Pin15-P0.30/ EINT3/ AD0.3/CAP0.0

  • P0.30 is a GPIO digital pin
  • AD0.3 denotes ADC-0, input-3
  • EINT3 is an external interrupt 3-input.
  • CAP0.3 is a capture i/p for Timer-0, channel-0.

Pin16- P1.16/TRACEPKT0

  • P1.16 is a GPIO digital pin
  • TRACEPKT1 is a trace packet, bit-0, standard input/output port by inner pull-up

Pin17-P0.31/UP_LED/CONNECT

  • P0.31 is a GPIO digital pin
  • UP_LED is a USB good link LED indicator. When the device is arranged then it is low and when the device is not arranged, then it is high.
  • CONNECT- This signal is used to control an exterior resistor (1.5 kΩ) under the control of a software control, and it is used by the feature of Soft Connect

Pin19- P0.0/PWM/TXD0

  • P0.0 is a GPIO digital pin
  • TXD0 is a transmitter o/p for UART0.
  • PWM1 is a pulse width modulator o/p-1.

Pin20- P1.31/TRST

  • P1.31 is a GPIO digital pin
  • TRST is a test reset for JTAG interface.

Pin21-P0.1/ PWM3/ RXD0/EINT0

  • P0.1 is a GPIO digital pin
  • RXD0 is a receiver i/p for UART0.
  • PWM3 is a pulse width modulator o/p-3.
  • EINT0 is an external interrupt 0-input

Pin22- P0.2/ CAP0.0/ SCL0

  • P0.2 is a GPIO digital pin
  • SCL0 is an I2C0 clock I/O, and open-drain o/p
  • CAP0.0 is a capture i/p for Timer-0, channel-0.

Pin 23, 43, and 51- VDD

These pins are power supply voltage for the I/O ports as well as the core.

Pin24- P1.26/RTCK

  • P1.26 is a GPIO digital pin
  • RTCK is a returned test CLK o/p, an additional signal added to the JTAG-port. When the frequency of processor changes then it helps debugger synchronization.

Pin26- P0.3/ SDA0/ MAT0.0/EINT1

  • P0.3 is a GPIO digital pin
  • SDA0 is an I2C0 data I/O and open drain o/p for I2C bus observance.
  • MAT0.0 is matched o/p for timer-0, channel-0.
  • EINT1 is an external interrupt 1-i/p.

Pin27-P0.4/ CAP0.1/ SCK0/AD0.6

  • P0.4 is a GPIO digital pin I/O
  • SCK0 is a serial CLK for SPI0 and SPI CLK o/p from master/ i/p to slave.
  • CAP0.1 is a capture i/p for timer-0, channel-0.
  • IAD0.6 denotes ADC-0, input-6

Pin28-P1.25/EXTIN0

  • P1.25 is a GPIO digital pin I/O
  • EXTIN0 is an external trigger i/p, and standard input/output with inner pull-up

Pin29- P0.5/MAT0.1/MISO0/AD0.7

  • P0.5 is a GPIO digital pin I/O
  • MISO0 is a master in slave out for SPI0, data i/p to SPI-master/data o/p from SPI slave.
  • MAT0.1 is a match o/p for timer-0, channel-1.
  • AD0.7 denotes ADC-0, input-7.

Pin30-P0.6/MOSI0/CAP0.2/AD1.0

  • P0.6 is a GPIO digital pin I/O
  • MOSI0 is a master out slave in for SPI0, and data o/p from SPI master/ data i/p to SPI slave.
  • CAP0.2 is a capture i/p for Timer-0, channel-2.

Pin31-P0.7/ PWM2/ SSEL0/EINT2

  • P0.7 is a GPIO digital pin I/O
  • SSEL0 is a slave select for SPI0 and chooses the SPI-interface as a slave.
  • PWM2 is a pulse width modulator output-2.
  • EINT2 is an external interrupt 2-input.

Pin32-P1.24/TRACECLK

  • P1.24 is a GPIO digital pin I/O.
  • TRACECLK is a trace CLK and standard input/output port with inner pull-up

Pin33-P0.8/TXD1/PWM4/AD1.1

  • P0.8 is a GPIO digital pin I/O
  • TXD1 is a transmitter o/p for UART1.
  • PWM4 is a pulse width modulator o/p-4.
  • AD1.1 denotes ADC-1, input-1, and it is obtainable only in LPC2144/46/48.

Pin34- P0.9/PWM6/RXD1/EINT3

  • P0.9 is a GPIO digital pin I/O
  • RXD1 is a receiver i/p for UART1.
  • PWM6 is a pulse width modulator o/p-6.
  • EINT3 is an external interrupt 3-input

Pin35-P0.10/RTS1/CAP1.0/AD1.2

  • P0.10 is a GPIO digital pin I/O
  • RTS1 is requesting to send o/p for UART1 and LPC2144/46/48.
  • CAP1.0 is a capture i/p for timer-1, channel-0.
  • AD1.2 denotes ADC-1, input-2, and it is obtainable only in LPC2144/46/48

Pin36-P1.23/PIPESTAT2

  • P1.23 is a GPIO digital pin I/O
  • PIPESTAT2 is a pipeline status, bit-2., and standard Input/Output port with inner pull-up

Pin37-P0.11/ CAP1.1/CTS1/ SCL1

  • P0.11 is a GPIO digital pin I/O
  • CTS1 is clear to send i/p for UART1, and these are accessible only in LPC2144/46/48
  • CAP1.1 is a capture i/p for timer-1, channel-1.
  • SCL1 — I2C1 CLK I/O, and open drain o/p for the I2C-bus observance

Pin38-P0.12/ MAT1.0/AD1.3/ DSR1

  • P0.12 is a GPIO digital pin I/O
  • DSR1 is a data set ready i/p for UART1, and these are accessible only in LPC2144/46/48.
  • MAT1.0 is a match o/p for timer-1, channel-0.
  • AD1.3 denotes ADC input-3, and it is accessible only in LPC2144/46/48.

Pin39-P0.13/DTR1/MAT1.1/AD1.4

  • P0.13 is a GPIO digital pin I/O
  • DTR1 is a data terminal ready o/p for UART1 and LPC2144/46/48 only.
  • MAT1.1 is a match o/p for timer-1, channel-1.
  • AD1.4 denotes ADC input-4, and these are accessible only in LPC2144/46/48.

Pin40-P1.22/PIPESTAT1

  • P1.22 is a GPIO digital pin I/O
  • PIPESTAT1 is a pipeline status, bit-1, and standard Input/Output port with inner pull-up

Pin41-P0.14/DCD1/EINT1/SDA1

  • P0.14 is a GPIO digital pin I/O
  • DCD1 is a data carrier detect i/p for UART1, and also only for LPC2144/46/48 only.
  • EINT1 is an exterior interrupt 1-input.
  • SDA1 is an I2C1 data I/O and an open drain o/p for I2C bus observance

Pin44:P1.21/ PIPESTAT0 44

  • I/O P1.21 is a GPIO digital pin I/O
  • PIPESTAT0 is a Pipeline Status, bit 0, and standard Input/Output port by the inner pull-up.

Pin45: P0.15/ EINT2/ RI1/ AD1.5 45

  • I/O P0.15 is a GPIO digital pin I/O
  • RI1 is a ring pointer i/p for UART1 and it is accessible only in LPC2144/46/48.
  • EINT2 is an external interrupt 2-input.
  • AD1.5 indicates ADC 1, input-5, and also available only in LPC2144/46/48

Pin46: P0.16/ MAT0.2/ EINT0/ CAP0.2

  • P0.16 is a GPIO digital pin I/O
  • EINT0 is an external interrupt0- input.
  • MAT0.2 is a match o/p for Timer-0, channel -2
  • CAP0.2 is a capture i/p for Timer-0, channel-2.

Pin47: P0.17/ SCK1/ CAP1.2/ MAT1.2 47

  • P0.17 is a GPIO digital pin I/O
  • CAP1.2 is a capture i/p for Timer-1, channel-2.
  • SCK1 is a serial CLK for SSP and CLK o/p from master to slave.
  • MAT1.2 is a match o/p for Timer-1, channel-2.

Pin48: P1.20/ TRACESYNC

  • P1.20 is a GPIO digital pin I/O
  • TRACESYNC is trace synchronization.

Pin49: VBAT

RTC power supply:  This pin gives the supply to the RTC.

Pin52: P1.30/TMS

P1.30 is a GPIO digital pin I/O

TMS is a test mode select for interfacing of JTAG.

Pin53: P0.18/CAP1.3/ MISO1/MAT1.3

  • P0.18 is a GPIO digital pin I/O
  • CAP1.3 is a capture i/p for Timer 1, channel 3.
  • MISO1 is a master In Slave-out for SSP, and data i/p to SPI- master

Pin54: P0.19/ MOSI1/MAT1.2/ CAP1.2

  • P0.19 is a GPIO digital pin I/O.
  • MAT1.2 denotes match o/p for Timer 1, channel 2.
  • MOSI1 is a master out slave for SSP master.
  • CAP1.2 is a capture i/p for Timer 1, channel 2.

Pin 55: P0.20/ SSEL1/ MAT1.3/ EINT3

  • P0.20 is a GPIO digital pin I/O.
  • MAT1.3 is a match o/p for Timer 1, channel 3. I
  • SSEL1 is a Slave Select designed for SSP. Here, chooses the interface of SSP as a slave.
  • EINT3 is an external interrupt 3-input.

Pin56: P1.29/TCK

  • P1.29 is a GPIO digital pin I/O
  • TCK is a test CLK for an interface of JTAG.

Pin57: External Reset Input

The device can be rearranged by a LOW on this pin, effecting Input/Output ports as well as peripherals for obtaining on their default conditions, & processor execution begins at address 0.

Pin58: P0.23/VBUS

  • P0.23 is a GPIO digital pin I/O
  • VBUS specifies the existence of USB-bus power

Pin59: VSSA

VSSA is an analog ground, and this must be the similar voltage like VSS, although it should be separated to reduce error and noise

Pin60: P1.28/TDI 60

  • P1.28 is a GPIO digital pin I/O
  • TDI pin is a test data is used for interfacing JTAG

Pin61: XTAL2

XTAL2 is an o/p from the oscillator amplifier

Pin62: XTAL1

XTAL1 is an i/p to the internal CLK generator as well as oscillator circuits

Pin63: VREF-ADC Reference

This pin should be nominally equal or less than to the voltage VDD although it should be separated for reducing error as well as noise.

Pin64: P1.27/TDO 64

  • P1.27 is a GPIO digital pin I/O
  • TDO is a test data out used for interfacing JTAG.

Thus, this is about ARM 7 based LPC2148 microcontroller pin configuration. For the electronic engineering students, this information will give a basic knowledge on pin configuration, I/O ports memory, as well as registers. Here is a question for you, what are the applications of the LPC2148 microcontroller?

Add Comment