Ha! That is exactly what I am doing.
At the moment I have two pics, one doing the counting and the other doing the working out of distance etc. I have two pics because I don't want to lose incoming pulses while the numbers are being worked on otherwise my distance total will under read. I was told that I should be able to do it with 1 pic using the timer working in the background.
I worry that I might lose pulses anyway when the timer is reset but since at 852 ms 1 pulse = 1 mile an hour then presumably at 20 mhz it shouldn't be a problem. (Hmmmn any comments on that?)
My other problem is that I understand that it takes a small amount of time to write to eeprom. I therefore only write the distance travelled to eeprom when the speed is 0 mph. trouble is I keep swithching off the ignition too quickly (clearly within 852 ms of stopping) and I lose the most recent trip. I need some form of back up power supply that can keep the pic going long enough to wrtie to its memory. (about 5 seconds?) I think in total I am drawing about 300 ma including the backlit LCD display. Any ideas on this?
Thanks.




Bookmarks