Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/31/00 11:23
Read: times


 
#7622 - rev-counter
Losing sleep and running out of coffee
I have been solving most of my problems reading this message board and have had some fun late night thanks.
I have not however been able to solve my latest problem and cannot find any information on it, my be I am not sure what it is I am looking for.
I have written some code for a rev counter.
At the moment I am displaying the timer contents in decimal and that part is working fine.
So 0 to 65535 is what I am displaying and I can relate this back to frequency
Timer value equals lets say 3295 dec. my crystal is 6mhz

RPM = 3295 x .000002
=.00659
=60 .00659 DIVIDIDE ONE MINUTE
RPM = 9104 this is what I want to display
I think this part is ok I also divide the rpm by two for the four stock four-cylinder engines.
My problem is I am not sure how to go about this. I have tried to do this in hex but do not know what to do with the remainder left over from the divide etc witch I need to include to make it accurate enough.
I though I might try to do I with some sort of look up table but not sure if this is the way to go or how to go about it.
Any push in the right direction would be a great help.
Do I need to try a bit harder with the maths in hex to divide the remainder to get the decimal place etc?(not sure how)
Thanks again for the help


List of 19 messages in thread
TopicAuthorDate
rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      
RE: rev-counter            01/01/70 00:00      

Back to Subject List