|
Embedded Muse 213 Copyright 2011 TGG September 19, 2011
You may redistribute this newsletter for noncommercial purposes. For commercial use contact jack@ganssle.com. To subscribe or unsubscribe go to https://www.ganssle.com/tem-subunsub.html or drop Jack an email at jack@ganssle.com.
EDITOR: Jack Ganssle, jack@ganssle.com
Contents:
- Editor's Notes
- Quotes and Thoughts
- The iMSO-104
- The Dumbest Thing I Did
- Solution to the Job Ad
- NRE
- Jobs!
- Joke for the Week
- About The Embedded Muse
Editor's Notes
Lower your bug rates.
And get the product out faster.
Sounds too good to be true, but that's the essence of the quality movement of the last few decades. Alas, the firmware community didn't get the memo, and by and large we're still like Detroit in the 1960s.
It IS possible to accurately schedule a project, meet the deadline, and drastically reduce bugs. Learn how at my Better Firmware Faster class, presented at your facility. See https://www.ganssle.com/onsite.htm .
I'll be conducting public versions of this class in Chicago on October 21 and in London on October 28. Why not rev up your team? There's more info here: https://www.ganssle.com/classes.htm . Act now - there's a discount until September 21 for Chicago and the 28th for London.
ISO approved the new version of C++, named C++11. Does anyone in the embedded space care? I've talked to a number of embedded compiler vendors, and most told me it'll be a couple of years before their tools handle the new features. Any thoughts on C++11?
Quotes and Thoughts
"You will say that I am always conjuring up awful difficulties & consequences - my answer to this is it is an important part of the duty of an engineer" Robert Stephenson, the engineer of the Britannia Bridge.
The iMSO-104
The nice folks at Oscium loaned me a nifty mixed signal oscilloscope "plug-in" for the iPad, iPhone or iPod Touch. I put "plug-in" in quotes, as old timers will immediately think of the plug-in modules commonly used on scopes back when Maxwell had only figured out 2 of his equations. In this case, the entire scope, called the iMSO-104, is a tiny module that connects to the iThing's 30 pin connector.
First reaction: the display is simply beautiful. Crisp, clean, simple in the ergonomic Apple way. I get to use a lot of scopes, and the modern high-end versions, too, have wonderful color displays. But those are often crowded with tons of information. Useful information, necessary, even. But simplicity can be stunning, and in the case of the iMSO it is. (A free demo version of the GUI is available from the App Store.)
First, the biggest downer. At $297.99 I think it is overpriced.
But it is cool.
This thing is tiny, running about 1.5" x 2" x 0.3". It's not much more than a flat plastic box with a gold SMB connector sticking out for the analog probe. In operation a blue LED lights to let you know it has established comm with the iThing. The communications interface is very clean; if you disconnect the unit the app seamlessly goes to a demo mode, and it'll return to normal operation automatically when the hardware is plugged back in.
The iMSO has a single analog and four digital channels, rated at 5 MHz and 12 MSPS. Its sample depth is 240 points. The vertical resolution isn't specified, but examination of a ramp waveform suggests it's 6 bits. As an MSO it has the usual cross-triggering between the analog and digital channels.
The feature set is surprisingly rich. It will do a number of automated measurements, like peak-to-peak, RMS, frequency, etc. Pretty much all of the triggering modes you'd expect are included. It will do FFTs, and includes built-in calibration capabilities. You can vary the horizontal delay and hold-off.
I tested the unit with an iPad 1 and an iPhone 4.
The unit comes with a 1x/10x probe that has just over a foot of cable. I guess the idea is that even with the iThing connected it's all so small one can bring the tool to the work instead of snaking a cable to the scope. There are also 4 short digital leads that end in a connector that plugs into the iMSO.
The unit takes full advantage of the iThing's features. There are no horizontal/vertical controls; one merely does the two-finger squeeze thing to expand or contract the display, which also sets the unit's sweep rate or vertical gain. Touch a balloon to the left of a trace and drag it up or down. Very unscope-like but it works extremely well. Trigger adjustments use the same paradigm: move a balloon on the right up or down to set the trigger level. The cursors, too, use the touchscreen interface.
Screen shots are easier than on any other scope I've used. Just press the screen shot button, and then another to email it to yourself or someone else. The one problem is AT&T's miserable email service; it may take a while for them to deliver the mail.
If you set the gain too high the signal will clip, just like on my fancy bench scope. But unlike that precision instrument, the iMSO helpfully displays a "Clipping" message.
I couldn't find any accuracy claims, but the vertical measurements were low by about 10% when measuring a 100 Hz 0.5 volt peak-to-peak sine wave. A 5 volt input was accurate to better than 0.5%. But signals above 5 KHz yielded degraded voltage measurements; at 100 KHz a 5 volt sine wave was low by 10%. Frequency measurements were pretty much spot-on up to 500 KHz, and degraded rapidly after that.
The triggering is somewhat erratic; a sine wave jumps a few pixels left and right with each acquisition. I wonder if the apparent 6 bit vertical resolution causes some trigger uncertainty.
The device plugs into the iThing's charging connector and so is powered from the battery. The iPad/iPhone does not go to sleep as long as the app is running. But after 2.5 hours the iPad's charge level declined only from 100% to 78%, and the iPhone went from 100% charge to 67% after 1.5 hours of use.
While the app is beautiful on the iPad, it nearly takes my breath away on the iPhone. Though the screen is, of course, much smaller, the idea of having a complete MSO in a pocket is pretty cool. Pretty soon we'll be able to fill our pocket protectors with an entire development lab.
Most of these tiny scopes trade off features for size and price. The iMSO's 5 MHz bandwidth is about par for this class of device. It pales next to the big-bucks scope on the bench here, and is hopelessly inadequate for many, if not most, professional applications. But I can see a hobbyist or student getting a lot of use from it. And, have you ever lugged a big scope on a business trip? The iMSO sure appeals for travelers with low-bandwidth needs. One does wonder how it will fare in the market at nearly $300, when other similar units are available for much less, such as the DSO series from Seeed. I have not used those, yet, so can't make a comparison.
There's more here: http://oscium.com
The Dumbest Thing I Did
When interviewing I always ask candidates (those with experience) about their dumbest mistake and what they learned from it. Those with no mistakes are generally those with no experience - or are perhaps truthiness-challenged. Do you have any?
Jonathan Graham Harston had this confession:
Ok, I'll bite. This was 28 (eek!) years ago.
I was putting together some code to remotely control another
computer on the local network. I'd forgotten that my skeleton code
took a hexadecimal parameter. There I was sitting watching station
10 while I entered "remdb 10". Just as I was wondering why nothing
was happening I heard a "hey!" from over at station 16....
Solution to the Job Ad
In the last Muse I ran a job ad that David Kramer found on Craigslist. It was a puzzle whose solution yielded the email address one would apply to.
I heard from quite a few folks who solved the puzzle. A couple had witty responses. And, the original author of the puzzle chimed in.
I admitted to Dan Swiger that I hadn't looked for a solution, and he responded:
Awwww come on! You mean you never spent an hour with your TiVo paused during "Adult Swim" on Cartoon Network, figuring out the all binary "bump" they had between shows?
Well, at least post in your next Muse if anybody else chimes in with an answer. Here's my complete derivation, for the record.
1. Consider the MPC5674F processor. The 32 bit address of the Flash B Shadow Block starts at X. Use whatever resources you have to find X.
>From Reference Manual: 0x00EFC000
2. Y = ((X >> 16) & 0xFF) - 5; // use X from question 1 What is Y in hex?
0x00EFC000 >> 16 = 0x00EF & 0xFF = 0xEF - 5 = 0xEA
Y = 0x000000EA
3. Consider the S-record: S30B00EFBFFFFE635924182031 Using the above information, Z = (unsigned32) ( (*(byte *) X ); // use X from question 1
What is Z in hex?
Sz Addr Data Chksum
S3 0B 00EFBFFF FE 63 59 24 18 20 31
Z = The byte at 0xEFC000, which is the 2nd data byte Z = 0x00000063
4. sprintf( &foo, "Q%04x%2x\0", Y, Z); // use Z, Y from questions above
foo[] = "Q00EA63"
5. char foo2[11] = {
0x40,0x79,0x61,0x68,0x6F,0x6F,0x2E,0x63,0x6F,0x6D,x00
};
strcat( foo, foo2 );
puts( foo );
"Q00EA63@yahoo.com"
Chester Page sent this solution:
Dear Dr[1] Jack --
I -- like most of your readers, I trust -- would, of course, no more let this red rubber puzzle just bounce by than Florence Ambrose [2] would let a red rubber ball just bounce by (or, for that matter, this red rubber puzzle).
Making a few assumptions, I arrived at <Q00EA63@yahoo.com>
However, by the time I had arrived at that result, it was definitely a matter of Zwischenaugenbrauenabstand--. [3]
Read on.
: David Kramer found a great ad on Craigslist. Though not a joke it's
: pretty good, and reads, in part:
:
: In order to make sure the applicant has a working knowledge of the
: above skills, the following questions should be answered correctly.
: Each successful answer will result in a piece of an email address.
: Once a complete email address is constructed, the applicant can then
: use it to send their resume and a link to their A) Facebook page or
: B) LinkedIn page.
I have neither a Facebook page nor a LinkedIn page, as I regard the former as pointless and the latter as useless; and I am given to understand that this is an attitude common among the unkempt-desk set. Is this perhaps a subtle trap for Those Who Tweet?
And I have no resume: past the age of 50, why bother?
: Educational and professional experience qualifications are flexible.
: If you can solve the 5 puzzles below, and actually enjoy it, you're
: probably a good fit.
: For below, assume unsigned32 X, Y, Z; char foo[];
: 1. Consider the MPC5674F processor. The 32 bit address of the Flash B
: Shadow Block starts at X. Use whatever resources you have to find X.
Google trivially links to a datasheet for the part; a diligent search of the datasheet reveals that ++Moto apparently doesn't consider a memory map a necessary feature of a datasheet. Visiting the corporate Web site turns up a Reference Manual, which does include one; the address of the Flash B Shadow Block is given as 0x00EFC000.
Note, however, that what this item *actually* states is
X = &32bitaddressoftheFlashBShadowBlock
X = (uint32) &FlashBShadowBlock
which must be assumed to have been *intended*, as the puzzle would otherwise be insoluble.
: 2. Y = ((X >> 16) & 0xFF) - 5; // use X from question 1
: What is Y in hex?
0x00EF - 5 = 0x00EA
(If this advert were aimed at Dan Saks, it would presumably have left out all of the parentheses here...)
: 3. Consider the S-record: S30B00EFBFFFFE635924182031
: Using the above information,
: Z = (unsigned32) ( (*(byte *) X ); // use X from question 1
: What is Z in hex?
Happily, I have not had to deal with S-records for nearly two decades, and am quite content to be hazy on the interpretation of their entrails; but, as usual, Google knows all about them, so that I may be an S-record Expert for just long enough to parse this one as
S3 0B 00EFBFFF FE 63 59 24 18 20 31
or
0x00EFBFFF 0xFE
0x00EFC000 0x63
0x00EFC001 0x59
--- usw ---
It is necessary to assume that X points into an address space which has been initialized by at least the single S-record given prior to the value of Z being determined; otherwise, the puzzle would, again, be insoluble.
: 4. sprintf( &foo, "Q%04x%2x\0", Y, Z); // use Z, Y from questions above
It would be interesting to see what the compiler makes of the declaration
char foo[];
given that it seems about one parameter shy of a load. Of course, if it's a Micro$oft compiler, it might helpfully supply a default value - perhaps 0 or 1?
(Can you name a Crackers' Delight for which M$ browsers are famous?)
And making the format string "Q%04x%2d\0" would have been a nice touch.
: 5. char foo2[11] = { 0x40,0x79,0x61,0x68,0x6F,0x6F,0x2E,0x63,0x6F,0x6D,x00
: };
: strcat( foo, foo2 );
: puts( foo );
(Note that the last initializer of foo2[] is "x00", not "0x00". The absence of any obvious typos in this item suggests a cut-and-paste from the original, which suggests ... ?)
First and foremost, with or without its pin pulled, mr <strcat> is *not* your friend; I consider being unable to decide what third parameter to pass to <strncat> a sure sign of a design decision inadequately decided.
And what if memory -- perhaps by reason of legacy -- should prove to be structured something like this?
char foo[5];
char foo2[11] = .... ;
(I have found it advisable to do a complete cold power-off-and-on reboot when Window$ goes catatonic -- followed, of course, by running <scandisk> against every hard drive on the system.)
One hopes that the Craigster is a truly *devious* custard, looking for replies viewing the puzzle as dubiously as does the above, as I should otherwise prefer to observe any system controlled by software developed by his operation from a prudent distance -- eg, light-seconds.
[1] I reckon that, as no-one objects to ThemAsCant heaping honors upon ThemAsHaventYetAndMayNever, no-one can reasonably object to ThemAsDo doing the same by ThemAsDoEgregiously
[2] <freefall.purrsia.com> Start at the beginning. Pee first.
[3] inter-eyebrow separation
Joe Craig - a pseudonym - wrote this:
You recently put up part of a post that I had constructed on your "The Embedded Muse" (212) site under the "Joke of the Week" section. I never expected my post to go 'viral' (even in a small nerd way) and appreciate the notoriety. 11 of your followers took the challenge (although belatedly) and responded correctly. I enclose a message I sent to all.
For all those who recently wrote in via "The Embedded Muse - 212" shoutout, you all did it! Cheers!
Some background: I'm a working manager for an embedded software group in a large, all-too-Dilbert-like company. This 'puzzle' was a result of my extreme frustration with the standard process of hiring - either direct or contract. Very few applicants were getting through the main channel, and those that did were not what we were looking for. So, rather than admit defeat, I decided to go rogue.
I posted on the LA CraigsList on Aug 4, 2011 and received 5 correct responses within a week, 2 within the first 4 hours, 2 more within 48 hours and a straggler at the 6 day mark. Apparently, after the gracious post in Jack's column on 09/06, 11 more came in.
Since the ad was only up for a week I wasn't expecting any responses afterwards so I haven't been monitoring the q00ea63 account. I just logged in for fun and found - much to my delight - this unexpected avalanche of correct responses - apparently this is the site to go to for bright embedded systems folks.
It gets better. I couldn't help but notice the post was filed under "Joke of the Week". Turns out this was an appropriate heading. After selecting two of the original applicants and conducting several phone interviews and eventually personal interviews over the course of a few weeks, getting them started in the 'official' chain of hiring, and interviewing them *again*, getting them set up with contract agencies and telling them to prepare for onboarding, upper management decides to implement a hiring freeze. I couldn't believe it.
I know most of you who wrote in are just puzzle solvers (I am as well) and weren't really interested in the job. Most expressed appreciation for the manner in which I went about posting - To those folks: Thanks. I appreciate the sentiments and hope everyone gets a chance to do something equally satisfying.
FYI, here is the complete job posting uploaded to the CraigsList "Gigs" section:
Embedded Systems Software/Firmware Engineer, EE background a plus
This opportunity is for those who wish to live and work within 4 miles of a beautiful beach in Southern California making $45-$55/hr. The initial position will be contract based. Qualified candidates who accept the position and can show they are a 'fit' will have the potential to hire on receiving full time permanent employee status.
The position involves creating and maintaining very highly structured C code 'classes' for an organization involved in the automotive industry. The focus of our group is providing controls software for power electronics - we're enabling higher MPG in vehicles by creating viable electric propulsion systems. The primary skill set we're interested in for this position is as follows:
*Proficiency in writing highly optimized C code
*Proficiency in debugging and creating test cases
*Some knowledge of electrical engineering, EE a plus
*Fundamental knowledge of embedded processor architectures
*Ability to master software simulation and 'hardware in the loop' testing
*Good communication skills
*Ability to follow and adhere to design processes
In order to make sure the applicant has a working knowledge of the above skills, the following questions should be answered correctly. Each successful answer will result in a piece of an email address. Once a complete email address is constructed, the applicant can then use it to send their resume and a link to their A) Facebook page or B) LinkedIn page.
Educational and professional experience qualifications are flexible. If you can solve the 5 puzzles below, and actually enjoy it, you're probably a good fit.
For below, assume unsigned32 X, Y, Z; char foo[];
1. Consider the MPC5674F processor. The 32 bit address of the Flash B Shadow Block starts at X.
Use whatever resources you have to find X.
2. Y = ((X >> 16) & 0xFF) - 5; // use X from question 1
What is Y in hex?
3. Consider the S-record: S30B00EFBFFFFE635924182031
Using the above information,
Z = (unsigned32) ( (*(byte *) X) ); // use X from question 1
What is Z in hex?
4. sprintf( &foo, "Q%04x%2x\0", Y, Z); // use Z, Y from questions above
5. char foo2[11] = { 0x40,0x79,0x61,0x68,0x6F,0x6F,0x2E,0x63,0x6F,0x6D,0x00 };
strcat( foo, foo2 );
puts( foo );
NRE
Paul Carpenter had some thoughts: "I agree whole heartedly with Geoff, with some examples.
"Lots of markets have VERY long lifespan, most of which are also ROHS exempt as well for the same reasons. Mainly military, transport and medical, where transport includes aviation, railways, busses and trucks.
"Many of these have equipment 30 years old.
"Around 2002 I was asked to look at designing some electronics to replace PART of an NMR machine, when asked how old it was they replied
"The earliest date we have is a memo about moving it to the new building in 1968"
"One of my testers for avionics parts was to initially have a 20 year support phase, to be able to be rebuilt if necessary from scratch.
"Often PC motherboards are only available on EBAY as second-hand or surplus within a year. Let alone the fools who want to use a particular smartphone/PDA type device as the basis of their product, even down to power and mechanical mounting problems in trucks or vehicles.
"The other issue with COTS is OS and software licensing, a lot of products from routers to TVs have a form of Linux in them for many reasons, one of which is ability to add your own drivers easily without extra cost or deal with the driver hell, certification etc.
"Another good reason, it is easier to get much faster startup time -switch on to running.
"Making products with Windows PCs and the ever changing OS version, processors, bus types, form factors and other hurdles is a right ongoing engineering and maintenance issue. Which you can take the HP attitude stop supporting as many printers and multi function devices as soon as a new OS appears.
"This is already a problem for offices where they have printers and scanners, let alone multi-function printer/scanner, that now does not work because the manufacturer does not do the drivers and applications for the new OS. I am not talking about entry level inkjet models.
"So why does this matter for scopes and the like, well any product that potentially supports USB, ethernet, sometimes WLAN and Bluetooth, you have to upgrade your support for new OS on the PC host. Already a lot of scopes with COTS internals have PC host applications, that can no longer be used as they don't support new OS for that OLD model of scope.
"Imagine having the problem of USB drive/memory stick that has a new file format you scope does not support, or a memory size beyond its capabilities. Things like scopes are a higher assett value cost than a simple desk PC.
"Scopes are around for at least 5 years (often longer), whereas a PC is normally around for a maximum of 5 years."
Jobs!
Let me know if you're hiring firmware or embedded designers. 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 www.ganssle.com/jokes.htm.
John Visosky sent this:
The joke about the guerrillas and their hostages reminded me of this oldie:
Three friends went on a vacation to a barbarous third-world country.
One morning, after a night of wild partying that none of them could remember, they woke up in jail. It turns out they were to be executed that day.
As the first one was strapped into the electric chair, he was asked if he had any last words. He said, "I hold a law degree from Harvard, and I believe in the power of Justice to save me!" The switch was thrown and nothing happened, so he was set free.
As the second one was strapped into the electric chair, he was asked if he had any last words. He said, "I hold a divinity degree from Yale, and I believe in the power of God to save me!" The switch was thrown and nothing happened, so he was set free.
As the third one was strapped into the electric chair, he was asked if he had any last words. He said, "I hold a masters degree in Electrical Engineering from MIT, and if you don't connect those two wires, this thing'll never work!"
About The Embedded Muse
The Embedded Muse is a newsletter sent via email by Jack Ganssle. Send complaints, comments, and contributions to me at jack@ganssle.com.
The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. can take now to improve firmware quality and decrease development time.