Tweet Follow @jack_ganssle

Embedded Muse 156 Copyright 2008 TGG February 27, 2008


You may redistribute this newsletter for noncommercial purposes. For commercial use contact info@ganssle.com. Subscribe and unsubscribe info is at the end of this email.

EDITOR: Jack Ganssle, jack@ganssle.com

CONTENTS:
- Editor’s Notes
- Low ESR Capacitor Issue
- Tools and Tips
- War Stories
- Free Stuff
- Jobs!
- Joke for the Week
- About The Embedded Muse


Editor’s Notes


Did you know it IS possible to create accurate schedules? Or that most projects consume 50% of the development time in debug and test, and that it’s not hard to slash that number drastically? Or that we know how to manage the quantitative relationship between complexity and bugs? Learn this and far more at my Better Firmware Faster class, presented at YOUR facility. See http://www.ganssle.com/onsite.htm .


For the first time, I’ll be conducting a public version of this class in Denmark in April. For more information see http://www.ganssleindk.dk/ .


Are you in the Chicago or Denver area? I’ll present a public version of the Better Firmware Faster class in Chicago and Denver, on April 23rd and 25th. Sign up before March 23 and receive a $50.00 discount. Registration and other info here: http://www.ganssle.com/classes.htm . You’ll earn 0.7 Continuing Education Units, learn a lot, and have more than a little fun.


I’ll be teaching a public version of this class in London, UK, May 19. See http://www.ganssle.com/classes.htm .


I get a lot of email about various features of C. The latest version of the C99 standard (ISO 9899:1999) is on-line at http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf . It is 552 pages long, which is quite remarkable considering the essential simplicity of the language. The second edition of K&R’s The C Programming Language is but 274 pages.


Low ESR Capacitor Issue


Carl VanWormer sent this interesting email: “While researching the interesting topic of "LDO stability" and using low ESR (ceramic) capacitors, I ran across several warnings against using Y5V dielectric capacitors. The data sheet from our main supplier had the information I expected; cheap, small, crummy parts with a bad temperature coefficient (TC) of capacitance. I already knew that, but we use them in "room temperature" environments, not the extremes (where the value can drop by more than 50%). The jaw-dropping moment arrived when I saw the curve in the AVX data sheet (http://www.avx.com/docs/Catalogs/cy5v.pdf , first page, top-middle curve), of "Capacitance Change vs. DC Bias Voltage". By the time we get to half the rated voltage, the capacitance value has dropped more than 80%. This means that the 10uF 6.3V cap I selected for the output of my LDO may only be 2uF, and it only gets worse as the temperature increases. There goes the stability I was hoping for. In sharing this information with my co-workers, none had realized how bad the voltage coefficient was for these parts. Be aware!”


Tools and Tips


Parallax, the company famous for BASIC Stamps and other products, has what they call “Parallax Font.” It’s a TrueType font that contains schematic elements and other useful engineering symbols. It’s part of the IDE that comes with their Propeller chip tools, available for free from here: http://www.parallax.com/tabid/442/Default.aspx . You have to install the IDE to get the fonts, but once installed they can be used in any Windows app. And they stay on the machine after uninstalling the IDE.


There’s a lot of confusion and outright FUD circulating about various open source and free software licenses. This site: http://www.softwarefreedom.org/resources/2008/foss-primer.html does a great job explaining the meaning of many of these licenses and the implications for developers. It also discusses how to enforce copyrights, typical organizational issues (like how to incorporate both for- and non-profits), trademarking, and lots about patenting and protecting patents.


War Stories


A lot of Muse readers enjoy the war stories. This week I helped prepared a historical timeline for embedded.com (www.embedded.com/timeline ) and recalled the 1801, the first (to my knowledge) CMOS microprocessor. Then, while working with a Parallax Propeller chip, I had to note the similar stack structure between it and the 1801/2 (i.e., no stack structure). So that got me to reminiscing about RCA’s odd but interesting CPU.

Early CPUs used PMOS technology, but in the 70s most chip vendors switched their processes to NMOS to gain a speed advantage. But one took a different tack. RCA bet heavily on the emerging CMOS technology during the 60s, which seemed a backwater to most designers of cutting-edge products.

CMOS was both extremely low power and highly radiation resistant, factors critical for space and a few other applications. In the 70s battery-powered computers were more a dream than an actuality, so no one seriously considered exploiting low power chips to create laptop computers.

CMOS, though, was very, very slow. Laughably slow. Switching speeds could be in the hundreds of nanoseconds, a far cry from the 10-20 nsec speeds achievable by reasonably fast TTL. Most of us considered CMOS an interesting idea that would soon die off. We were all so wrong; today CMOS's speed problems are gone, and it's the logic of choice for most applications. CMOS came to dominate because NMOS parts, once transistor counts skyrocketed, just got too hot. The irony is CMOS, too, hit a power dead-end which has, at least for now, ended the clock rate wars.

RCA joined the microprocessor fray with their two-chip 1801, and later the 1802. The 1802 was a fully CMOS 8 bit device with a very unusual architecture. It was intensely register based, having 32 8 bit registers that could be organized as 16 sixteen bitters. Later, RISC advocates similarly maximized registers. RCA was clearly ahead of its time.

Any register could be the program counter using the Set EXecute instruction (whose mnemonic was just what you’d imagine, and which no doubt would cause this email to be gobbled up by spam filters). Its greatest flaw, though, was a total lack of stack capability. Neither push nor pop. No call and no return.

Indeed, the 1802's lack of a call instruction was a source of continuous grief. We worked around this by building a non-reentrant pseudo-subroutine structure: you do a call by loading a fixed register with the return address, another with the destination of the subroutine, and then jumping to a "subroutine" that stored the return in memory on a manually-managed stack before finally vectoring off to the destination. Returns were managed in a reverse manner.

The overhead was enormous, but the 1802 was never known as a speed demon. Instead, it found its way into ultra low power applications. I'm told that several satellites circling us still rely on 1802s for their housekeeping.

My consulting partner and I managed to get a number of jobs designing deep sea probes that monitored temperature, pressure and other parameters, running for a year or more on a few AA batteries at 20,000 feet. You can imagine the mess (and cost – something like $20k) when an O-ring failed. The 1802 was our only option, as it required only microamps when operating at slow clock rates.

We used an assembler from Avocet which ran on a floppy-based CP/M machine. In those days no one used C in embedded systems. Happily, the assembler included macro capability which made using the convoluted call/return sequences much easier.

We wrote a very simple monitor program that permitted us to download hex files, fiddle with memory and registers, and stop/stop program execution. The cost of an emulator was far beyond our bankroll.

The 1802's fully static design greatly simplified debugging. We'd run the machine at one hertz or less at times, using a scope or even a voltmeter to probe address and data lines.

Later we found a customer doing research into the aging of fruit. Apparently, during the course of a month-long trans-oceanic voyage fruit emits various gasses as it ripens. Our customer wanted to understand this process, and so desired a system that could sample the air around a fruit container a number of times over the course of the voyage.

The solution was to fill 30 aluminum containers (from a fire extinguisher manufacturer) with a vacuum. Or is that to empty them with a vacuum? A valve on the top of each opened for a few seconds at programmed intervals to suck in the ambient environment. We quickly concluded that only an 1802 could stay alive for the 30 required days, running from a small lead acid battery.

The CPU ran a simple program that accepted timing parameters, and that then counted time till it made sense to open a valve. As I recall we ran the 1802 at about 100 hertz to conserve power.

The data collection program was a great success... until a dockworker dumped a 50 ton container on the instrument. But after we went our separate ways my partner got a nice contract rebuilding the thing. For consultants, disasters often pay the bills.


Free Stuff


Answer this puzzler correctly for a chance to win a free copy of my firmware development video (http://www.ganssle.com/video.htm ): We read all day about very cool super-duper 64 bit multicore hyper-terahertz processors. But that does not represent the embedded industry. What microprocessor had the smallest bus width?

Contest rules: one winner only, who will be selected at random on or about March 7 from all of the correct entries; by “correct” I mean the answer that appears to be correct (i.e., fun is more important than ultimate Truth). Send your entry to marybeth@ganssle.com . Sorry, we can’t acknowledge entries (Marybeth was flooded in the Great Book Giveaway last year). I’ll post the winner’s name (but no other contact info) in the next Muse and any funny or interesting commentary.


Jobs!


Joke for the Week


Steve Bresson sent in the following. Or rather, this is a subset of the ten pages of “how to know if you’re an engineer.”

YOU MAY BE AN ENGINEER...

If you stare at an orange juice container because it says CONCENTRATE

If the only jokes you receive are through e-mail (Editor’s comment: whoops!)

If your idea of good interpersonal communication means getting the decimal point in the right place

If you use a CAD package to design your son's Pine Wood Derby car

If you have used coat hangers and duct tape for something other than hanging coats and taping ducts

If you carry on a one-hour debate over the expected results of a test that actually takes five minutes to run

If you are convinced you can build a phazer out of your garage door opener and your camera's flash attachment

If you ever burned down the gymnasium with your Science Fair project

If you think Sales and Marketing are Satan's children

If your excuse for not wearing a tie is because it would limit critical blood flow to your brain

If you see a good design and still have to change it

If you still own a slide rule and you know how to work it

If, when you go into a computer store, you eavesdrop on a salesperson talking with customers and you butt in to correct him and spend the next twenty minutes answering the customers' questions, while the salesperson stands by silently, nodding his head

If you rearrange the dishwasher to maximize the packing factor

If you find yourself at the airport on your vacation studying the baggage handling equipment

If you have ever owned a calculator with no equal key and know what RPN stands for

If you have never lost a science question in trivial pursuit

If you can type 70 words a minute but can't read your own handwriting

If your favorite James Bond character is "Q", the guy who makes the gadgets

If you thought the real heroes of "Apollo 13" were the mission controllers

If you have a neatly sorted collection of old bolts and nuts in your garage

If you get suicidal when the power is out for more than 10 minutes

If everyone else on the Alaskan cruise is on deck peering at the scenery, and you are still on a personal tour of the engine room

If all your sentences begin with "What if"

If when you are getting a haircut you ask the barber to cut 1/2 an inch off the length plus or minus 1/64th

If you are next in line, on death row, in a French prison and you find that the guillotine is not working properly so you offer to fix it