Arm LPC2148 Material

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17

Microprocessor:

1. The c.p.u, memories, timers, Input/output ports, serial communication, interrupts


etc.., all these are located on different chips and are externally connected to the
processing unit.
2. Different chips occupy more space; more power consumption is required and more
cost.
3. Microprocessors are used in products like general purpose computers.
4. Different kinds of software applications can be loaded and can be used
simultaneously.
5. Multitasking can be done using microprocessor.
6. The memory size, number of ports etc.., can be configured according to the
requirement in our application.
7. A large instruction set can be used for the applications using microprocessor.
8. The clock rates are faster when compared to micro controller.
They are in gega hertz for microprocessor.

Microcontroller:

1. The central processing unit, serial communication, timers,


Memories, interrupts, input/output ports etc.., are equipped on the same single chip.
2. It occupies less space, so it consumes less power, and also the cost also very low when
compared to microprocessor.
3. Used for products that performs only a specified task.
eg: air conditioner, microwave oven, remote controls etc..,
4. Only a single software application is generally used.
5. Using microcontroller only a specified task can be done basing on specified time
periods.
6. The memory size, number of ports etc.., are very limited.
7. A compact instruction or a reduced instruction set is generally used for the applications
when we use microcontroller.
8. The clock rates are slower when compared to microprocessor. They are in mega hertz.

The supply voltage for micro controllers ranges from 2v to 6v direct current. As our
mains supply is of 230volts A.C, we need a process of conversion of the power supply.

Microcontroller features:

Microcontrollers from different manufacturers have different architectures and


different capabilities. Some may suit to a particular application while some others may be
totally unsuitable. The hardware features of microcontrollers in general are described in
this section.

1. Supply voltage:

Most microcontrollers operate with the standard +5 V supply. Some


microcontrollers can operate at as low as +2.7 V and some will tolerate +6 V without any
problems. You should check the manufacturers' data sheets about the allowed limits of
the supply voltage.

2. The clock:

All microcontrollers require an oscillator (known as a clock) to operate.


Microcontrollers will operate with a crystal and two capacitors.
3. Timers:

Timers are an important part of any microcontroller. A timer is basically a counter


which is driven from an accurate clock (or a division of this clock). Timers can be 8-bits
or 16-bits long. Data can be loaded into the timers and they can be started and stopped
under software control. Most timers can be configured to generate an interrupt when they
reach a certain count (usually when they overflow).
Some microcontrollers offer capture and compare facilities where a timer value
can be read when an external event occurs, or the timer value can be compared to a preset
value and interrupts can be generated when this value is reached. Timers can also be used
to generate time delays in programs. It is typical to have at least one timer on every
microcontroller. Some microcontrollers may have three or more while some others may
have only two timers. The timer accuracy depends upon the type of clock device used and
a crystal device should be chosen for very accurate timing applications.
4. Watchdog Timer:

Many microcontrollers have at least one watchdog facility, also known as the
Watchdog Timer (or WDT). A WDT is usually an 8-bit timer with a percale option and is
clocked from a free running on-chip oscillator. The watchdog is usually refreshed by the
user program at regular intervals and a reset occurs if the program fails to refresh the
watchdog. Watchdog facilities are commonly used in real-time systems where it is
required to check the proper termination of one or more activities. All PIC
microcontrollers are equipped with a WDT.

5. Reset input:

This input resets the microcomputer. The reset logic is used to place the
microcontroller into a known state. The source of the reset can usually be selected by the
user and Power-on Reset (POR) is the most common form of reset in microcontrollers.
Most microcontrollers have resistors connected to the supply voltage and this ensures that
the microcontroller starts properly after the application of power (POR). Microcontroller
manufacturers specify the state of the various registers after a reset signal is applied to a
microcontroller. Some microcontrollers have internal reset circuitry which does not
require any external components.
6. Interrupts:

Interrupts are a very important concept in microcontrollers. An interrupt causes a


microcontroller to respond to external and internal (e.g. timer) events very quickly. When
an interrupt occurs the microcontroller leaves its normal flow of execution and jumps
directly to the Interrupt Service Routine (ISR). The source of an interrupt can either be
internal or external. Internal interrupts are usually generated by the built-in timer circuits
when the timer count reaches a certain value.

External interrupts are generated by the devices connected external to the


microcontroller and these interrupts are asynchronous, i.e. it is not known when an
external interrupt will be generated. An example is the analogue-to-digital (A/D)
conversion complete interrupt, which is generated when a conversion is completed.
Interrupts can in general be nested such that a new interrupt can suspend the execution of
another interrupt. Most microcontrollers have at least one, some have several interrupt
sources. In some microcontrollers the interrupt sources can be prioritized so that a higher
interrupt can suspend the execution of a lower interrupt service routine.

7. Brown-out detector:

Brown-out detectors are also common in many microcontrollers and they reset a
microcontroller if the supply voltage falls below a nominal value. Brownout detectors are
usually employed to prevent unpredictable operation at low voltages, especially to protect
the contents of EEPROM type memories. ARM microcontrollers are equipped with
Brown-out detector circuits.

8. Analogue-to-digital converter:
Some microcontrollers are equipped with A/D converter circuits. Usually these
converters are 8-bits, but some microcontrollers have 10- or even 12-bit converters. Some
microcontrollers have multiple A/D channels (e.g. PIC16F877 is equipped with eight
A/D channels). A/D converters usually generate interrupts when a conversion is complete
so that the user program can read the converted data very quickly. A/D converters are
very useful in control and monitoring applications since most sensors produce analogue
output voltages.

9. Serial input/output:
Some microcontrollers contain hardware to implement serial asynchronous
communications interface. The baud rate and the data format can usually be selected in
software by the programmer. The built-in timer circuits are usually used to generate an
accurate baud rate. If serial I/O hardware is not provided, it is easy to develop software to
implement serial data transfer using any I/O pin of a microcontroller. Some
microcontrollers incorporate SPI (Serial Peripheral Interface), I2C (Integrated
Interconnect), or CAN (Controller Area Network) bus interfaces. These enable a
microcontroller to interface to other compatible devices easily.

10. In-circuit programming:

In microcontroller development cycle, a microcontroller is normally removed


from its socket and then programmed using a programmer device. The programmed chip
is then re-inserted into its socket, ready for testing. This is usually very tedious work,
especially during the development of complex software projects. In-circuit programming
enables a microcontroller to be programmed while the chip is in the applications circuit,
i.e. there is no need to remove the chip for programming. This feature speeds up the
program development cycle considerably.

11. PWM output:

Some microcontrollers provide Pulse-width Modulated (PWM) outputs which can


be used in some electronic applications. One such application is to provide an effective
analog output from a microcontroller by varying the duty cycle of the PWM output. It is
possible to modify the period or the duty cycle of a PWM output by loading the
appropriate registers.

12. Capture-compare capability:

In some microcontrollers, the value of a timer register can be captured


dynamically and then compared against a preset value. When the timer value is
equivalent to the compared value, an output can be forced high or low.

13. Real-time clock:

Real-time clock is another feature which is implemented in some


microcontrollers. These microcontrollers usually keep the date and time of day and they
are intended for the consumer market and for some real-time tasks.
Microcontroller architectures:

1. Von Neumann Architecture (Princeton Architecture)


2. Harvard Architecture

Von Neumann architecture is used by a very large percentage of


microcontrollers and here all memory space is on the same bus and instruction
and data are treated identically. In the Harvard architecture, code and data
storage have separate blocks and separate set of buses to carry code and data,
this allows code and data to be fetched simultaneously, resulting in a more
efficient implementation.
ARM PROCESSOR

 ARM Processor was developed at Acorn computer limited of Cambridge,


England between 1983 and 1985.
 This was after RISC concept came out at Stanford and Berkeley universities in
1980.
 ARM uses Enhanced RISC Architecture.
 ARM (Acorn RISC machine) limited was found in 1990.
 ARM designed basic core structure and licensed it to many partners who develop
and fabricate new Micro Controllers and different chips.
 ARM processor is mainly intended in the development of embedded applications
which involve complex computations (High-end applications).

ARM ARCHITECTURE:

 ARM architecture is based on Enhanced RISC architecture (deviates from classic


RISC architecture).
 Embedded applications need to have :
 High code density
 Low power consumption rate
 Small silicon foot print
 A large uniform register file (bank).
 Load-Store architecture, where data processing operations involve only registers
but not memory locations.
 Uniform and Fixed length instructions.
 Good speed/power consumption ratio.
 High code density.

Enhancements to Classic RISC architecture:

 Control over ALU and Shifter (Barrel Shifter) which helps maximum usage of
hardware on the chip.
 Auto increment and Auto decrement of addressing modes to optimize program
loops.
 Load and Store multiple data elements through a single instruction, which
increases data throughput.
 A lot of branch instructions which can be used in conjunction with a number of
instructions, which maximizes execution throughput.

VERSIONS:
 V1 (1983-85) 26 bit addressing mode, no multiply or co-processor.
 V2 32 bit addressing mode, multiply, co-processor.
 V3 32 bit addressing.
 V4 Add signed and unsigned words.
 V4T Thumb instruction set (16-bit instruction set)
 V5T Superset of 4T with new instructions
 V5TE Add Signal processing

Examples:
ARM 6 V3
ARM 7 V3
ARM7TDMI V4T
Strong ARM V4
ARM 9E-S V5TE

ARM7TDMI-S PROCESSOR
The ARM7TDMI core is a member of the ARM family of general-purpose 32-bit
Microprocessors. The ARM family offers high performance for very low power
Consumption and small size.

The ARM architecture is based on Reduced Instruction Set Computer (RISC)


Principles. The RISC instruction set, and related decode mechanism are much simpler
than those of Complex Instruction Set Computer (CISC) designs. This simplicity gives:
• A high instruction throughput
• An excellent real-time interrupt response
• A small, cost-effective, processor macro cell.

The instruction pipeline:

The ARM7TDMI core uses a pipeline to increase the speed of the flow of instructions to
the processor. This allows several operations to take place simultaneously, and the
processing and memory systems to operate continuously.
A three-stage pipeline is used, so instructions are executed in three stages:
• Fetch
• Decode
• Execute.
During normal operation, while one instruction is being executed, its successor is being
decoded, and a third instruction is being fetched from memory.
The program counter points to the instruction being fetched rather than to the instruction
being executed. This is important because it means that the Program Counter (PC) value
used in an executing instruction is always two instructions ahead of the address.

Memory access:

The ARM7TDMI core has Von Neumann architecture, with a single 32-bit data bus
carrying both instructions and data. Only load, store, and swap instructions can access
data from memory.
Data can be:
• 8-bit (bytes)
• 16-bit (half words)
• 32-bit (words).
Words must be aligned to 4-byte boundaries. Half words must be aligned to 2-byte
boundaries.

Embedded ICE Logic:

Embedded ICE Logic is the additional hardware provided by debuggable ARM


processors to aid debugging. It allows software tools to debug code running on a target
processor. The Embedded ICE Logic is controlled through the Joint Test Action Group
(JTAG) test access port, using the Embedded ICE interface.

ARM LPC2148 Micro Controller:


ARM LPC2148 is a 64 pin Micro Controller which comes under ARM 7 version of ARM
processors. It comes under the processor core architecture ARM7TDMI-S.It is a 32 bit
Micro Controller .This is intended for high end applications involving complex
computations. It follows the enhanced RISC architecture. It has high performance and
very low power consumption. It has serial communications interfaces ranging from a
USB 2.0 Full Speed device, multiple UARTS, SPI, and I2Cs. Various 32-bit timers, dual
10-bit ADC(s), single 10-bit DAC, PWM channels and 45 fast GPIO lines with 9
interrupt pins.

Features:

 16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.


 32 + 8 kB of on-chip static RAM and 512 kB of on-chip flash program memory .
 In-System/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. In
addition, the LPC2148 provide 8 kB of on-chip RAM accessible to USB by
DMA.
 Two 10-bit A/D converters provide a total of 14 analog inputs, with conversion
times as low as 2.44 µs per channel.
 Single 10-bit D/A converter provide 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 with independent power and dedicated 32 kHz clock
input
 Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400
kbit/s), SPI and SSP with buffering and variable data length capabilities.
 Vectored interrupt controller with configurable priorities and vector addresses.
 Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.
 Up to nine edge or level sensitive external interrupt pins available.
 60 MHz maximum CPU clock available from programmable on-chip PLL with
settling time of 100 µs.
 On-chip integrated oscillator operates with an external crystal in range from 1
MHz to 30 MHz and with an external oscillator up to 50 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, USB, Brown-
Out Detect (BOD) or Real-Time Clock (RTC).
 Single power supply chip with Power-On Reset (POR) and BOD circuits: – CPU
operating voltage range of 3.0 V to 3.6 V (3.3 V ± 10 %) with 5 V tolerant I/O
pads.

Architectural Overview:

1. ON CHIP MEMORIES:

 It has a flash memory of 512KB which can be used for both code and data
storage.
 12KB is intended for boot loader i.e., user code flash memory is 500KB.
 Programming flash memory can be done via system serial port.
 This memory can be erased or programmed while running the application.
 It provides minimum of 1, 00,000 erase/write cycles with 20 years data
retention capability.
 It has on chip static RAM of 32 KB and 8KB is intended for USB usage.
2. VECTORED INTERRUPT CONTROLLER:

This controller accepts all interrupts as input and categorize them under different
interrupt modules. There are 3 types of interrupt modules

FAST INTERRUPT REQUEST: This got the highest priority. If only one
interrupt is available it will directly run from interrupt vector location. If more than one
interrupt is available VIC combines these signals and places them in a service routine.

VECTORED INTERRUPT REQUEST: This got the middle priority. It can


handle 16 interrupts from peripherals .It has a service routine size 0 to 15 of which 0 has
highest priority and 15 with lowest priority. We can directly assign any of the slots.

NON VECTORED INTERRUPT REQUEST: This got the lowest priority. If no


vectored interrupts are available, then these requests are attended.

 Each peripheral one line connected to VECTOR INTERRUPT CONTROLLER.

3.PIN CONNECT BLOCK: This blocks allows the pins of the Micro Controller to
perform multiple functions.
Configuration registers allows the multiplexers to allow connection between the pin and
peripheral.
After reset all pins of port0 and port1 are configured as input with following exceptions:
If JTAG debugger mode is active, then the JTAG pins will have JTAG functionality.
4.10-bit ADC: This Micro Controller has 2 ADC ports.
Port 0 has 6 channels and port 1 has 8 channels.

 10 bit successive approximation analog to digital converter.


 Measurement range of 0 V to VREF (2.0 V <= VREF <= VDDA).
 Each converter capable of performing more than 400,000 10-bit samples per
second.
 Every analog input has a dedicated result register to reduce interrupt overhead.

5. Real-time clock:

The RTC is designed to provide a set of counters to measure time when normal or idle
Operating mode is selected. The RTC has been designed to use little power, making it
suitable for battery powered systems where the CPU is not running continuously (Idle
mode).

Features:

 Measures the passage of time to maintain a calendar and clock.


 Ultra-low power design to support battery powered systems.
 Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of Week,
and Day of Year.
 Can use either the RTC dedicated 32 kHz oscillator input or clock derived from
the external crystal/oscillator input at XTAL1.
 Dedicated power supply pin can be connected to a battery or the main 3.3 V.

You might also like