A thought...

Michael F. Sargent MSargent at gallium.com
Tue Oct 1 19:49:47 GMT 1996


> From: "Dan J. Declerck" <declrckd at cig.mot.com>
> > 
> > I'm thinking, instead of going the 68hc11 route, using a pc.  Instead of
> > building a a/d and d/a board, use two parallel ports.  That would give me
> > 8 ins and 8 outs.  Timing would be resolved by the computer, hell, 386/486
> > motherboards are cheap.

> Yes, but how will you mount it in your car? How much power can you afford 
> to use to run this PC? The benefits might be swallowed by the additional
> Horsepower lost in the new alternator required to run the thing.

Let's get real here. We're not talking about putting a full tower, with
mirrored SCSI disks, CD-ROM, sound card, 21" monitor, etc. in the car,
just using those components that make sense.

A typical PC MB is rather small these days. Mount it is a box in the trunk.
The new Pentium MBs include serial, parallel, IDE, floppy, KB, RAM and cache.
Leave room for a couple of commercial analog cards, and add in an IDE drive
for permanent storage. (Later burn the working code into ROM and replace the
BIOS ROM chips.) The whole shooting match would probably only need about
20 watts of power (measure it sometime).

> You have to do things in Real-time, and no RTOS is easily accessable
> for this system?

There are lots of RTOS's available for PC's (i.e. RTEMS or QNX).

> How will you isloate this computer system and it's connectors from vibration
> inherent in automobiles?

Same way you would do it for any controller. What's so diffent about a PC?

> How do you do the timing control without a TPU, and/or PWM waveform generator?

This is the sticker. You would want to find an add-on card with a TPU
(or equiv). Otherwise you will be doing a lot of high speed bit
twiddling (see below).

> How do you get timing control tighter than 55 ms? (the timer tick on PC boards
> are 1/18th of a second).

Just plain wrong.

The timer on a PC uses a programable divider to generate interupts.
Under DOS, and Windows 3.x, the timer was programmed to a value of
65,536 (actually 0 is used for this divisor) and that resulted in the
18.2 Hz interupt. But if programmed with a lower value, you will get
faster interupts. A value of 1 would produce interrupts at a rate of
1,193,180 MHz. To get interupts at a rate of 10,000 Hz, a divisor of
around 119 would be used (actually giving 10,026 Hz).

BTW: With an engine turning at 6,000 RPM (100 RPS), the engine turns
over 360 degrees every 1/100 of a second. With interupts at 10,000 per
second, that means an interupt will occur every 3.6 degrees. That should
be accurate enough for most people. But if you want greater accuracy,
just reduce the divisor to 33, and you'll get interupts every degree.
(Admittedly, your ISR will need to be pretty tightly coded even on a
Pentium in this case.)

> How do you program in 80386 assembler and have few bugs?

Why not use C, or C++, or Pascal, or Ada, or Forth, or ...
The language choices are better for a PC than for any imbedded processor.

A PC could be a very good choice. If you look in an issue of Circuit Cellar
you will find all sorts of ads for Imbedded PCs, which are PC compatible and
usually have all sorts of analog and digital I/O available.

+--------------------------------------------------------------------------+
| Michael F. Sargent   | Net: msargent at gallium.com | Phone: 1(613)721-0902 |
| Gallium Software Inc.|                           | FAX:   1(613)721-1278 |
+--------------------------------------------------------------------------+




More information about the Diy_efi mailing list