Al Williams

Dr. Dobb's Bloggers

The First TV

August 12, 2014

Unlike fixing a TV that used to work, if you have a fresh PC board with a new design, anything could be wrong.

When I was in school (well, at least one of the times I was in school), I used to fix TVs to earn money. Sometimes fixing a TV can be a challenge, but there was always one very definite advantage: You knew that at one time the TV did work.

This is a stark contrast to bringing up a freshly designed embedded system. If you start out with a proven board, that can help. But if you have a fresh PC board with a new design, anything could be wrong. The board layout could be in error. The circuit design could have a flaw (although, presumably you prototyped it). You may have assembled the board wrong (a backward component). You may have a damaged component on the board. Or, of course, you may have a bug in your software (as hard as that is to imagine).

I remember one board that refused to do anything despite a perfectly good prototype. Some probing showed that a single net on the board had not been routed (this was well before you did all this on a computer). That net connected the system's clock generator to the rest of the board, so probing at the clock generator looked good, but the system wasn't getting any clock signal.

Exactly how to best proceed depends on how much test equipment you have. If I can, I usually don't populate any active components until I can check out the board's power system. It is worthwhile to make sure the right voltages are everywhere you expect them to be. Depending on the board, you might be able to check the clock and reset circuitry.

Sometimes you can't isolate the active components. You ought to have an idea of how much current the board should draw and make sure you are not drawing more than you expect. I'd still check the voltages before trying anything else.

Once you have power, you can try loading some software. My advice is to keep it simple, especially the first time. The classic test is to blink a digital output and watch it with an LED or an oscilloscope. Once that works, you can move to more complex tests.

I do think it's important, though, to try specific tests on a startup. There's always a temptation to just try to start with code you may "know" works through simulation or execution on an evaluation board. You really want to test out the subsystems carefully. I try to write tests that "grow" as I get more confidence. For example:

Toggle digital outputs.

Invert digital inputs and send to digital outputs.

Send digital inputs to host computer and an inverted copy to the digital outputs.

Test other I/O (analog, PWM, motor controls)

Test mass storage

Of course, the specific tests will depend on your exact design. The point is to test little pieces and then use those pieces to help test most pieces.

You don't need much to implement this methodology. A voltmeter, a power supply, and an LED is probably enough. An oscilloscope is helpful too, but not absolutely necessary.

Have a favorite tip for handling a first-time start up of a new design? Or a good horror story? Leave a comment and share.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!