-
Speedometer and Odometer
Hi Friends,
I´m a beginner on PicBasic development, and I want to
build a speedometer / hodometer for my Opel Astra.
I´m using a 16F628 and a LCD (2x16) and a 4Mhz crystal
I Want to keep a cronograph on the LCD´s first line and
show the speed / distance on the second line.
My doubt is : how can I keep counting the time for the
cronograph and keep counting the pulses to calculate the
speed and the distance ?
Are Interrupts the solution ?
If yes, how can I calculate the timming ?
does anybody know if there´s some sample similar ?
ps. Exscuse-me for my bad english...
thanks in advance.
MDAWEB
-
Sounds like pretty good english to me.
Here's an easy way to count the Time.
Elapsed Timer Demo
http://www.picbasic.co.uk/forum/showthread.php?t=190
Then you can count the speed pulses with TMR0 using the T0CKI input. No interrupts required there, just polling.
<br>
-
Thank you very much Darrel Taylor !
I will Download elapsed_timer_demo.zip and read it carefully.
thank you for your help!
MDAWEB