In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: I did some DEBUGing and found that it is NOT related to the INTERRUPT. I can comment out the INTERRUPT calling and still the TimeDate() does not update properly unless the SEROUT command is after the Start: label AND the Serial LCD is plugged in to the circuit. Obviously when the INTERRUPT calling is commented out, then the LED matrix does not turn on - so I can see the variables in the DEBUG statements below. I tested it with and with out the conditions of the SEROUT and LCD plugged in. I'm not sure where to go next. Here is the DEBUG statement's I used: [code] Start: ' PROBLEM HERE - MUST HAVE A SERIAL LCD CONNECTED FOR TIME / DATE TO UPDATE CORRECTLY. ' SEROUT command can be located pretty much anywhere's after the START: label. 'SEROUT DISPLAYComPort, DisplayBaud, 0 ' Set up TimeDate array (this initializes the time/date to 11:59:50 PM 12/31/07 Mon) TimeDate(Secs) = $50 TimeDate(Mins) = $59 TimeDate(Hrs) = $11 ' if modeFlag is set to Hr24, TimeDate(Hrs) = $00 to $23 otherwise $00 to $11 when Hr12 is set TimeDate(Date) = $31 TimeDate(Month) = $12 TimeDate(Day) = $01 TimeDate(Year) = $07 TimeDate(Ctrl) = $00 ampmFlag = PM ' if modeFlag is set to Hr12, ampmFlag is AM or PM modeFlag = Hr12 ' set to either modeFlag = Hr12 or Hr24 For Idx = 0 to MESSAGESIZE Message1(Idx) = " " Message2(Idx) = " " NEXT tmpB1(2) = 0 ' Scroll Direction SetMode SetTimeAndDate 'tmpB1(3)=0 Main: DO 'GetTimeAndDate 'IF TimeDate(Secs) <> tmpB1(3) THEN WriteTimeToLED WriteDateToLED J = TimeDate(Hrs) \ WATCH J, 8, uhex K = TimeDate(Mins) \ WATCH K, 8, uhex X = TimeDate(Secs) \ WATCH X, 8, uhex BREAK 'tmpB1(0) = 0 'tmpB1(1) = 2 tmpB1(0) = 0 StringWriter tmpB1(0) = 1 StringWriter 'ENDIF 'tmpB1(3)=TimeDate(Secs) LOOP END [/code] [code] ' ------------------------------------------------------------------------- 'INTERRUPT 1000 ' run every millisecond ' ------------------------------------------------------------------------- 'GOTO INT_HANDLER [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=183734#m183766 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)