Log in

No account? Create an account

Previous Entry | Next Entry


There's a wide range of Microcontrollers out there for all sorts of purposes, but I've noticed a definite progression.

Us tinkerers begin by playing with a Parallax Basic Stamp, and our minds explode with the possibilities. We play with lots of designs and ideas, then quickly get frustrated by having to program in BASIC. We love the accessory parts from Parallax, but we need more speed.

Some folks stray down the PIC path, but that is a painful architecture that twists programmers into warped assembly coders. :) It's just not a fun experience. The available chips are very small, very cheap, but rather low power. Oddly, there are folks who absolutely love the PIC chips, and they hate the Atmel way, and vice-versa. I haven't seen much overlap.

The Atmel chip path for the tinkerer really starts with the Arduino. This has many advantages, including 16MHz speed, more program space (16kB Flash, 512B RAM), and you can code in C or C++. The community around it is large, and there's lot of code and example available for it. There are standardized "shields" for numerous tasks, so you can just slap boards together to do many things. But eventually, we wanna do something that just doesn't fit inside 16kB. Also, though you can code for it in C or C++, the community built around it is obsessed with an almost-C++ language called "Processing", which requires using the Arduino software. Which is really just icky and simplistic as IDEs go.

For more program space and memory, we can go to the Sanguino. This is just like an Arduino, with all the benefits of shields, software and such, and it has 64kB of Flash and 2kB of RAM. But again, Processing. The G-code controller I wrote won't fit in an Arduino, but the Sanguino handles it just fine.

The Arduino and Sanguino can be used with a USB adaptor for programming and communication, but it's throttled through a 38400 baud serial link. You can't really make custom USB devices with it. For that, you need a Teensy or a Teensy++. These boards live up to their name. They are small, generally USB powered, and have no power regulator of their own. The current generation are a fair bit more powerful than the Arduino/Sanguino they are so closely related to, with 32kB and 128kB program flash respectively. They can come in a DIP package similar to the old Basic Stamp, so that you can use them with Breadboards easily, or socket them into another board. You can program with one of a couple USB libraries to make direct custom USB devices. Or they can pretend to be keyboards or mice or serial ports. The USB is running at full USB 1.2 speeds, so data communication with the chip goes as fast as your program can process it, and programming is very fast. You can use the Arduino software with the Teensys, to take advantage of the large community. The main downside of the Teensy is that it uses the proprietary Halfkay bootloader, which will get some folk's knickers in a twist.

Some projects, though, just need a lot more power than an 8-bit microcontroller can throw at the problem. Thus we graduate to a 32-bit solution like the ARM processor. The Make Controller Kit is a powerhouse. It has 256kB of flash, and 64kB of RAM to play with. The 32-bit ARM7 architecture makes it much faster for doing serious number crunching. This kit is ideal for robotics, as it comes with eight 1 Amp H-bridge switched outputs. You get USB and Ethernet connectors, and a Realtime OS as well, to let you do concurrent tasks. Programming for this is a dream.

Another more specialized and fun ARM platform is the Nintendo Gameboy Advance. No really. With an Xport from Charmed Labs you can make it control all sorts of hardware. The GBA comes with an ARM7 processor, 256kB RAM, a battery, a full color LCD display, and 10 built-in buttons. The Xport card comes with an FPGA chip with either 50k or 150k gates, which you can use to configure your 63 outputs to be whatever you want, from digital IO, to serial UARTs, to keypad readers, to stepper motor controllers. You can even code up an in-hardware division processor to really speed up calculations. You have to learn Verilog or VHDL to be able to reconfigure the FPGA, but you can do some amazing things with it. I actually used a GBA and an Xport to read a GPS and calculate star, planet, and iridium satellite positions, so that you could use the display to show a star map, or let you select a celestial object for it to point at with an 80mW laser turret.

Mind you, I didn't follow this progression in order. I went Basic Stamp to GBA+Xport to Teensy++ to Arduino and Sanguino. I lust after the Make Controller, but haven't needed it yet.


( 11 comments — Leave a comment )
Dec. 6th, 2009 11:26 pm (UTC)
This is giving me serious "everything I want to do has already been done" twitchiness, but is still very cool };>. Re. 32-bit processors, my understanding is that Atmel has a line of "AVR32" processors as well as the ARM-compatible processor used in the Make kit, but the Make kit is also very nifty.

Re. GBA hacking, I've mostly been scared off by your story about zapping the FPGA on one of your star-tracker attempts };>. Not having the free time or money to properly play with it may also be a factor =^.^=.

Thanks for the very informative post!

Dec. 7th, 2009 05:15 pm (UTC)
I only fried 3 FPGAs! Maybe four.
Dec. 7th, 2009 05:45 pm (UTC)
I don't feel as bad about putting ridiculous amounts of ESD protection on my homebrew boards now };>.

Dec. 7th, 2009 06:23 pm (UTC)
We fried ours the old fashioned way, with 12V to the inputs of a 5V max chip.
Dec. 7th, 2009 06:42 pm (UTC)
My ESD protection would have taken that (I called it "ridiculous" for a reason ;)). Downside was that it increased board size and part count by 30% for that project.

Dec. 7th, 2009 12:12 am (UTC)
Hey! You forgot where most of us old-timers really cut our teeth. 68HC11 all the way, baby! ;)
Dec. 7th, 2009 06:21 pm (UTC)
I've heard of that chip, but I know next to nothing about it.
Dec. 7th, 2009 01:10 am (UTC)
Written like a programmer...
...hardware geeks like PIC. It makes basic sense, early on.
Dec. 7th, 2009 06:14 pm (UTC)
Re: Written like a programmer...
Aha! That would explain the PIC/Atmel schism.
Dec. 7th, 2009 04:12 am (UTC)
How about OMAP boards like Beagle with OpenGL and HDMI, capable of running Linux at 733 MHz?
Dec. 7th, 2009 09:23 am (UTC)
That's not an embedded board, that's a miniature PC in a box! };>

(That said, I've been drooling over the Beagle boards a co-worker has been working with.)

( 11 comments — Leave a comment )