Embedded Muse 95 Copyright 2004 TGG April 6, 2004


You may redistribute this newsletter for noncommercial purposes. For commercial use contact jack@ganssle.com.

EDITOR: Jack Ganssle, jack@ganssle.com

CONTENTS:
- Editor’s Notes
- New Video
- Jobs!
- Joke for the Week
- About The Embedded Muse


Editor’s Notes


Want to learn to design better firmware faster? Join me for a one-day course in Chicago on May 17. This is the only non-vendor class that shows practical, hard-hitting ways to get your products out much faster with fewer bugs. See https://www.ganssle.com/classes.htm for more details. There’s also cheap fly-in options listed on the web site for folks coming from out-of-town.

I often do this seminar on-site, for companies with a dozen or more embedded folks who’d like to learn more efficient ways to build firmware. See https://www.ganssle.com/onsite.htm.

Per Wetterbrandt was amused by the Write Only Memory datasheet (https://www.ganssle.com/misc/wom.html), and wrote:
I remember the joke about the write-only memory. I'm now on a project using an ATmega processor from Atmel (ATmega64) and I was struck by the similarities between the write-only memory and the Atmel solution to write to the on-chip flash. They have invented a temporary buffer equal in size to a flash page. This temporary buffer is write-only! It is not mapped to internal RAM and is not accessible by other instructions than a special write. When the buffer is filled, one assembly instruction copies the buffer to the flash page selected. So the only way to verify the content of the temporary buffer is to store it in flash and read it from there. So a write-only memory may not be useless. ;-)

In Muse 94 I referred to a time management program called Personal Timeclock. Turns out the price has gone up to $24.95 for a one-time license. However, Ken Reek, the package’s author, wrote to offer all Muse readers a 20% discount. To obtain this reduction enter the discount code "ganssle" (without the quotation marks) in the appropriate box when ordering from www.KMRConsulting.com. A nice offer, though it’s painful to find one’s name discounted.


New Video


In the 80s I started an in-circuit emulator company, and quickly discovered the importance of customer support. ICEs are complex devices that plug into a huge range of target systems, so I spent 15 years working closely with developers all over the world. That experience, coupled with corresponding with thousands of developers who read my articles, taught me how many embedded systems are saved by heroics. Projects are typically late and buggy. Developers are so deeply buried in saving today’s effort they have little time to explore better ways to get their work done.

After selling the company in 1997 I decided to spend my time helping developers learn ways to build their embedded systems faster and better. So I continue to write a monthly column in Embedded Systems Programming, a weekly one on embedded.com, and frequently teach seminars about embedded systems.

But my in-box is flooded with cries for help from folks who can’t attend the seminars due to travel difficulties or schedule panics. It reminds me of that old cartoon of a battle being waged with spears and axes: a machine-gun salesman is turned away by the general who says “I don’t have time for you; I have a battle to fight!”

So I’ve created a video titled “Develop Firmware in Half the Time” that distills the basic ideas and processes needed to efficiently crank out great firmware.

Like most of you I’m an engineer. My life has been dominated by getting products to market NOW. Though there’s tons to like and even love about heavyweight methodologies like the CMM or tools like UML, fact is that most of us will never have the time or organizational commitment to make these work. So this video deals only with practical ideas we can implement now, mostly under the radar screen of management… which all too often sees software as merely a necessary evil.

This professionally-produced video has a somewhat different focus than my seminars. There's no technology in it; you won't learn why most solutions to reentrancy problems are flawed or how to optimize ISR performance. Instead, it concentrates entirely on getting a product to market faster.

There’s more information available at https://www.ganssle.com/video.htm.


An Embedded Toaster


Lately a number of folks have sent me a humorous story circulating on the ‘net about a microprocessor-controlled toaster. No author’s attribution is attached. I’m always amused… as I wrote it for EDN magazine in 1997!

The article was meant as a joke, but at the time various readers noted that at least four electronic toasters were already available. So the joke was on me.

No doubt today the market is saturated with Internet-aware toasters. But the story is still fun. Here it is – enjoy.

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. Café 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 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 ensure 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.


Jobs!


Joke for the Week


Anja Zoe Christen wrote:
In a project management course last year we were asked to define the expression "TEAM". I came up with two different explanations:

1) The motivating one: Together Everyone Achieves Milestones.

2) The realistic one: Transient Efficiency And Misery.