Thank you mpgMike,

so you convinced me to use an external real time clock. That needs an interrupt because the real time clock isnīt in sync with the pic s own clock.

I need to get 0.1 sec timing increments because 1 sec isnīt fine enough for starting time, max time is about 600 sec so I need a long variable to calculate with.

Hope i can work things out how to get the pic to use the real time clock but I guess there are lots of examples out there.

For explanation: we (my wife and I) drive so called Oldtimer-rallyes in a 1983 Mustang convertible and were on an event last weekend where we had to drive at an average speed of 28 km/h as constant as possible AND the starting point of the road was equipped with a clock and a light gate for the starting point. The end point of the distance was kept hidden so no one knew how long the distance was and so we couldnīt calculate anything. Only possible way was to drive as constant as possible with the given speed of 28 km/h. And to make things worse, there are heroes out there driving the distance
in 0,1 sec of the calculatet time . There were two of these hidden drives , the first we were 13 seconds off (which threw us out of the reach of a cup), the second we made it in 0,5 seconds of the sheduled time.
My wife wasnīt happy about driving home without a cup (first event this year we drove without cup so shes used to getting something and shes the driver) so my task is it to get something done to increase our chances next time.

Oh yeah the other guys use GPS and mobile phone apps and such.
I hope you appreciate that the old guy (54 years) tries to solve the problem with PIC Hardware/software.......haha


regards

Miguel David