04.11.2014 Views

Nuts & Volts

Nuts & Volts

Nuts & Volts

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■ BY PETER BEST<br />

ARM YOURSELF WITH PHILIPS<br />

MICROCONTROLLERS<br />

This time around, the object of our<br />

affection is the Philips LPC2100<br />

family of 32-bit ARM7 microcontrollers.<br />

In this text, we will focus<br />

specifically on building some<br />

LPC2106 and LPC2136 ARM7 hardware<br />

from scratch. Once the hardware<br />

is assembled, I’ll walk you through<br />

some functionality testing and<br />

introduce you to some of the<br />

hardware and software tools you’ll<br />

need to program and debug the ARM7<br />

microcontrollers.<br />

When we’re confident that all of<br />

our ARM7 hardware design work has<br />

been validated, we’ll look at what it<br />

takes to write some code to access<br />

the features of our newly crafted piece<br />

of 32-bit hardware. I’m not going to<br />

assume (that turns you into a donkey)<br />

that you know anything about ARM<br />

microcontrollers. With that, let’s<br />

begin our design process by gaining<br />

an understanding of the basic<br />

ARM architecture as it applies to<br />

the Philips LPC2100 family of ARM<br />

microcontrollers.<br />

THE LPC2106<br />

Although we will be designing<br />

one-half of our ARM7 support hardware<br />

around the LPC2106, we could<br />

also drop the LPC2104 or LPC2105<br />

into a very similar — if not identical<br />

— design. The LPC2104, LPC2105,<br />

and LPC2106 are pin-to-pin compatible<br />

and are all based on the 16/32 bit<br />

86 April 2006<br />

THE<br />

DESIGN<br />

ADVANCED TECHNIQUES FOR DESIGN ENGINEERS<br />

ARM7TDMI-S CPU.<br />

If you’re wondering where the<br />

16-bit functionality resides, the<br />

ARM7TDMI-S CPU core can run in<br />

what is termed THUMB mode, which<br />

is a code efficient 16-bit mode of<br />

operation. I’m going to stick with the<br />

32-bit ARM mode in our scratch-built<br />

projects. So, we won’t be employing<br />

THUMB mode in any of our code<br />

designs.<br />

Compared to standard eight-bit<br />

microcontrollers, the LPC2100 ARM7<br />

devices are Flash and SRAM rich. All<br />

of the aforementioned LPC2100<br />

ARM7 variants come out of the box<br />

with 128KB of Flash. The LPC2104<br />

contains 16KB of SRAM and the<br />

LPC2105 houses 32KB of SRAM.<br />

We’re designing with the Big Daddy<br />

of the bunch, as the LPC2106 is<br />

packing 64KB of SRAM on top of the<br />

128KB of Flash.<br />

The large amounts of Flash and<br />

SRAM are complimented by the<br />

ARM7 CPU’s speed. The ARM7TDMI-S<br />

CPU core is supported by a 128-bit<br />

wide memory interface and an accelerator<br />

subsystem that can execute<br />

32-bit instructions at clock speeds up<br />

to 60 MHz. The LPC2100 devices are<br />

based on Reduced Instruction Set<br />

Computer (RISC) operating principles,<br />

which makes the instruction set<br />

and the hardware that processes the<br />

instruction set simple in comparison<br />

to Complex Instruction Set Computer<br />

(CISC) architected microcontrollers.<br />

CYCLE<br />

IN THE PREVIOUS PAIR OF DESIGN CYCLE COLUMNS, we explored the<br />

nuances of the Freescale MC68HC908MR16.This month, we’re going to up the<br />

ante a bit and jump out of the eight-bit microcontroller universe and warp into<br />

the 32-bit microcontroller sector of the microcontroller galaxy.<br />

Most of the time, when it comes down<br />

to efficiency in computing systems,<br />

simpler is better. In the case of the<br />

LPC2104, LPC2105, and LPC2106, the<br />

previous statement holds true.<br />

A cursory look at Figure 1 will tell<br />

you that the LPC2106 achieves its<br />

blazing speed by tying all of the<br />

ARM7 CPU subsystems together with<br />

high speed busses. Standard microcontroller<br />

crystals are used to feed<br />

the input of the LPC2106’s PLL<br />

(Phase Locked Loop), which is used<br />

to multiply the base crystal oscillator<br />

frequency.<br />

In addition to the standard<br />

microcontroller reset, crystal oscillator,<br />

and external oscillator inputs, the<br />

LPC2106 implements an industry<br />

standard JTAG interface, which allows<br />

external applications to access the<br />

LPC2106’s internals via a piece of<br />

integral JTAG hardware. The LPC2106<br />

can be debugged and programmed<br />

using the microcontroller’s JTAG pins.<br />

The LPC2106 can also be programmed<br />

by activating the on-chip<br />

In-System Programming (ISP) and<br />

In-Application Programming (IAP)<br />

boot-loader firmware. The LPC2106<br />

Boot Loader is used in conjunction<br />

with the LPC2106’s ISP subsystem<br />

and UART0 to program the LPC2106.<br />

Programming Flash program<br />

memory locations using IAP is<br />

performed under user program<br />

control. In either mode — ISP or IAP<br />

— the LPC2106 on-chip Boot Loader

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!