
Originally Posted by
Darrel Taylor
You shouldn't need to turn the timer off. And doing so will affect the accuracy of the Elapsed Timer.
Yes, expected the inaccuracy. As our process is finished in ~10 hours this inaccuracy is no issue.
We are seeing with this code irregular values in the first line and no issues in the second line. The interrupts are interfering with the arraywrite instruction.
It's never that anything is printed beyond the 10th char but that random characters are printed anywhere in the digits, all zeroes and non-numbers are also seen.
Code:
'Code is licensed as http://creativecommons.org/licenses/by-sa/3.0/de/
'(c) 2010 Ing Buero A. Czech
DEFINE DEBUG_MODE 1 'Auf 1 setzen, wenn keine Debuggen notwendig
DEFINE DEBUGIN_MODE 1
INCLUDE "BS1DEFS.bas"
INCLUDE "EBS18F2423.pbp"
INCLUDE "EBSMasterKonf.pbp"
INCLUDE "EBSMasterVar.pbp"
INCLUDE "Elapsed-18.pbp"
INCLUDE "LCDAusgabe.pbp"
'===============================================================================
'VP: LCD Initialisierung
'===============================================================================
GOSUB EBSLCDINIT
LCDTextAnz = 16
GOSUB ResetTime
GOSUB StartTimer
DebugLoop:
GOSUB EBSLCDZeile1
ARRAYWRITE LCDText, [DEC10 LCDTextAnz, REP 32\11]
GOSUB EBSLCDTEXTOUT
T1CON.0 = 0 ; Turn OFF Timer1
ARRAYWRITE LCDText,[DEC2 days, "+", DEC2 Hours, ":", DEC2 Minutes, ":", DEC2 seconds, REP 32\11]
T1CON.0 = 1 ; Turn OFF Timer1
GOSUB EBSLCDZeile2
GOSUB EBSLCDTEXTOUT
PAUSE 200
Bookmarks