Circuit-Cellar-018.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
1 EDITOR’S I’ve Seen the Future INK Curtis Franklin, Jr. 1 I recently led a panel discussion at the Embedded Systems 32-BIT PROCESSORS Programming Conference. I met interesting people, arranged for a few articles, and ran into lots of folks who were carrying crystal There weren’t many people talking about 8-bit processors at balls in their fanny packs. I thought you might like to know what the show. Intel mentioned the 8051, saying that they have now they say you’re going to be doing in the next few years... shipped over 100,000,000 of them, but that came as a passing statement at their press conference announcing the latest mem- OPERATING SYSTEMS bers of the 80960 family. Motorola was ready and willing to talk about 68030 and 88000 applications, National was discussing the You’re going to be using an operating system. I’m not talking 32000, and everyone was announcing the arrival of the 32-bit about the operating system on your desktop computer, but the future. Once in a while I heard talk about 16-bit chips like the complete multitasking operating system that you’ll be building 80186 and 8096, but there was a noticeable absence of discussion into each and every control project. Depending on who you talk on anything having to do with 8-bit applications. to, you’ll be using an MS-DOS variant, a UNIX variant, or a All of the predictions I’ve talked about are fine and probably specialized embedded 0s for your development. All of these will true if you are involved in building avionics for the B-2 or make your life easier, your software more powerful, and your automating a nuclear power plant. If, on the other hand, you’re breath fresher. They may be right, but I’m not fully convinced. working on building automation, data logging, or day-today First, an operating system assumes that you can accept a process control, 32-bit processors and million-line applications hefty chunk of overhead in your software. Anyone who’s still running under UNIX may be a bit of overkill. forcing their code into 8K EPROMs will be in special trouble, but there will be more about that a little farther down the page. Most CIRCUIT CELLAR INK folks at the show weren’t worried about memory constraint, and they weren’t terribly worried about the cost the OS adds to the So what are we going to do? We’re going to renew our project. I’ve seen prices ranging from $99 for Coherent (a UNIX- commitment to 8-and 16-bit applications, with a special empha- like OS) to $3,000+ for some of the specialized embedded prod- sis on stretching the limits of the possible with 8-bit processors. ucts. It’s a different type of overhead, but substantial overhead There are new g-bit processors coming onto the market, and we increase all the same. Finally, an operating system adds another will let you know about them. If you need more power, there is level of complexity to any debugging exercise. You can’t just alot of activity in 16-bit processors, and we’ll keep you up-todate worry about how your software is interacting with the hardware, there. Operating systems will play a part in both 8- and 16-bit you have to consider how the passions in the hardware-OS- applications, as will high-level languages, so we’ll look at how application software triangle are affecting one another. The time both can affect the project you work on. Finally, we’ll remember involved is still more overhead that must be absorbed by the that one of the reasons most of you read C IRCUIT CELLAR INK is project. All of this overhead is starting to add up, unless you’re that we take “the road less traveled” in our approach to applica- writing a truly large application. tions. We’re going to be going a little farther down those less- traveled paths in upcoming issues. LARGE APPLICATIONS A NOTE You know the 8K EPROM I mentioned in the last section? Well you can forget putting code into it. You’re going to be Scott Ladd’s “Practical Algorithms” is taking a one-issue va- writing embedded software that needs 500,000-l,OOO,OOO lines of cation. It will be back in CIRCUIT CELLAR INK #19. code. Stop for a moment and let that sink in. Are you still with me? If you’re going to spend the time, money, and effort to develop a million lines of embedded code, the overhead of an operating system gets lost in the background noise. Furthermore, I’m willing to say that, if you have a million- line program, you need an operating system to support your code. You also need a high-level language, heavy-duty libraries and support programs, and a debugger that will work with you in a most intimate fashion. Oh yes, you also need a processor that will let you get to that much code. December ‘90/January ‘9 1 1 FOUNDER/ EDITORIAL DIRECTOR Steve Ciarcia PUBLISHER Daniel Rodrigues THE COMPUTER EDITOR-in-CHIEF Curtis Franklin, Jr. APPLICATIONS MANAGING JOURNAL EDITOR Ken Davidson PUBLISHING CONSULTANT John Hayes ENGINEERING STAFF Jeff Bach/o&i ONDI-The ON-Line Device Interface, Part 2 Edward Nisley 12 Software for Remote PC Control CONTRIBUTING 0 by John Dybowski EDITORS A complete computer remote-control system wraps up with a look at Thomas Cantrell the software for remote control, operation, and display. Christopher Ciarcia NEW PRODUCTS Principles of PC-based Data Acquisition and EDITOR Control Systems Harv Weiner 018 by Chris Ciarcia CONSULTING Writing control software can’t start until you understand the problems. EDITORS A lesson in control theory can save you hours in wasted design time. Mark Dahmke Larry Loeb An Interface for Portable Battery-Backed RA CIRCULATION Using the Mitsubishi BEE Card for Non- COORDINATOR volatile Data Storage Rose Manse/la by Tim McDonough & Bruce Webb CIRCULATION “Credit card” memory offers non- CONSULTANT volatile storage in a portable package. Gregory Spiizfuden Interfacing to Mitsubishi’s version couldn’t be simpler, ART & PRODUCTION DIRECTOR Tricia Dziedzinski PRODUCTION A Venerable History and a ARTIST/ILLUSTRATOR Lisa Ferry Certain Future by Steve Ciarcia & Burt Brown BUSINESS Motorola’s 68HCll is a powerful 8-bit MANAGER processor. It’s a perfect choice for a Jeannette Walters compact controller. ADVERTISING COORDINATOR Dan Gorsky STAFF RESEARCHERS Designing with Flash Memory Northeast Eric Alberf Is There a New Alternative to EEPROM and SRAM? William Cuf/ew by Markus A. Levy Richard Sawyer Flash memory is the lat Robert Stek nonvolatile storage. Midwest Jon E/son A PC-bus design illus- 7im McDonough trates techniques for West Coast interfacing and Frank Kuechmann programming. Mark Voorhees Cover Illustration by Robert Tinney 2 ClRCUlT CELLAR INK Circuit Cellar BBS-24 Hrs. 300/l 200/2400 bps, 8 bits, no parity, 1 stop bit, (203) 871. Editor’s INK 1988. 1 I’ve Seen the Future by Curtis Franklin, Jr. The schematics provided cl in Circuit Cellar INK are The times are a’changing...and so is our industry. A recent industry drawn using Schema from conference provided a (murky) crystal ball for your editor. Omation Inc. All programs and schematics in Circuit Cellar INK have been care- fully reviewed to ensure that their performance is in ac- Reader’s INK-Letters to the Editor cordance with the specifi- cations described, and pro- 141 gramsarepostedon theCir- cuit Cellar BBS for electronic MWroductNews transfer by subscribers. Circuit Cellar INK makes no warranties and assumes 811 no responsibility or liability of any kind for errors in these Firmware Furnace programs or schematics or ANSI Controls and Fixed Points for the consequences of any 61 The Furnace Firmware Project Continues such errors Furthermore, be- 7 cause of the possible vari- by Ed Nisley ation in the quality and con- The fine points of getting the right results and showing them to the ditionof materialsand work- user are the heart of this installment. manship of reader-as- sembled projects, Circuit Cellar INK disclaims any re- sponsiblity for the s&e and proper function of reoder- From the Bench assembled projects based Magnetic Levitation: An Example in Closed-Loop Control upon or from plans, descrip- 71 tions, or information pub cl How to Defy Gravity Without the Use of Black Magic lished in Circuit Cellar INK. by Jett Bachiochi Closing the loop with a floating ball can teach you a lot about how CIRCUITCELLAR INK (ISSN 08968985) is published bi- a control system works. monthly by Circuit Cellar In- corporated, 4 Park Street, Suite 20, Vernon, CT 06066 (203) 875-2751. Second- Silicon Update class postage paid at Ver- non, CT and additional of- Goodbye CRT, Hello LCD fices. One-year (6 issues) by Tom Cantrell subscription rate U.S.A. and New LCD devices and controllers make LCD a more viable choice passessionsS14.95.Canoda/ Mexico S17.95. all other than ever before for demanding display applications. countries $26.95 (surface), $38.95 (air). All subscription orders payable in U.S. funds only, via international postal ConnecTime-Excerpts from the Circuit Cellar BBS money order or check drawn on U.S. bank. Direct Conducted by Ken Davidson subscription orders to Circuit CellarINK.Suhcn’piions.P.0. Box 3050-C. Southeastern, PA 19398 or call (215) 630- Steve’s Own INK 1914. POSTMASTER: Please The Whole Job sendaddresschangestocir- by Steve Ciarcta cuit Cellar INK, Circulation Dept.. P.O. Box 3050-C.