Hello Guys !
I have a piece of code that is giving me some troubles when my program runs over several hours without stop.
Here goes what I´m doing :
Hour var Byte
Minutes var Byte
Seconds var Byte
Time var Word
TempA var word
Kilometers var word
Hundreds var word
Time = (3600 * Hours) + (60 * Minutes) + Seconds
TempA=(((Kilometers * 10) + Hundreds) * 3600)
VM=DIV32 (Time)
The problem is that the variable "Time" goes over 32767 after 9 hours (or so), and I have, frequently trips over 14 hours.
does some one have any idea o how to simplify the math ?
Thank you very much !
Sérgio Pinheiro