> Michael Rigby-Jones wrote:
> The trouble with the
> software only approach is that you have to complete all calculations
> and keep a pretty accurate counter in between firing cycles.
Not neccessarily.
The last software I wrote precalculated a set of variables and these are
used at run time - virtually no math while running. The data is then
available exactly when needed. As I mentioned earlier, I can keep track
of RPM, pos or neg advance, vac adv, dwell and rev limit in about 50
instructions. That is about 25uS @ 8MHz, but it still becomes an issue
at high RPM.
That's pretty good actually. I had a look at your code on your web page a while back and IIRC the program loop took 100us which gave pretty course resolution at higher RPM. I guess you've optimised that a fair bit!
So if I understand you correctly, you don't store a table of advance angle values in degrees, but store a table of time values, avoiding the need to perform angle/time conversions? Did you consider using the compare/capture units of a higher end PIC instead of a purely software solution? What would be nice is to have some way of modifying timing values in real time for setting up on a dyno or rolling road.
Regards
Mike