Tools

Getting Started with Embedded Development

By Craig A. Lindley, October 26, 2009

Introducing the concepts of embedded uC development

Craig A. Lindley is a degreed hardware engineer who, until recently, had been writing large scale Java applications. Craig has authored over 40 technical articles on various programming topics and has published five books dealing mostly with multimedia. He can be contacted via email at [email protected]

Developing large software systems can be rewarding on many levels. Sometimes, however, developing software for the smallest of systems can prove to be equally pleasurable and in many cases can be down right fun. Developing large software solutions requires functional specifications, meetings and group think mentality. Developing small embedded systems is in many case an individual endeavor where one can get their hands and their minds around the whole thing. In addition, there is something magical about controlling a piece of hardware with software you have written.

Over the course of my career I have developed software for the smallest of embedded systems and software for large business applications deployed in large data centers. Now that I'm programming more for fun than for profit, I'm having a great time designing and building custom hardware devices based upon embedded microcontrollers. Throughout this article I will use the term "uC" to denote a microcontroller. Microprocessor are different from uCs is that uCs typically have many on-chip peripherals/subsystems to make system design easier (and to keep external part counts low). This includes on-chip RAM for data storage and FLASH or other type of memory for program storage.

In the last year and a half, I have designed and built (and published articles about) a digital color organ based upon the Texas Instrument's (TI) MSP430 F2012 processor (see Nuts and Volts magazine, September/November2007 and January 2008), a toy web server based on the 8-bit PIC18LF2620 uC (Nuts and Volts, July 2008) and a personal, low-power web server based upon the NetBurner Mod5270 (Dr. Dobb's , November 2008). In doing these projects I used three different uCs with their associated development environments and was pleased in each case with the result.

My purpose with this article is to acquaint you with the concepts of embedded uC development in the hopes that you may take on a project of your own. In addition I want to show you that there isn't any magic to embedded system design, that the development tools are way better than they used to be and their cost is no longer a barrier to entry.

A Range of Microcontrollers for Any Project

There are many companies (to numerous to mention here) playing in the uC space. Some like Atmel, Microchip, Parallax, and Texas Instruments provide chips, development hardware, and design support services to end users. Other companies like Arduino and NetBurner provide built and tested boards and the development tools needed to utilize them. You'll find uCs that cover the full spectrum of functionality and performance for any project you can envision. From lowly 8-bit devices with hundreds of bytes of RAM and 1K of program memory (FLASH or otherwise) to 32- or even 64-bit screamers with over 2 MBytes of RAM and 512 KBytes of FLASH. You can even find devices like the Propeller from Parallax that has eight distinct processor on a single chip. And the best thing about these devices is that, unlike everything else, they are continually dropping in price while their performance keeps increasing. We get more bang for the buck for our designs all the time. SparkFun Electronics has a lot of interesting electronic components and modules which can be interfaced with uCs.

Modern uCs come with an impressive array of on-chip peripherals including: timers, counters, analog to digital converters, pulse width modulators, uarts, network interfaces, digital I/O, etc. in addition to on-chip RAM and program memory. To make things even more attractive, many of the manufacturers provide extensive code libraries for things like real-time operating systems, TCP/IP, FAT file systems and various network protocols (SMTP, FTP, etc.) you are free to use in your projects that shrink your development time substantially.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!