I am trying to use the external interupts on the duemilanove to increment variables to calculate the wheel RPM and engine RPM. I need to capture every pulse of both. the engine runs upto 14000 RPM so around 230 Hz and the wheel around 38. The problem im having is calculating the RPM's accuratly enough.
This is why I turned to the external interupts, using them as I am at the minute is leading to a very slugish system as im timing for a around 500ms on every loop of the main code which means the RMP's are calculated to slowly for the tachometer i've implimented and gear selection indicator also implimented.
My question: is there a way of using the sei and cli commands to turn only one interupt on at a time as then i can run the engine RPM capture say 5 times as the wheel caputure is running ones for 5 times as long in the background this would speed up the system and accuracy as the slower 38 Hz one would have five times longer to increment?
I can place my current code here but it is very long and sloppy, give me a shout if you want it...