While I relay my experiences, my hope is to make it easier for you, gentle reader, to jump into the wonderful world of ARM along with me. ARM processors have their place in robotics and electronics, can be inexpensive like this LPC2101, and can be very powerful. (You can find more NXP ARM processors from Newark here)
I hope to show that you don't need expensive breakout boards or cumbersome evaluation boards, and you can use free toolchains. So... let's get started...
Here's how this 32-bit NXP ARM7 microcontroller, and it's brethren, stacks up against a good ol' 8-bit AVR ATmega328P (e.g., Arduino Duemilanove):
|ATmega328P||20 MHz||32k||2k||80 kSPS||1||1||1||$4.41|
|LPC2101||70 MHz||8k||2k||400 kSPS||2||2||1||$3.80|
|LPC2103||70 MHz||32k||8k||400 kSPS||2||2||1||$4.40|
That's just to give you an idea. Note that the AVR can only convert at 80kSPS at reduced resolution. Also, the ARM has a built-in boot loader. No need for scary JTAG programming. The LPC2102 falls between the '1 and '3 in flash/sram size.
Starting with nothing but a little 48-pin LQFP processor is a bit daunting. Don't panic. Building a circuit with all the necessary power and support components is actually pretty easy and not really different from other processors like the AVR ATmega series or the Parallax Propeller.
All you need is...
- a 12MHz (or appropriate) crystal and two 16pF caps,
- a 1k reset pull-up and 0.1uF debounce cap,
- a serial in-circuit programming header,
- 3.3V and 1.8V power supplies, and
- some decoupling caps.
|ARM LPC2101/2/3 schematic, click to enlarge.|
Soldering surface mount, particularly QFP chips can be very tedious and irritating. You have to delicately line up the chip and hope you don't bump it when you try to tack down the first pin. And I've only messed with larger pitch QFPs, not a 0.5mm pitch like this LPC2101.
Enter Schmartboard products. Some time ago I received some Schmartboard products to review. The Schmartboard concept is to simplify surface mount hand-soldering so that anyone can easily do it.
The boards use a custom fabrication process, "EZ" technology, that creates grooves for chip leads to sit in. The pads are sunken, in other words, below the solder mask, and are pre-tinned. All you have to do is stick the chip in the grooved pads, and then, pin by pin, 'push' solder towards the pin. It works.
Here's how to implement the circuit above on a Schmartboard for QFP. I've color-coded the Schmartboard holes with a key in the upper right.Use the unused holes in the corners as needed to propagate Vcc, Gnd, etc.
After you add in the caps and pullups (my board has additional pullups, too), you can then solder your voltage regulators (I used simple 1117-type SOT-223 sized 3.3V and 1.8V regulators) onto another Schmartboard made for a variety of SOT, DPAK, etc packages. Then connect the power between boards and you get something like this:
|Note the successful blinking LED on the red breadboard...|
All you need for in circuit programming are 5-7 lines. You can use a 6-pin Sparkfun FTDI breakout board as I did.
- Ground connect to, duh, Ground
- TX (TTL serial) connect to RXI
- RX (TTL serial) connect to TXO
- !RST (connected to DTR
- P0.14 (program mode selector) - connect to ground when ready to program
- 5V (ish) to your regulators (optional)
The next article will cover using the Flash Utility to upload a hex program, as well as covering a development environment for writing my first hello world program in C.
In a later article I'll review the second ARM Newark sent, a nice little Texas Instruments Stellaris 1000-family processor.