Controller Questions

Stuart Baly S.Baly at BoM.GOV.AU
Thu Aug 14 01:42:16 GMT 1997


Tom & Jason wrote:

>>1.  If you had to pick a controller to learn on, which one would it
>>be?

There are two major controller families - the 8051 series and the 
Motorola 68705 series. I haven't had any experience with the 68705, 
but the 8051 is a good one. It's instruction set can give you the 
irrits sometimes, but there's a huge range of variants available for 
almost any purpose, ranging from the $10 bare bones jobby upwards. 

>>2.  (After I have learned a bit more)  If you had to pick a
>>controller to monitor temperature and pressure, and vary an ignition
>>and a fuel injection firing pattern at the same time, which
>>controller would you use?  Do you use multiple controllers for all
>>these tasks, or is your code multi-threaded?  Or, are these
>>.microcontrollers so fast that the interference with the firing
>>sequences is negligible?


> - regarding your multiple controller question, I'd say there's
>two schools
> 1 - let the (main) controller do everything
> 2 - have high-level hardware ("controllers") take over the repetitive
>or easily defined tasks (like a controller for disk I/O or for
>keyboard, etc)
>
>WRT (1) above, the disadvantage to that is what you've already
>said -- you can get into tight timing constraints and develop
>severe indigestion and/or migraines trying to manage all the
>interrupt processing you'll be doing.  The processor can
>be used to scan a keyboard, light pixels on a screen, act as
>a timer, run the A-D convertor (control the integrator switches,
>count the discharge time, etc), but I doubt very many still do
>that, so the question is how far to take the external control
>concept.

As mentioned a couple of days ago, I'm building up an 80552 (8051 
variant). This has a timer with capture and compare registers, which 
can be used to set and clear various outputs (put another way, open 
and close injectors). Basically one compare register will open the 
injectors, another will close them. This is all interrupt driven, so 
it takes processor time, but the way these registers work allows the 
processor to work one step ahead, which takes a lot of the time 
constraints away. The 68332 (check out the EFI332 page for info) 
takes this all a step further - more like Tom's #2 option.

>WRT (2), it costs a little more to buy the extra chips to
>control the various functions -- it also locks you into doing
>the control a certain way -- can't rewrite code to change it,
>have to redesign a PCB.  The obvious advantages are that the
>coding becomes easier with less concern for timing (note that
>I said that I've not done any coding for efi, so someone else
>will have to tell you just how much of a problem the timing
>is -- my last *real* programming was on the 8085 and Z80).

Note that I haven't got this 80552 thing built yet, so I'm talking 
through my hat to a certain extent, but I've tried writing some dummy 
interrupt handlers etc. to check out timing constraints and I reckon 
that with a 16MHz clock speed, each injector opening or closing, or 
coil turn on or off will take about 300 microseconds. For a four 
cylinder engine with two coils, that's eight events per revolution, 
so at 12000 rpm, about 50% of the processor's time will be taken up.
The biggest part of the processors time will be taken up with doing 
the integer divisions associated with table lookups.

A final point about timing - the Bosch Motronic ECU uses an 8051 
variant without capture and compare registers, running at (I think) 6
MHz, so your average 12MHz 8051 single board computer as available 
from many places should be plenty fast enough.

Stuart "12000rpm in a Datsun?" Baly
===========================================
Stuart Baly (s.baly at bom.gov.au)
Technical Officer
Cape Grim Baseline Air Pollution Station
Cape Grim, Tasmania, Australia
===========================================



More information about the Diy_efi mailing list