PDA

View Full Version : Speedometer and Odometer



mdaweb
- 6th October 2005, 22:12
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

Darrel Taylor
- 6th October 2005, 22:40
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>

mdaweb
- 7th October 2005, 13:33
Thank you very much Darrel Taylor !

I will Download elapsed_timer_demo.zip and read it carefully.

thank you for your help!

MDAWEB