Dr. Dobb's Journal November 2001
Although written by different authors with somewhat differing intent, Embedded Controller Hardware Design, by Ken Arnold, and Programming Microcontrollers in C, Second Edition, by Ted van Sickle, both members of LLH's Embedded Technology Series, go together and share strengths and weaknesses. What makes them a nice match for practitioners in the field of embedded development is that their strengths and weaknesses dovetail nicely with the strengths and weaknesses of the embedded systems practice in general.
Luckily, there's still grimy embedded control work in this industry to make sure that programmers who want to know their profession from the foundations upwards still have the chance to learn. I took that route in the 1980s, and Embedded Controller Hardware Design feels as if someone had been watching over my shoulder and recorded what I learned randomly, then put all that into the order in which it should be learned. While the lesson is practical, the moral is profoundly theoretical.
Embedded Controller Hardware Design might alternatively have been called "What the Embedded Systems Programmer Needs to Know About Embedded Controller Hardware Design." That is, it's not about electronics engineers designing embedded systems hardware so much as it is about expounding such hardware design to programmers and designers who aren't primarily electronics engineers. The book does assume some familiarity with the fundamentals of digital electronics, knowledge easily derived from a classic such as Myles Marks's Basic Integrated Circuits (TAB Books, 1986, ISBN 0-8306-0509-6).
Ken Arnold runs lightly through basic logic design without neglecting to elucidate real world encroachments upon pristine theory such as leakage and tristating. These are anomalies of the sort that puzzle and irritate programmers, many of whom are accustomed to assume unreflectingly that computational hardware behavior reflects high-level languages' modeling of computation, instead of the other way around, as is so often the case.
In the cubicle jungle, it's usually easy to identify the programmers who haven't had hardware exposure: They're the ones who view the occasional obtrusion of physical limits of electronic digital computing almost as a personal affront, as a display of wanton perversity on the part of the designers or the tool vendor. Standardized hardware and software design for workstations tend to shield one from having to deal with such realities.
Embedded systems programmers enjoy no such luxury. The reward for the austerity of their practice is that those who have descended to the gate, and to the quantum level, are better programmers than those who haven't. How we do what we do is never totally separable from what and why we do what we do, in computing as in life. For the up-and-coming programmers to retire prematurely behind the veil of high-level languages and protected operating environments is to nearly guarantee their intellectual sterility and to inculcate a precocity of style, which is no substitute for the hardy practicality of the hardware cognoscenti.
Embedded Controller Hardware Design covers all the stuff you'll see if you're down there in the 68K/x86/8031-32-43-51-52 ghetto instead of uptown with the VME boys. The processor actually described in the book is of the latter, 8031/51 family, but the principles are the same. PALs, inputs, outputs, memory cycles, wiring capacitance, busses, power supply, reset circuitry, all the minutiae that doesn't seem so important while you are grinding out code gets covered.
The book comes with a CD-ROM containing the full text of the book in Adobe PDF or eBook format along with sample chapters of related LLH publications, some hardware designs by the author, and a decade-old 8051 software development kit that still is entirely adequate for 8051 programming. When you're dealing closely with the hard reality of electronic digital computing, change doesn't come as rapidly as in the desktop world, just as storms on the surface don't always churn the bottom of the sea.
Embedded Controller Hardware Design is well designed, well edited, and quite readable, having grown out of a university course taught by Arnold. The book also has its own web site at http://www.EmbeddedControllerHardwareDesign.com/.
Likewise, Programming Microcontrollers in C, by DDJ author Ted van Sickle, is of a similar intent, aimed at those more concerned with using C to produce a wave form on an output than with the ideological rigors of the C language per se. C purists might balk at van Sickle's terse exposition of the language, just as a degreed electronics engineer might balk at Arnold's capsule expositions of transistor circuits in Embedded Controller Hardware Design.
No matter. It's enough C, probably more than enough C, for many embedded systems programmers who usually have less trouble with the code itself than with the compiler, run-time environment, and debugger. Besides, the book isn't about C it's about using C to turn stuff on and off in a timely fashion.
Programming Microcontrollers in C uses the Motorola family of low-end microcontrollers to make its many points about techniques of embodying control algorithms in C on minimal computational hardware. The essentials of everything one is likely to have to do in C with a microcontroller such as the author's favorite Moto 8-bit and 16-bit designs are covered. If Forth was still popular, I'd dig up my old examples and notes from an exhaustive practice on the late lamented Intel 80196 and peddle an eerily parallel, but in no way more comprehensive, volume for Forth programmers.
Programming Microcontrollers in C also comes with a CD-ROM. The contents are the full text of the book in Adobe PDF or eBook format along with samples of other LLH publications, several Motorola microcontroller manuals, the examples and headers from the book, and a very old C compiler. It's entertaining to see that tools like this one, which I seem to remember downloading from a dialup BBS over a decade ago, are still apropos to what can reasonably be called the mainstream of embedded systems.
DDJ