Complicated math, Multi-tasking in ECMs

Jim Pieronek jvp%fuelrod at juliet.ll.mit.edu
Sat Nov 12 06:33:10 GMT 1994


Dale Ulan writes:
 > 
 > The normal way of doing ECM work is to do the math 'grunt-work' in 
 > a workstation in someone's office, then leave the ECM firmware as
 > simple as possible when it comes to math. Memory in a computer is
 > cheap, processing speed is not. Neither is a programmer's time to
 > come up with an optimum quadratic or cubic curve-fitting interpolation
 > and have it execute in the required (insane) amount of time.
 > 

I agree that linear interpolation is the way to go, particularly with
the controllers that people tend to use these days - 6811s and so
forth.  I suspect it won't be as big an issue when PowerPC controllers
(and the 68k job I've heard about here), possibly with floating point,
come along.

But I think that the tradeoff in programmer's time vs. memory tilts
toward spending money on the programmer.  The engine that I worked on
was targeted for production by the million.  Every cent that could be
cut from the engine cost was $10,000 over a million engines.  If a
programmer could work a year on something and save 25 cents on memory
the company would save $250,000 - many times his salary.  And then
he'd be hacked off because he didn't get any of that loot.

On a completely different subject, as I regurgitate all of this
rubbish from my GM days, I recall that all of the ECM code ran in "big
loop" mode - we did not use true multi-tasking.  We only had one or
two interrupts and they couldn't cause task switching.  There were
some big hunks of low-priority code that were run in "chunks" that had
to execute in a fixed number of milliseconds and preserve their state
until the next piece was run.

This drove me nuts after a while and I secretly wrote a tiny
multi-tasking exec for our ECM that was referred to as the "secret
weapon exec" by us software guys.  This was strictly against Delco
policy - "There will be no multi-tasking, it is too scary."  We did a
lot of our development work with the secret weapon because we didn't
have to pay attention to the "wedgies" - the preassigned time slices
for the low priority code.  It worked very nicely.  I heard that it
found its way into an electronic transmission controller, and I don't
know if the Delco guys ever managed to pry it out.  Hopefully things
have changed at Delco over the years.

(At GM, Delco supplies the ECM tools to the engine types, of which I
was one, and they develop with it.  The engine types give their
results to the Delco guys who sprinkle holy water on it and stick it
in a PROM.  I think the Delco people set policy on coding because they
ultimately had warranty responsibility for the ECMs).

So my question is this - do you diy types use multi-tasking, or are
you running the "big loop"?  In all of my more recent microcontroller
work I have used multi-tasking and planned on using it for redoing the
timing on my vehicle.  Why do I want to multi-task?  Because I want to
run some complicated floating point stuff in the background to update
tables!  By gum, these topics are tied together!  Any
thoughts/comments?

- Jim




More information about the Diy_efi mailing list