CC_1995_i0055.pdf

(6035 KB) Pobierz
377403552 UNPDF
377403552.100.png
CIRCUIT
THE COMPUTER APPLICATIONS JOURNAL
lthough convenGonal wisdom holds that
embedded applications require special embedded
controllers and interfaces, we’re starting to see that
wisdom challenged. When cost, not size, is the primary
concern, off-the-shelf solutions from the desktop arena often offer a better
price/performance ratio than their semicustom cousins.
A good example is Ed’s embedded ‘386SX series. He’s been able to
show that by using inexpensive, “jelly-bean” motherboards instead of tiny,
specialized controllers, costs stay down without sacrificing performance.
I had occasion in the past few weeks to come across another example,
though with a much smaller market. Caller ID, a service provided by the local
phone companies across the U.S., provides the called party with the caller’s
phone number (and sometimes name) before answering the phone. Caller
ID boxes that display and record the data are available from many
electronics suppliers in a price range of $3C-$90. Most of these units are
stand-alone devices, though. Interfacing them with a computer to make
further use of the information is a costly and kludgy proposition.
Some of these boxes do have a serial port tacked on the side, but it
drives the price up well over $100 for the unit. There is a better alternative.
If you can do without the fancy display (e.g., your application uses a
voice to notify you who’s calling), many modems on the market today offer
Caller ID as an additional feature to the normal data and fax capabilities.
Why pay over $100 for a box that does nothing but Caller ID when you can
get a modem to do the whole deal for under $130?
Another good example of reusing other solutions can be found in one
of our articles this month. Infrared-based printers intended for use with
intelligent calculators are inexpensive and readily available. Using them in
an embedded application is a simple matter of knowing what IR codes to
send. Why pay triple the price for a special-function, battery-operated printer
when a low-cost, canned solution exists?
Such economies of scale helped put a virtual end to build-your-own
PCs (though no amount of monetary savings could match the pleasure many
of our readers derive from making their own). This trend is now moving into
the embedded peripheral market where A/D converter boards, Caller ID
boxes, and tiny printers have so many features included that it doesn’t make
sense to roil your own. The functional& is already there! And who has the
time or money, anyway?
There will always be a place for custom and semicustom solutions,
especially with constraints on size, weight, power usage, and so forth. Such
engineering is our lifeblood. We just have to be sure to keep an open mind
when design specs aren’t tight.
FOlJNDEWEDlTORlAL DIRECTOR
PUBLISHER
Steve Ciarcia
Daniel Rodrigues
EDITOR-IN-CHIEF
PUBLISHER’S ASSISTANT
Sue Hodge
TECHNICAL EDITOR
CIRCULATION COORDINATOR
Janice Marinelli
Rose Mansella
ENGINEERING STAFF
CIRCULATION ASSISTANT
Jeff Bachiochi & Ed Nisley
Barbara Maleski
WEST COAST EDITOR
CIRCULATION CONSULTANT
Tom Cantrell
Gregory Spitzfaden
CONTRIBUTING EDITOR
BUSINESS MANAGER
NEW PRODUCTS EDITOR
ADVERTISING COORDINATOR
Harv Weiner
Dan Gorsky
ART DIRECTOR
CIRCUIT CELLAR INK, THE COMPUTER APPLICA-
Lisa Ferry
TIONS JOURNAL (ISSN 0696-6985) IS published
monthly by Circuit Cellar Incorporated. 4 Park Street.
GRAPHIC ARTIST
Suite 20, Vernon, CT 06066 (203) 675.2751. Second
Joseph Quinlan
~IasspostagepaidatVernon, CTandaddltlonalofl~ces.
One-year (12 issues) subscnption rate U.S.A. and pos-
PRODUCTION STAFF
sess1ons$21.95,CanadaiMex~co$31.95,allothercoun-
WS $49.95. All subwpbon orders payable I ” U.S.
John Gorsky
James Soussounis
funds only, #a mtemabonal postal money order 0,
check drawn on U.S. bank. Direct subscrlptlon orders
CONTRIBUTORS:
and subscraption related questIons to C~rcult Cellar INK
SubscrIptIons, P.O. Box 696, Holmes. PA 19043.9613
Jon Elson
or call (600) 269-6301.
Tim McDonough
POSTMASTER, Please send address changes to Cir-
Frank Kuechmann
cu~tCellarlNK,C~rculat~onDept., P.O. Box696. Holmes,
PA 19043.9613.
Cover photography by Barbara Swenson
PRINTED IN THE UNITED STATES
HAJAR ASSOCIATES NATIONAL ADVERTISING REPRESENTATIVES
NORTHEAST &
MID-ATLANTIC
Barbara Best
(908) 741-7744
Fax: (908) 741-6823
SOUTHEAST
Christa Collins
(305) 966-3939
Fax: (305) 985-8457
WEST COAST
Barbara Jones
& Shelley Rainey
(714) 540-3554
Fax: (714) 540-7103
MIDWEST
Nanette Traetow
(708) 789-3080
Fax: (708) 789-3082
C1rcu1tCellarEBS-24Hrs. 300112001240019600114 4k bps.6 bats. noparity. 1 StopbIt, (203)671-1966; 24001
9600 bps Courier HST, (203) W-0549
All programs and schematics in Qrcuit CellarlNKhave been carefully reviewed to ensure ther per(ormance
~s~naccordancewlththespeclflcatlonsdescrlbed,andprogramsarepostedon
theC~rcuiiCellarBBSlotelectron~c
transfer by subscribers
C~rcetCeflarlNKmakesno warrantiesandassumes noresponsibilityorliablllhlof any k~ndlotetrorsm these
programs or schematics or for the consequences of any such erors. Furthermore. because of possible variabon
I” the quality and condition of materials and workmanship of reader-assembled projects, Crcu!t C&r INK
disclaims any responslbllty for the safe and proper funcbon of reader-assembled projects based upon or from
plans, descnptions, or miormatton published in Circuit Cellar INK.
EntIre contents copynght 0 1995 by Clrcult Cellar Incorporated All rights reserved. Reproducbon of thls
public&on m whole or in part wtthout wrliien consent from Clrcult Cellar Inc. IS prohIbIted.
2
Issue #55 February 1995
Circuit Cellar INK
Ken Davidson
John Dybowski
Jeannette Walters
Pellervo Kaskinen
377403552.111.png 377403552.122.png 377403552.133.png 377403552.001.png 377403552.011.png 377403552.022.png 377403552.033.png 377403552.044.png 377403552.055.png 377403552.056.png 377403552.057.png 377403552.058.png 377403552.059.png 377403552.060.png 377403552.061.png 377403552.062.png 377403552.063.png 377403552.064.png 377403552.065.png 377403552.066.png 377403552.067.png 377403552.068.png 377403552.069.png 377403552.070.png 377403552.071.png 377403552.072.png 377403552.073.png 377403552.074.png 377403552.075.png 377403552.076.png 377403552.077.png 377403552.078.png 377403552.079.png 377403552.080.png 377403552.081.png 377403552.082.png 377403552.083.png 377403552.084.png 377403552.085.png 377403552.086.png 377403552.087.png 377403552.088.png 377403552.089.png 377403552.090.png 377403552.091.png 377403552.092.png 377403552.093.png 377403552.094.png 377403552.095.png 377403552.096.png 377403552.097.png 377403552.098.png 377403552.099.png 377403552.101.png 377403552.102.png 377403552.103.png 377403552.104.png 377403552.105.png 377403552.106.png 377403552.107.png 377403552.108.png 377403552.109.png 377403552.110.png 377403552.112.png 377403552.113.png 377403552.114.png 377403552.115.png 377403552.116.png 377403552.117.png 377403552.118.png 377403552.119.png 377403552.120.png 377403552.121.png 377403552.123.png 377403552.124.png 377403552.125.png 377403552.126.png 377403552.127.png 377403552.128.png 377403552.129.png
14
Interfacing Flow Meters to High-speed Counters
by Bill Payne
18
Use Infrared to Make Embedded Printing Easy
by leff Fisher
22
It’s Not Just for Memory Anymore
An Introduction to PCMCIA
by Lalo J. Gastriani
30
Speeding and Slimming Your Port Access
A Different Way of Reading from the PC Parallel Port
by Tracey Lee e9 Kok-Leong Ong
36
Battery-operated Power Supplies
Selecting the Right Battery and Supply for Your Application
by David Prutchi
50
¦ Firmware Furnace
Journey to the Protected Land: Infrastructure Improvement
Ed Nisley
60
¦ From the Bench
Fitting 10 oz. into a 5-0~. Package
An Application for Highway Safety
/eff Bachiochi
68
¦ Silicon Update
I Sync, Therefore I DRAM
Tom Can trell
76
¦ Embedded Techniques
Downsizing
Atmel’s AT89C205 1 Flash-based Microcontroller
[ohn Dybowski
Letters to the Editor
I
New Product News
edited by Harv Weiner
Circuit Cellar INK
Issue #55 February 1995
3
377403552.130.png 377403552.131.png 377403552.132.png 377403552.134.png 377403552.135.png 377403552.136.png 377403552.137.png 377403552.138.png 377403552.139.png 377403552.140.png 377403552.141.png 377403552.142.png 377403552.143.png 377403552.002.png 377403552.003.png 377403552.004.png 377403552.005.png
 
NEW COVER-A STEP UP
I got the latest INK today-very professional
looking. It reminds me of PopuIur Science or such. Of
course, the contents are much better than those other
magazines!
Hope y’all have a great ‘95
P.S.: Thanks for sending a replacement for the issue
that the postal service mangled.
Editor’s Note: The March issue features fuzzy logic and
will be offering two fuzzy-pong designs. Be sure to pick
up a copy so you can compare Tom’s technique with a
fuzzy approach.
Russ Reiss
Bolton, CT
PRAISE AND FIXES
I really enjoy Ed Nisley’s series on protected-mode
programming. At the moment, my only application is
writing assembly language subprograms to run under
Lahey FORTRAN F77L EM/32, which runs under the
Pharlap DOS extender. Even so, I’ve found several
helpful nuggets of information. If Ed wants to explain
how to write an interrupt service routine for IRQ2
(vertical retrace) running in protected mode under
Pharlap, I wouldn’t mind at all.
As an ancient controls engineer (MIT ‘57), I noticed
that Tom Cantrell’s PID-pong control loop has the
gains set wrong. The response shown in Figure 5 (INK
50) is much too oscillatory. You can see, not quite
hidden by the noise, a slowly decaying sine wave in the
fan plot starting after each change in the position
setpoint.
The frequency of the sine wave is the natural
frequency of the entire system; it shouldn’t be so
prominent in the responses. In a well-designed system,
it would damp out in a couple of cycles or less after a
change in setpoint. With this design, the motor has to
work too hard and there is little stability margin. A few
decibels gain increase (temperature or whatever) could
make the design unstable.
To improve the response, set the gain to zero. Try
reducing the P gain or increasing the D gain. Up to a
point, increasing the D gain allows for higher values of
the P gain without making the response too oscillatory.
Once you get good values for the P and D gains,
increase the I gain as far as possible without spoiling
the transient response. Small test inputs should be used
in this stage. Finally, adjust the nonlinear parameters
for the largest inputs you expect.
FOR YOUR INFORMATION
Thank you for featuring fuzzyTECH-MP, Microchip
Technology Inc.‘s new fuzzy logic development tool, in
your December ‘94 issue. Several readers have asked us
how to obtain more information about Inform Software
Corporation, Evanston, Ill., who developed the fuzzy
logic tool suites for this device. Inform Software can be
reached at (800) 929-28 15. The fuzzyTECH-MP product
is available only through any Microchip worldwide sales
office and authorized dealer or by calling (602) 786-7668.
Eric Sells
Public Relations Manager
Microchip Technology, Inc.
Contacting Circuit Cellar
We at Circuit Cellar INKencourage communication between
our readers and our staff, so have made every effort to make
contacting us easy. We prefer electronic communications, but
feel free to use any of the following:
Mail: Letters to the Editor may be sent to: Editor, Circuit Cellar INK,
4 Park St., Vernon, CT 06066.
Phone: Direct all subscription inquiries to (800) 269-6301.
Contact our editorial offices at (203) 875-2199.
Fax: All faxes may be sent to (203) 872-2204.
BBS: All of our editors and regular authors frequent the Circuit
Cellar BBS and are available to answer questions. Call
(203) 871-1988 with your modem (300-14.4k bps, 8Nl).
Internet: Electronic mail may also be sent to our editors and
regular authors via the Internet. To determine a particular
person’s Internet address, use their name as it appears in
the masthead or by-line, insert a period between their first
and last names, and append ‘Qcircellarcom” to the end.
For example, to send Internet E-mail to Jeff Bachiochi,
address it to jeff.bachiochi@circeIlar.com. For more
information, send E-mail to info@circellar.com.
James C. Wilcox
Palos Verdes Estates CA
6
Issue #55 February 1995
Circuit Cellar INK
377403552.006.png 377403552.007.png 377403552.008.png 377403552.009.png 377403552.010.png 377403552.012.png 377403552.013.png 377403552.014.png 377403552.015.png 377403552.016.png 377403552.017.png 377403552.018.png 377403552.019.png 377403552.020.png 377403552.021.png 377403552.023.png 377403552.024.png 377403552.025.png 377403552.026.png 377403552.027.png 377403552.028.png 377403552.029.png
IN-J ~BI~(NEW~
B B
Edited by Harv Weiner
MINIATURE CCD CAMERA
A miniature breadboard-type CCD black & white camera (1.26” x 1.26”
x 0.75”) is available from Edmund Scientific. The camera can be used for
home and office security, robotics, machine vision, and instrumentation
applications.
The unit produces video output with an automatic electronic shutter
and features a 3.7-mm pinhole lens built into the breadboard assembly. The
field of view is 45” vertical x 60” horizontal with 32-mm x 32-mm dimen-
sions. Miniature details can be observed on a TV monitor from a range of
only inches up to 15’ with a 0.3-1~~ minimum illumination. Resolution is
380 TV lines horizontal by 350 lines vertical. The unit uses 9-VDC input.
Edmund Scientific Co.
Dept. 14B1, N999 Edscorp Bldg. Barrington, NJ 08007
(609) 573-6259 Fax: (609) 573-6295
#500
EMBEDDED SYSTEM DEVELOPMENT TOOLS
Phar Lap’s new TNT Embedded ToolSuite delivers a total solution for 32.bit embedded-systems development on
the Intel 386/486 family of microprocessors. The suite offers an easy and cost-effective, one-stop solution for building
embedded applications using popular DOS and Windows compilers. Supported compilers include 32-bit C/C++
products from Borland, Microsoft, and MetaWare.
The ToolSuite’s components include the TNT Embedded Kernel, Visual System Builder, LinkLoc (a 32.bit linker
and locator), and CVEMB and TDEMB shells for embedded cross-debugging. Full support for C/C++ run-time librar-
ies, an MS-DOS-compatible file system, and a floating-point-emulation library are also included.
The TNT Embedded Kernel provides a simple operating system for running embedded programs. Its two main
functions are to initialize 32.bit protected mode and provide the foundation for running a C/C++ run-time library.
These functions can save development time since developers don’t have to set up their own protected-mode environ-
ment or learn new run-time libraries. The Kernel can be loaded from ROM or diskette. The Kernel also includes a
floating-point emulator, native MS-DOS file system, and a remote file system.
The Visual System Builder enables developers to configure and customize the TNT Kernel to match their
hardware setup through an easy-to-use Windows utility. Developers can specify where memory is located in the
target, how the kernel is loaded into memory, and how the target system communicates with the debugger.
As a sophisticated one-step linker/locator,
LinkLoc builds embedded applications that run
on the TNT Embedded Kernel. LinkLoc includes
a rich set of command switches to control the
entire link process. It can provide full symbolic
information for C/C++ source-level debugging
with CodeView or Turbo Debugger. In addition,
it can output files for an in-circuit emulator or
PROM programmer.
The TNT Embedded ToolSuite sells for
$2995. Requirements include a PC-compatible
host computer running DOS and Windows 3.1.
Phar Lap Software, Inc.
60 Aberdeen Ave. Cambridge, MA 02138
(617) 661-l 510 Fax: (617) 876-2972
#I501
8
Issue #55 February 1995
Circuit Cellar INK
377403552.030.png 377403552.031.png 377403552.032.png 377403552.034.png 377403552.035.png 377403552.036.png 377403552.037.png 377403552.038.png 377403552.039.png 377403552.040.png 377403552.041.png 377403552.042.png 377403552.043.png 377403552.045.png 377403552.046.png 377403552.047.png 377403552.048.png 377403552.049.png 377403552.050.png 377403552.051.png 377403552.052.png 377403552.053.png 377403552.054.png
Zgłoś jeśli naruszono regulamin