Peter,
The MIMA code determines vehicle speed in the getspeed routine.
you may find info there to help.
;************************************************* *********************
;The VSS pulse rising edge generates an interupt(int2) timer1 is started in the ISR,
;on the next pulse ISR, the counter is stopped, the count transfered to VSSHI,VSSLO, the
;counter is cleared and restarted.
;clock = 625,000/sec
;clock/10/count/10= frequency of pulses in HZ
;the frequency of the VSS pulses in HZis nearly the same as the actual MPG.(close enough for now)
;Need to finish the MPH scale on the low end.
;************************************************* *********************
on what signal was the output based? four-pulse or two-pulse? i was trying to get the same results on my abs speed sensor but the figures are way too distant.
Last edited by archebald23; 08-16-2010 at 09:55 PM.
The VSS sensor gives 4550 pulses per mile. (Not sure where the 4550 came from?)
That's 75.83 pulses per second at 60mph.
My pic counter has a resolution of 0.000005 seconds or 5us
One VSS pulse at 60 mph is 2637 counts long.
One VSS pulse at 30 mph is 5274 counts long
One VSS pulse at 15 mph is 10548 counts long
How do I get from the Count figure to speed in mph?
Count (per pulse) multiplied by 0.000005s to get total duration of one pulse. Multiply by 4550 to get the total time in seconds at the current speed to travel one mile. That's in seconds per mile so the inverse is miles per second, then multiply by the conversion factor of 3600 seconds per hour.
Last edited by Right Lane Cruiser; 05-16-2011 at 11:08 PM.
The AutoGuide.com network consists of the largest network of enthusiast-owned enthusiast-operated automotive communities.
AutoGuide.com provides the latest car reviews, auto show coverage, new car prices, and automotive news. The AutoGuide network operates more than 100 automotive forums where our users consult peers for shopping information and advice, and share opinions as a community.