Tweet Follow @jack_ganssle
Go here to sign up for The Embedded Muse.
Logo The Embedded Muse
Issue Number 239, April 1, 2013
Copyright 2013 The Ganssle Group

Editor: Jack Ganssle,
Jack Ganssle, Editor of The Embedded Muse

You may redistribute this newsletter for noncommercial purposes. For commercial use contact To subscribe or unsubscribe go to or drop Jack an email.

Editor's Notes

The average embedded software project devotes 50% of the schedule to debugging the code. It's stunning to realize that half of the project's time is wasted fixing mistakes.

Perhaps the other half should be called "bugging."

Unfortunately that debugging just doesn't work. Most organizations ship with about ten bugs per KLOC, two orders of magnitude worse than best-in-class outfits. A focus on fixing bugs will not lead to a quality product.

How do you get projects done faster? Improve quality! Reduce bugs. This is the central observation of the quality movement. The result is a win-win-win: faster schedules, lower costs and higher quality. Firmware engineering, too, can - and must - profit from the same win-win-win.

Learn how (and far more) at my Better Firmware Faster class, presented at your facility. See

Quotes and Thoughts

"You can't have great software without a great team, and most software teams behave like dysfunctional families." - Jim McCarthy

Tools and Tips

Please submit neat ideas or thoughts about tools, techniques and resources you love or hate.

Tom LeMense likes Bus Pirate:

I'd like to share my experience with a short review of a Cool Tool that I didn't see referenced on your website - the Bus Pirate by Dangerous Prototypes.

The Bus Pirate is a low-cost, open-source, universal bus interface tool. It's a small USB-based gadget that speaks a whole slew of serial protocols - I2C, SPI, JTAG, 1-Wire, Asynch, MIDI, and others. With the Bus Pirate, a more interactive style of interfacing with serial devices is possible. This avoids the need to create special test code during debugging, or to create host hardware and software to evaluate new devices. Control is accomplished through a VCP to your favorite terminal program, with all commands in human-friendly ASCII. There's also a binary mode that's more amenable to scripting and automated setups. The unit itself is an un-enclosed PCB about 40 x 60 mm. A mini B USB provides com and power. A standard 10-pin 0.1" header is provided for I/O connections; both 3.3V and 5V logic levels are supported, and integrated configurable pull-ups (e.g. for I2C) are software selectable. I find the Bus Pirate to be an ideal companion to my Saleae Logic logic analyzer; both are small and USB powered and therefore very convenient for desktop and field use. The Bus Pirate was developed by Dangerous Prototypes, is well documented on the DP website, and is available from several sources world-wide. In the USA, the Bus Pirate can be had for around $30. I'm more than satisfied with my purchase and have recommended the Bus Pirate to many other engineers.

Disclosure: I have no relationship with Dangerous Prototypes nor the Bus Pirate resellers, other than being a satisfied customer.

Shaun Greene wrote:

I recently found a new tool that I have been using a lot while working on firmware. SciLab is almost source code and functionally compatible with MATLAB, but is free and open source (CeCILL license, GPL compatible). I occasionally need MATLAB like functionality to quickly test algorithms or plot data that is a bit too large or complex for Excel, and SciLab has been great for that. My company couldn't justify the licensing expense of MATLAB since I don’t do "production work" with it, but I have saved many hours using SciLab. I hope that somebody else can learn about this great tool and save some time (and $) for them as well.

SciLab isn't perfect, and has a few quirks, but I was really impressed by the functionality it does have. If you are needing it on a daily basis, I think MATLAB is still a more professional and well built product, but for what I do, SciLab has been sufficient.

What I'm Reading

A Generation Lost in the Bazaar - Poul Henning-Kamp's critique of some of the changes in software engineering we've seen in the last decade or two.

The Age of the Sentient Machine is Upon Us - Grady Booch thinks thinking machines are coming, and they'll be a disaster. I think the problems will occur long before/if machines ever get sentient; when robots can make robots will labor have any value?

Blogs and Web Sites

Russell Zauner had a suggestion for a worthwhile blog:

I'm surprised you didn't mention Design & Reuse.

I found them over a decade ago and as far as semiconductor news aggregation goes, I have yet to find anyone more thorough, to the point, neutral, or quite frankly better. I subscribe to their monthly email. It's always plenty of fodder and it has a mix of industry articles and news as well as their own content.

Leland Hamilton suggested, a weekly newsletter that helps one deal with Window's quirks.

Review of the Extech EX330 Multimeter

Ex330 DMM

You can't operate without a digital multimeter (DMM), but be prepared to write a big check for some units. I'd love to get one of Agilent's 34401A 6.5 digit beauties, for instance, but at $1100 it's more meter than I need or can justify.

There are a lot of inexpensive hand-held products (as well as expensive ones) available today. Extech has a variety of popular offerings. I recently acquired one of their EX330 models, which seems a robust, well-made unit.

Features include 4000 count LCD display, autoranging, the usual V, R, and A measurements, plus the ability to read capacitors, frequency and temperature with an included type-K temperature probe.

The unit has a non-contact voltage sensor; hold it against power mains and a light illuminates while the unit makes a strange squeaking sound. It works, to a point, when held right over 110 VAC outlets or switches, but I couldn't make it sense the wires through drywall. The manual does say one must hold the meter "very close" to the power source. So it's somewhat useful for seeing if an outlet has power without the associated risk of plugging meter leads into the outlet itself. This looks like a feature I'll never use.

I don't have a calibration lab so can't speak to its accuracy, though it matched my other instruments well. The devil is in the details; one must look at the specs closely. DC voltage is claimed to be accurate to 0.5% to 1.5% (depending on range) + 2 digits, which is pretty good for this class of device. AC voltage is about the same though the 2 digit error is replaced by 3 or 4 (except the 400 mV range which is 30 digits! I'm sure that's a misprint.) Temperature is 3% + 8 digits, plus unstated errors in the probe. Given that the resolution is 1 degree (F or C) that represents an awful lot of error.

The autoranging works well except when trying to measure capacitors. One switch position covers caps, diodes and resistors, and in some cases when trying to autorange on a capacitor it never leaves ohms mode. With autoranging disabled it reads capacitors just fine.

The autorange can be slow in resistance mode! Up to 4 seconds were needed at times, which doesn't sound like much but can seem an eternity when testing a lot of resistances.

The frequency measurements (0.001 Hz to 10 Mhz) are very fast. Just for fun I fed some non-sine waves in, and found it's perfectly happy with square waves, ramps, and even a cardiac signal! Pulses don't phase it at all; it gave accurate frequency measurements even on odd signals like a 5 MHz pulse 20 nsec wide. Duty cycle results were noisy on sine and square waves, and rather erratic on the admittedly-tough pulses.

The display's digits are big (1") and readable but really could use more contrast. There's a rubber case which should give it plenty of shock protection; DMMs can have a hard life.

At $58 (from Amazon) this is much cheaper than an equivalent Fluke. But it's not a Fluke, and won't light up your face with the delight one finds from working with the very best equipment. I find the Extech 330 to be an adequate DMM for most needs, and for digital people coping with some analog issues it's more DMM than you'll need. You can't beat the price.

A Toastal Story

In honor of April Fool's Day here's a piece I wrote in 1997. Some of the technology references are a bit dated!

Day 1. My boss, an engineer from the old pre-CAD days, has successfully brought a generation of products from Acme Toaster Corporation's engineering labs to market. Bob is a wonder of mechanical ingenuity. All of us in the design department have the utmost respect for him, so I was honored today when he appointed me the lead designer on the new Acme 2000 Toaster.

Finally, after 4 years of undergrad work in mechanical engineering at MIT, and almost a decade working in the appliance group here at Acme, they've recognized my talents and have given me the responsibility I've yearned for. I'm excited about this challenge.

Day 6. We met with the president, head of sales, and the marketing VP today to hammer out the project's requirements and specifications. We agreed to meet a cost of goods of $9.50 in quantities of 100,000. I've identified the critical issue in the new design: a replacement for the timing spring we've used since the original 1922 model. Research with focus groups shows that consumers set high expectations for their breakfast foods. Cafe Late from Starbucks goes best with a precise level of toastal browning. The Acme 2000 will give our customers the breakfast experience they desire.

I estimated a design budget of $21,590 for this project, and final delivery in 7 weeks. I'll need one assistant designer to help with the drawing packages. This is my first chance to supervise! I'm looking forward to making the hire and mentoring this person.

Like all Acme meetings we reached these decisions by consensus. The company is family owned and is operated, well, I guess the best word is "gently". The little friction that occurs is always resolved fairly. We work hard but in harmony. It's a place I hope to retire from in 30 years, as my father did.

Day 23. We've found the ideal spring material. Best of all, it's a well-proven technology. Our projected cost of goods is almost a buck-fifty under goal.

The rough prototype (completed in just 12 days from the go-ahead!) has been servicing the employee cafeteria for the last week without a single hiccup. Toastal quality exceeds projections. There's still a lot of work ahead, as we do the production engineering that is so important to producing a reliable product.

Day 24. That block of Acme stock sold to the Mackenzie family in the 50s was just snapped up by a major aerospace company which had run out of defense contractors to acquire. At a company-wide meeting we were assured that this was an investment only, and that nothing will change. They will send in a couple of auditors, but this is just to help us find ways to do things more efficiently.

Day 30. I showed the Acme 2000's exquisitely crafted toastal timing mechanism to Ms. Primrose, the new engineering auditor today. The single spring and four interlocking lever arms are a thing of beauty.

I wonder if her constant sniffing annoys the others as much as it does me?

Day 36. The design is complete. We're starting a prototype run of 500 toasters tomorrow. I'm starting to wrap up the engineering effort. My new assistant did a wonderful job. We're cleaning up the drawings and getting ready for our next project.

Day 38. Suddenly a major snag. Bob called me into his office. He seemed very uneasy as he informed me that those "on-high" feel the Acme 2000 is obsolete. Something about using springs in the silicon age.

I reminded Bob that the consultants had looked at using a microprocessor, but figured an electronic design would exceed our cost target by almost 50% with no real benefit in terms of toastal quality. "With a computer our customer can load the bread the night before, program a finish time, and be presented with the perfect slice of toast when he awakens", Bob intoned as if reading from a script.

Day 48. Chuck Compguy, the new microprocessor whiz, scrapped my idea of using a 4 bit dedicated CPU. "We need some horsepower if we're gonna program this puppy in C," he extolled, while I stared fascinated at the old crumbs stuck in his wild beard. "Time-to-market, you know. Delivery is due in 3 months. We'll just pop this cool new 8 bitter into it, whip up some code, and ship to the end-user."

"What's an 'end-user'?" I muttered as I headed back to the office, wondering what had happened to our original schedule.

Day 120. The good news is that I'm getting to stretch my mechanical design abilities. Chuck convinced management that the old spring-loaded press-down lever control is obsolete. I've designed a "motorized insertion port", stealing ideas from a CD-ROM drive. Three cross-coupled safety interlock microswitches insure the heaters won't come on unless toast is properly inserted. We're seeing some reliability problems due to the temperature extremes, but I'm sure we can work those out.

Day 132. New schedule; delivery now expected in three months. We've replaced the 8 bitter with a Harvard Architecture 16 bit 3 MIPs CPU.

Yesterday Bob spent over an hour yelling at the engineering team. Chuck just shrugged his shoulders and whispered "This always happens." I hope Bob is OK; maybe he's just short on sleep.

Day 172. New schedule; delivery now expected in three months. Bob spends a lot of time throwing stuff in the lab. For the first time I've actually been working weekends. I mentioned it to Chuck and he mumbled "Saturday? Saturday? It's Saturday? So what, we always work weekends."

Day 194. The auditors convinced management we really need a GUI with a full-screen LCD. "You're gonna need some horsepower to drive that," Chuck warned us. "I recommend a 386 with a half-meg of RAM." He went back to design Rev J of the PCB.

Bob is starting to look a lot like Dilbert's boss, even to the hair sticking up vertically.

Day 268. We've cured most of the electronics' temperature problems with a pair of fans, though management is complaining about the noise.

Bob sits in his office all day, door locked, drinking Jack Daniels. Like clockwork his wife calls every night around midnight, sobbing. I'm worried about him, and mentioned this to Chuck. "Wife? Wife? Yeah, I think I've got one of those, and 2 or 3 kids too. Now let's just stick another meg of RAM in here, OK?"

Day 290. New schedule; delivery now expected in three months. Chuck has gained even more weight; his teeshirts are ripped, though I'm not sure if that's from the extra flab or from stiffening caused by congealing food.

We gave up on the custom GUI and are now installing Windows CE. The auditors applauded Chuck's plan to upgrade to a Pentium with 32 Mb of RAM. There's still no functioning code, but the toaster is genuinely impressive. Four circuit boards, bundles of cables, and a Gb of hard disk. "This sucker has more computer power than the entire world did 20 years ago," Chuck boasts proudly.

Day 340. The toast application sometimes starts but often gives General Protection Faults. The auditors are considering Chuck's solution - have the end-user call in the GPF address to our new toll-free support line. We'll send the end-user a complementary slice of bread.

Day 384. New schedule; delivery now expected in three months. Toastal quality is sub-par. The addition of two more cooling fans keeps the electronics to a reasonable temperature, but removes too much heat from the toast. I'm struggling with baffles to vector the air, but the thrust of all these fans spins the toaster around.

Bob seems worse. All day long we hear him keening "Kill them all! Kill them allllll...." After the acquisition our medical plan was downgraded so there's little help available for him. "I've seen it all before," Chuck confided in me, "I told 'em not to remove the mental health benefits."

Day 410. We switched from C++ to Java. "That'll get them pesky memory allocation bugs, for sure" Chuck told his team of 15 programmers. This seems like a good idea to me, since Java is platform independent, and there are rumors circulating that we're porting to a Sparcstation.

Day 480. New schedule; delivery now expected in three months, just as soon as we get those last few bugs resolved. To reduce power consumption the computer now sequences fans alternately, but this seems to cause toastal burning during Java's garbage collection phase. Chuck has assured us that a new release of the Virtual Machine is almost due, which will probably cure this problem.

The carted Bob off on a stretcher today. It's a shame all of the new hires in engineering never got to know him in his prime. They watched sullenly as the paramedics wheeled him out, muttering things like "Another one down. They'll never take me out like that."

Day 530. I mastered the temperature problems by removing all of the fans and the heating elements. The Pentium is now thermally bonded to the toast. We found a thermal grease that isn't too poisonous. Our marketing people feel the slight degradation in taste from the grease will be more than compensated for by the "toasting experience that can only come from a CISC-based 32 bit multitasking machine running the latest multi-platform software."

We're having some problems with the TCP/IP suite Chuck's networking group (now up to 23 programmers) wrote. Management agreed to purchase a commercial package, though our royalty costs for various software components is already up to $23 per toaster.

His OS department figured out how to get real time software upgrades downloaded with hardly any effect on toastal quality. They're trying to reduce boot time to 10 minutes.

The user's manual is taking shape. The product documentation team has done a tremendous job, producing a 4 color 700 page manual in only twice the time anticipated.

When I asked what we'll do with all of these developers after the product ships, Chuck told me "why, move them to the help desks, of course! Plus, we'll need a decent sized group for bug fixes."

Day 610. Delivery date unknown. Bob slipped away from the asylum last night and managed to insert a virus into our network. As I left work this morning the police were dragging him away, cackling and screaming with a maniacal grin on his face.

The virus destroyed all of our software. "I meant to tell them to start a version control team," Chuck mumbled. "Well, this is really good news. I have some great ideas on how to improve the code. It always pays to toss out version 1 anyway."

Editor's note: This diary was found clutched in Mr. Widget's hand after his body was recovered from the fire. Acme's press spokesman's commented "we sincerely regret Mr. Widget's suicide, but remain committed to the best in toastal quality through the use of the latest technology."

In related news, Mr. Charles Compguy was made Acme's CEO today.


Let me know if you’re hiring embedded engineers. No recruiters please, and I reserve the right to edit ads to fit the format and intents of this newsletter. Please keep it to 100 words.

Joke For The Week

Note: These jokes are archived at

I’m N’ary the tree, I am,
N’ary the tree I am, I am.
I’m getting traversed by the parser next door,
She’s traversed me seven times before.
And ev’ry time it’s an N’ary (N’ary!)
Never wouldn’t even do a binary (No sir!)
I’m ‘er eighth tree that was N’ary,
N’ary the tree I am, I am,
N’ary the tree I am.

Advertise With Us

Advertise in The Embedded Muse! Over 23,000 embedded developers get this twice-monthly publication. For more information email us at

About The Embedded Muse

The Embedded Muse is Jack Ganssle's newsletter. Send complaints, comments, and contributions to me at

The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. We offer seminars at your site offering hard-hitting ideas - and action - you can take now to improve firmware quality and decrease development time. Contact us at for more information.