Has anyone got an AVR to sync up with a 60-2 bosch crank angle sensor?
I'm currently writing some code at the moment to do this, and just wondered if anyone else had done it?
I will be wanting to fire injectors for a specific time, at a certain time, with information from the crank angle sensor giving me revs + crank angle obviously.
Should be doing ignition timing aswell, but injectors first...
I have t/Counter 0 setup to count from an external trigger. This is tied to the crank angle output (it has been schmitt triggered, etc.)
This keeps track of teeth. I have input capture enabled in timer/counter1, which is free running at 2MHz, so ICR always holds the count of the last teeth.
A few other things for syncing with the missing teeth, but nothing major, so most of the work is done by the timers, rather than any code.
Trouble is, I now only have one timer left (T2) I will have to use this as a free running, called every uS or so timer that deals with all the engine events (inj + ign)
wish there were more timers on the AVR! :(