Flywheel/Encoder patterns

Mazda Ebrahimi kleenair at ix.netcom.com
Sat Dec 7 02:21:13 GMT 1996


>         Yes, going sequential will definately help out that problem, the stuff
> I was referring to was group fire and fired every TDC.
>         The only other problem I can see is unless your running a very fast
> clock, you'll run out of interrupt time at high rpm.  The Porsche's with
> 129 teeth have a practical limit between 8000 and 8500 rpm's where with
> more teeth that will drop to 5733-6091 rpm's.  But again we were using
> an 8051 with a 6mhz clock, but doubling the clock rate you could
> effectively have a 10,000 rpm setup.
>         Something to look for further down the road.  Porsche's setup also had
> a map that corrected for timing vs rpm, I'd assume this would be because
> of interrupt latency.  You'll have a similar problem to deal with,
> should be easy enough to correct though.
>         Be careful that your interrupts are extremely short, otherwise your
> program will just stay there and never do any code work.  Your registers
> will have to be saved, or just make sure you deal with a different set
> all together.  You'll also have to watch out for variable loading.
> After your calc's are done, you'll want to load your variables into the
> ones you'll use in your interrupts, if you don't cancel all the
> interrupts, you can be half done and load in some very strange values.
> Either cancel your interrupts, or set a check bit to make sure your not
> doing that.
> 
> Todd Knighton
> Protomotive Engineering


As soon as I get a little more involved in actual programming, I'll come up with a lot 
of questions for you.  Regarding the length of the interrupts, this is the way I'm 
planning things right now:  I'll be running a foreground loop with no time driven tasks, 
which constantly calculates fuel and spark values based on latest readings.  The result 
of the most recent completed calculations are four numbers: inj_delay, inj_ontime, 
ign_delay, ign_ontime (dwell).  When an interrupt is generated, the following happens:
	-advance degree count,
	-check for reference count (i.e. at this degree count, do I have to load any 
counters?  This only happens 8 times a rotation (v8)).
	-if reference is reached, load decoder with external counter value;
	-return
this is in addition to calculating RPM.

I'm running a 16 bit 32 MHz processor.



More information about the Diy_efi mailing list