This is the current Display Code...
You could completely rehash it, or simply tack-on the math and display like so (assuming a 2-lince LCD screen)...Code:DisplayLoop: If ButStart=0 then RunningFlag=1 If ButStop=0 then RunningFlag=0 LCDOut $FE,$80,DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds,".",DEC2 Hundredths If OverflowError=1 then If Seconds.0=1 then LCDOut $FE,$8C,"ERR" else LCDOut $FE,$8C," " endif endif If RunningFlag=1 then goto DisplayLoop If ButReset=1 then goto DisplayLoop Disable
that way you get the elapsed Time ticking, with the mph only being displayed (to one decimal place per my above example) after the clock has stopped.Code:DisplayLoop: If ButStart=0 then RunningFlag=1 If ButStop=0 then RunningFlag=0 LCDOut $FE,$80,DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds,".",DEC2 Hundredths If OverflowError=1 then If Seconds.0=1 then LCDOut $FE,$8C,"ERR" else LCDOut $FE,$8C," " endif endif If RunningFlag=1 then goto DisplayLoop ' *** perform math here - assume resultant variable mph is in tenths of mile/hour LCDOut $FE,$C0,#mph DIG 2,#mph DIG 1,".",#mph DIG 0," mph " If ButReset=1 then goto DisplayLoop Disable




Bookmarks