Hallo Mkteek,
du brauchst die LCD-Routinen (am Ende unterbringen!):
Code:
'----------------------------------------
'------------- LCD ROUTINES -------------
'----------------------------------------
#LCD_INIT
' alle ports 0
lcd_port = OFF
' 8-Bit-Modus aktivieren
lcd_param=&H38 : gosub LCD_WRITECMD
' mit 8-Bit-Command in 4-Bit-Modus umschalten
lcd_port=&B00000010
tog lcd_e
tog lcd_e
' ab jetzt 4-Bit-Modus
lcd_param = &H28 : gosub LCD_WRITECMD
lcd_param = &H0C : gosub LCD_WRITECMD
' Display loeschen
#LCD_CLS
lcd_param = &H02 : gosub LCD_WRITECMD
lcd_param = &H01 : gosub LCD_WRITECMD
return
' Zeilenwechsel
#LCD_GOTOLINE
if lcd_param = 1 then lcd_param = &H80
if lcd_param = 2 then lcd_param = &HC0
goto LCD_WRITECMD
' LCD-Kommando
#LCD_WRITECMD
lcd_buf = OFF
goto LCD_WRITE
' Zeichenausgabe
#LCD_WRITECHAR
lcd_buf = &B00100000
' Kommando oder Zeichen an Display senden
#LCD_WRITE
lcd_port = lcd_buf or (lcd_param shr 4) ' Hi-Nibble
tog lcd_e
tog lcd_e
lcd_port = lcd_buf or (lcd_param and &H0F) ' Lo-Nibble
tog lcd_e
tog lcd_e
return
... und kannst dann mit ...
Code:
lcd_param = 1 : gosub lcd_gotoline
lcd_param = &H20 : gosub lcd_writechar '
lcd_param = &H20 : gosub lcd_writechar '
lcd_param = &H20 : gosub lcd_writechar '
lcd_param = &H52 : gosub lcd_writechar 'R
lcd_param = &H4F : gosub lcd_writechar 'O
lcd_param = &H42 : gosub lcd_writechar 'B
lcd_param = &H42 : gosub lcd_writechar 'B
lcd_param = &H59 : gosub lcd_writechar 'Y
lcd_param = &H20 : gosub lcd_writechar '
lcd_param = &H52 : gosub lcd_writechar 'R
lcd_param = &H50 : gosub lcd_writechar 'P
lcd_param = &H35 : gosub lcd_writechar '5
... z.B. "ROBBY RP5" ausgeben.
Gruß Dirk
Lesezeichen