Hi Art,
IF that is what is happening then here's an idea which may or may not work for you....
Code:
RefreshLCD VAR BIT
UpdatingLCD VAR BIT
Main:
If RefreshLCD THEN ' LCDOUT was interrupted
GOSUB WriteLCD ' Redo the screen
RefreshLCD = 0 ' Clear flag
ENDIF
'And all the other stuff
Goto Main
WriteToLCD:
UpdatingLCD = 1
LCDOUT.....
UpdatingLCD = 0
RETURN
ISR:
IF UpdatingLCD = 1 THEN ' LCDOUT statement was interrupted..
RefreshLCD = 1 ' Signal main routine to refresh the screen
ENDIF
' And all the other stuff
@ INT_RETURN
With that said I'm bit surprised you get garbage on the screen. I didn't think the display would notice if a command or data transaction took longer than specified in the datasheet as long as the signals aren't touched by the ISR. Are you sharing any pins that the ISR may flip?
/Henrik.
Bookmarks