The attached program ( 18F452 @ 4 Mhz ) / PbP 2.47 / MPLAB 7.61a is a RPM counter for 4 Stroke 1 cyl engines ...
Based on Period Measuring ( w/ TMR3 ) and DT instant interrupts.
What goes wrong is the DIV32 calculation ... I've verified everything before: period is good, period measurement is right , Stable, and all data furnished to DIV 32 are "legal" ...
But result is quite FALSE !!!
The worse thing is I have successfully used DIV32 very often !!!
Placing DIV32 outside the interrupt stubb gives the same results, even when cancelling interrupts while Dummy and DIV calculating ...
I'm certainly missing something ... but what ???
Thanks to our gurus
Alain
PS for DARREL: All other parts of the lawn tractor computer work well ... just missing this part !!! Grrrrrr !!!
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks