Download 6 0 - dshinin.ru
Transcript
CIRCUIT CELLAR Fib&-- ~ Double, Double, Toil, & Trouble THE COMPUTER APPLICATIONS JOURNAL FOUNDER/EDITORIAL Steve Ciarcia ave you ever noticed how code debugging more closely resembles a black art than a V science? The religious wars over what technique is rbest to use under what circumstances rivals only what the best language is to use. Some will tell you that only a multithousand-dollar ICE will suffice when trying to track down your latest microbe, while others prefer to rely more on tricks, technique, and intuition. I’m in the latter camp. I’m sure many will cringe, but my personal primary debugging technique is still the old crash and burn method. Write the code, try it, and watch it crash. Well...there is more to it than that. A large part of my coding technique involves careful, step-by-step design, development, and testing. Thoroughly map out the algorithm in your head before writing the first line of code. Next, add only a small amount of code between tests and run that code in your mind at least three times to make sure it will do what you expect. Then test only that small portion. Finally, on a larger scale, make sure your new code hasn’t broken the whole thing. Every time I try to make massive changes or add lots of code at once, I’m bitten by multiple bugs that seem to feed off each other. Take small, deliberate steps and you’re most of the way there. Some bugs do need more sophisticated techniques when time is of the essence, but don’t overlook other tried-and-true methods when money is also important. Speaking of debugging techniques, we start off this month with an overview of cross-development and debugging tools and some advice on what to use and when. There are many factors to take into account, so it’s definitely not a cut-and-dry issue. Next, we look at a low-cost, roll-your-own alternative for doing 68HCll code development. As I’ve said, it doesn’t have to be expensive. When it comes to training tomorrow’s engineers, nothing beats handson experience. With our colleges as money strapped as the rest of us, hands-on work is often a luxury rather than the norm. Take a look at how one college professor is giving his students experience without paying a king’s ransom. In our final feature, find out how to more than double the speed of your 8051-based controller without making a single hardware or software change to the board (other than replacing the processor). Do watch those softwarebased delay loops, though. In our columns, Ed continues adding a large LCD panel to his embedded ‘386SX project by writing some support code. Jeff puts in a plug for the Institute for Interconnecting and Packaging Electronic Circuits and describes some of the benefits of joining your local Designers Council. Tom describes the latest in programmable parts that can be updated while in circuit. John starts the hardware of his embedded control system with the processor, backplane, and power control. Finally, Russ searches out patents related to cross-development tools. 2 7L Issue #44 March 1994 The Computer Applications Journal DIRECTOR PUBLISHER Daniel Rodrigues EDITOR-IN-CHIEF Ken Davidson PUBLISHER’S ASSISTANT Sue Hodge CIRCULATION COORDINATOR Rose Mansella TECHNICAL EDITOR Michael Swartzendruber CIRCULATION ASSISTANT Barbara Maleski ASSOCIATE EDITOR Rob Rojas CIRCULATION CONSULTANT Gregory Spitzfaden ENGlNEERlNG STAFF Jeff Bachiochi & Ed Nisley BUSINESS MANAGER Jeannetre Walters WEST COAST EDITOR Tom Cantrell ADVERTISING COORDINATOR Dan Gorsky CONTRIBUTING EDITORS John Dybowski & Russ Reiss NEW PRODUCTS EDITOR Harv Weiner CIRCUIT CELLAR INK, THE COMPUTER APPLICATIONS JOURNAL (ISSN 0696-6985) IS published monthly by Clrcult Cellar Incorporated. 4 Park Street, Suite 20, Vernon, CT 06066 (203) 875-2751. Second class postage paid Vernon, CTand addItIonal onices. One-year (12 issues) subscrIptIon rate U S A and possess1ons$21 95,Canada/Mexlco$Sl 95,allothercoun. tries $49.95. All subscription orders payable in U.S. funds only, w international postal money order or check drawn on U.S. bank Direct subscrlptlon orders and subscrlptlon related questions to The Computer Appi~cat~ons Journal SubscrIptIons, P 0. Box 7694, Rnerion, NJ 06077 or call (609) 786.0409. POSTMASTER. Please send address changes to The Computer Applications Journal, Circulation Dept., P.0 Box 7694, Riverton, NJ 06077 ART DIRECTOR Lisa Ferry at GRAPHIC ARTIST Joseph Quinlan :ONTRIBUTORS: Jon Elson Tim McDonough -rank Kuechmann ‘ellervo Kaskinen >over Illustration by Bob Schuchman ‘RINTED IN THE UNITED STATES iAJAR ASSOCIATES NATIONAL ADVERTISING REPRESENTATIVES lORTHEAST SOUTHEAST WEST COAST 617) 769-8950 ‘ax: (617) 769-8982 (305) 966-3939 Fax: (305) 985-8457 & Shelley Rainey (714) 540-3554 Fax: (714) 540-7103 Iebra Andersen Christa Collins IID-ATLANTIC MIDWEST 908) 741-7744 :ax: (908) 741-6823 (708) 789-3080 Fax: (708) 789-3082 3arbara Best Barbara Jones Nanette Traetow Circuit Cellar BBS-24Hrs. 300/1200/2400/9600114.4kbps, 6 bits, noparlty. 600 bps Cower HST, (203) 671.0549 1 stopbil, (203)671-t 966;2400/ All programs and schematcs I” Circuit CellarlNKhave been carefully revlewd to ensuretheirperformance ~inaccordancewithihespec~f~caiionsdescr~bed,andprogramsareposiedontheC~rcu~tCellarBBSforelectran~c ansfer by subscnbers. Circuit CeliariNKmakesno warranties and assumes norespons~bllktyor liab~lttyoiany klndforerrors inthese rograms or schematics or for the consequences of any such errors Furthermore, because of possible variation the qualIly and condition of materials and workmanshlp of reader-assembled projects. C~rwt Cellar INK sclalms any responsibllty for the safe and proper function of reader-assembled protects based upon or from law descriptions, or Information published in Circuit CeliarINK Enttre contents copyrIght 0 1994 by Clrcult Cellar Incorporated. All rights reserved. Reproduction of this Jblication in whole or in part without wtten consent from Circuit Cellar Inc. 1s prohibited