Columnist |
"It
was the best of times. It was the worst of times."Dilbert.
(Hearsay also attributes this quotation to a fellow named Charles Dickens, but,
because he was not an engineer, no one takes this rumor seriously.)
Most projects start with great enthusiasm, which all too often disappears as schedules collapse. Someday, a guru in embedded-system design will descend from on high and show us the road to development nirvana. Some methodology far beyond our current ken will lead to the predictable schedules, costs, and risks we attribute to banal activities, such as accounting. That day, though, seems impossibly far away. In fact, it seems our best chance for engineering enlightenment will come from episodes of the X-Files and hanging out in Roswell, NM.
Until then, we'll wing it, continuing to alienate our bosses and customers with late, sometimes imperfect, products. We'll do our best to master the rudimentary methodologies of today, because each approach does have value.
Clearly, a decent set of tools is a basic requirement for efficient engineering. It drives me nuts to see a lab full of broken diagonal cutters and corroded soldering-iron tips. Cost is rarely an issue with hand tools; it's often a matter of no one's having the drive to regularly order replacements.
The same situation is common with more sophisticated tools. Too many companies shortchange their developers with old or inadequate scopes and logic analyzers. Sometimes, the fault lies with the engineers, who may be too busy producing products to keep tabs on the constant stream of cool new test-equipment offerings.
Recently, I had the chance to work with two very unusual logic analyzers. Each addresses different needs, and each profoundly alters the nature of logic analysis. Best of all, both are quite affordable.
Hewlett-Packard's (San Jose, CA) new mixed-signal oscilloscope (MSO) (model 54645D) is a brilliant mix of logic analyzer and oscilloscope. HP's marketing types realize that most embedded designs are 8 bits, and most use some combination of digital and analog circuits. This product is specifically targeted at this "lower end" market.
Phooey.
After working with this instrument for a couple of months, I've come to the conclusion that it could be the digital designer's new right arm. I've used it on 8- and 16-bit designs, on those creeping along at 10 MHz, and on others at 40 MHz. This is not a low-end instrument.
At first glance, the MSO is a two-channel digital scope integrated with a 200M-sample/sec, 16-channel logic analyzer. Now, just combining the two functions into one small device is appealing.
The MSO, though, is far more than two instruments in a single box. It truly integrates the individual strengths of a scope and analyzer into a device that has changed the way I troubleshoot.
How often have you wished you could trigger a scope on a complex digital signal? When an infrequent interrupt-acknowledge cycle flies by, wouldn't it be nice to capture some of the signals on a scope so that you can see signal levels, ground bounce, and the nondigital nature of the signal?
Though we live and breathe ones and zeros, our digital creations are really analog circuits operating in a generally digital domain. Too many engineers blithely believe the data presented on their logic analyzers, which by their very nature make a rather arbitrary decision about what should be shown as a one and what should be shown as a zero.
Most of your test equipment lies to you. You can understand why it lies and what sorts of lies it tells, but it's pretty difficult to tell if any individual piece of displayed data is the truth or if it's the instrument's abstraction of the truth. A decent scope reveals some of a logic analyzer's lies but is so difficult to trigger in the wide-bus environment of a mP that we usually don't bother using it.
The MSO's strength is its innovative triggering scheme. It's very simple: Set up a traditional logic-analyzer trigger pattern on the digital inputs, and the device acquires all 16 digital channels and two analog scope channels of data, all from the same trigger point. Single-shot events are no problem due to the scope's high acquisition rate.
A particularly enticing feature is the reverse: You can use the MSO like a scope, triggering on an analog input. It also captures all 16 digital channels on each trigger. There's no better way to see how your analog and digital circuits interact.
Sometimes, I pull a scope out to look at digital signals simply because the update rate of a traditional logic analyzer is too slow. Time's a wastin', the clock is ticking, yet it takes seconds to acquire a single analyzer sweep.
The MSO solves this problem with its scopelike personality. No matter how you use the scope, the update rates are breathtaking. Even with the analog channels turned off, displaying only the 16 digital channels, if your trigger pattern causes rapid acquisitions, the pattern updates much faster than the eye can see.
On a scope, I sometimes look at code that runs through a sequence of NOPs, watching the "blink rate" of each address line. A0 blinks very fast, A1 at half that rate, and so on. The fast updates of the MSO clearly show these rates on the digital channels.
The following are a few examples of what the unit's cross-triggering did for me after using the MSO for a couple of months. A data bus, with lots of devices tristating onto the same 16 lines, exhibited a problem in which it seemed that nonzero data was getting onto the bus during one cycle. The analyzer part of the MSO showed the data as being zero, which is what it was supposed to be; yet, the symptom led me to think that some of the bits were a one. Scanning across the bus with one of the MSO's scope inputs (while triggering on a nested digital sequence), I quickly found that many of the bits were at in-between states, thus indicating bus conflict. I might have guessed that this was the problem but would never have seen it, due to the difficulty in capturing this with a traditional scope.
Another time, I was chasing an erratic one latched into a 74373. The driving signal was clearly a zero; I guessed that noise on the board coupled onto the signal. The MSO's scope clearly showed very short noise spikes. My challenge was to find the source of the problem: Which signal was synchronous with the noise? With the glitches displayed on a scope channel, I used a logic input like a scope probe, finding the source of the problem in a few minutes.
On a similar note, I often like to scope around a working board, looking for potential noise problems. This approach is rather hit or miss. The MSO can trigger when big events occurfor instance, when many buffers switchand take an analog peek at exactly these potentially problematic times.
Like any other engineer, I love gadgets and features. I wish the MSO had more digital channels, but then I wish our big analyzers had more, as well. I wish the MSO was even faster. But, I've yet to be completely satisfied with any piece of equipment. There's always something more I'd like. Price, size, and reality constrain what is possible. In fact, 16 channels and 200M samples/ sec are adequate for most trouble-shooting.
The other tool/instrument I've been looking at is the Pod-A-Lyzer 8020. Boulder Creek Engineering's (Boulder Creek, CA) Pod-A-Lyzer is a neat personal logic analyzer with an attractive priceapproximately $1300. It's the size of a candy bar, you can connect it to your PC via RS-232C, and it comes with a nice Windows-based user interface.
The Pod-A-Lyzer has 18 channels and a 64-kbyte-deep buffer and clocks at rates as high as 100 MHz. Like the MSO, it is designed not as the most powerful logic analyzer in history, but as an instrument targeted to specific needs.
This analyzer fits in your pocket. Think of the possibilities! At our company, we dread dragging one of the 40-lb, 500-MHz Big Berthas around from room to room, always trailing cables, a mouse, and probes along.
I carry a 4-lb Pentium laptop just about everywhere. It's great for schedules and word processing. Now, with the Pod-A-Lyzer, the laptop becomes a development station. Toss it and the computer into a briefcase and drag your hardware environment anywhere in the world.
It's nice having the user interface on the computer. Most analyzers suffer from tedious menu systems, due to their limited screen sizes and crude keyboards. The Pod-A-Lyzer's software is intuitive; I spent approximately 10 minutes figuring it all out without referring to the documentation. It includes all of the standard features you'd expect: signal naming, cursors, and time calculations.
On the 100-MHz Pentium laptop, scrolling around and menuing is very fast. It does take a few seconds to upload data over the serial port from the unit, though this is due to a very deep buffer and the limits of serial-communications speeds. If you perform testing or development when you're on the road, check this unit out. If you're in an environment where cash is tight and there are not enough analyzers around, get one of these for each engineer.
It's interesting that both of these units come with a section in the documentation describing why and how a logic analyzer can mislead you. This is clearly an education problem that these companies often see.
You can trust your tools but only when you understand their limitations.
| EDN Access |
feedback | subscribe
to EDN! |
| Table of Contents |