Hi,
Lets say the number of message to be displayed comes in and gets stored in a variable called message.
Code:
Select Case Message
Case 1
LCDOUT $FE, 1, "This is message 1"
Case 2
LCDOUT $FE, 1, "This is message 2"
Case 3
LCDOUT $FE, 1, "This is message 3"
Case Else
LCDOUT $FE, 1, "Unknown message"
End Select
Here the strings are stored in program flash (where else should it go?) and written to the LCD when the LCDOUT statement executes. It's not the most efficient way of doing it but it's probably the easiest. If the messages are partly "the same" (like in the above example) you can have subroutines to print just that part which you then GOSUB from within the Case section, that will save on flash since you don't have to store the same string ("This is message") more than one time
Code:
Case 1
GOSUB FirstPart
LCDOUT $Fe, 1, "1"
...
...
End Select
...
FirstPart:
LCDOUT $FE, 1, "This is message "
RETURN
/Henrik.
Bookmarks