Hi,
Without thinking too much, how about this:/Henrik.Code:Hours VAR BYTE Minutes VAR BYTE Seconds VAR BYTE Hours = 1 Minutes = 1 Seconds = 0 Ticks = 100 ISR: Ticks = Ticks - 1 If Ticks = 0 THEN ' Ticks rolled over, one second has passed Ticks = 100 ' Reset ticks (10ms ticks) Seconds = Seconds - 1 ' Count down a second. If Seconds = 255 THEN ' Seconds rolled over Seconds = 59 ' Reset seconds Minutes = Minutes - 1 ' Count down a minute If Minutes = 255 THEN ' Minutes has rolled over Minutes = 59 ' Reset minutes Hour = Hour - 1 ' Count down an hour ENDIF ENDIF ENDIF




Bookmarks