mister_e...
It's not a pulsin problem, I am displaying rhigh and rlow on the LCD, and they are great... the number falls when the revs goes up, visa-versa... And in my first example the whole thing works perfectly... it's just that because of the division by 50, the result is a number like 56 at 1000rpm, and lower for higher rpm, and therefore poor resolution... Something like 200+rpm jump over around 4000rpm.
I don't need it to be spectacular, but I will change it when I learn more about timers and interrupts.
The issue I have is that my calculations on paper are right, but in the pic are just not working.
Also if I change the line "rpm = rhigh + rlow" ... to ... "rpm = rhigh * 2" ... or ... "rpm = rlow * 2" ... I get 1rpm when the engine is running, and 0rpm when the engine is not. That doesn't make any sense to me... As the result should be the same.
Also might add I'm using a 16F877A
Bookmarks