Page 184 - The Art of Designing Embedded Systems
P. 184

Troubleshooting  171


                   work, I start testing VO interfaces by writing low-level drivers and exer-
                   cising the  code, making  software and  hardware  changes  in parallel  as
                   needed. The code changes much faster than the wiring, so it seems waste-
                   ful to keep an iron hot all the time. Several companies sell neat $30 cord-
                   less soldering irons that heat in seconds, the ideal thing for those infrequent
                   modifications.
                        Being an immensely stupid person, I require vast quantities of  clip
                   leads. Most of my ideas are wrong, so I save a ton of time by using a clip
                   lead to try a design change and see what happens.
                        Clip leads have a very short lifetime in a development lab. Accidentally
                   connect Vcc to ground and the plastic tip melts horribly. I hate it when that
                   happens. We used to send a runner to Radio Shack occasionally to replenish
                   our supply but found that “the Shack” couldn’t keep up with our needs.
                        It’s better to buy  100 clips at a time and have a high-school kid sol-
                   der up 50 leads. You’ll have an infinite supply for a while, and may help a
                   fledgling engineer find his true vocation. (Bring a part-timer in from your
                   local high school to help maintain the lab. The cost is minuscule, the lab
                   will be better off for it, and you’ll show one more kid that there are alter-
                   natives to slinging burgers.)
                        Be sure your lab area is set up to ensure that you can also do serious
                   software development! Clearly, your computer must include the properly
                   installed compilers and assemblers needed for the project. Just as impor-
                   tant as quality hand tools are the debuggers, make utilities, and other soft-
                   ware resources needed to quickly and painlessly write, compile, and test
                   the code. Set up the environment  with a Make utility  so you  can com-
                   pile/assemble without twiddling compiler switches.
                        Hardware  design  requires  as much  software support  as  does  the
                   firmware. PALS, PLDs, and FPGAs let you create much of the hardware
                   design late in the game and so are a wonderful thing. Be sure your bench
                   is set up with all of the tools you need to edit and compile these.


                        Documentation
                        All too often the frenetic pace of debugging hardware tempts us to be
                   less than careful about writing down changes. Resist this temptation. Your
                   company is paying you to debug a prototype for one reason only: so it can
                   be  turned  into a working production system. If  you carelessly forget to
                   document  modifications,  the company  will  need at  least one additional
                   PCB revision, which you’ll have to debug all over again. This is a terrible
                   waste of money. A wise manager of such a documentation-free engineer
                   will either retrain or fire the individual.
   179   180   181   182   183   184   185   186   187   188   189