Hallo,
könnte mir hier jemand weiter helfen:

Zeile 1 im LCD soll zählen auf/ab wenn Portc.5 nicht gedrückt ist
Zeile 2 im LCD soll zählen auf/ab wenn Portc.5 gedrückt ist

Gruß Webbylein


###################### BEGIN ###################
$regfile = "m8def.dat"
$crystal = 8000000
'------------------------------------------------------------------------------
$sim
'------------------------------------------------------------------------------
Cls
Cursor Off
'************************************************* *****************************
' display
Config Lcd = 20 * 2
Config Lcdpin = Pin , E = Portb.0 , Rs = Portb.1 , Db7 = Portb.5 , Db6 = Portb.4 , Db5 = Portb.3 , Db4 = Portb.2
'************************************************* *****************************

Dim T As Word
Dim T2 As Word
Config Pinc.5 = Input
Config Pinc.4 = Input
Config Pinc.3 = Input


Do

'########### 1. Zeile LCD ###############

If Pinc.4 = 0 Then
Waitms 800
If Portc.5 = 0 Then
If Pinc.4 = 0 Then
T = T + 1
End If
End If
End If

If Pinc.3 = 0 Then
Waitms 800
If Portc.5 = 0 Then
If Pinc.3 = 0 Then
T = T - 1
End If
End If
End If
'########### 2. Zeile LCD ###############


If Pinc.4 = 0 Then
Waitms 800
If Portc.5 = 1 Then
If Pinc.4 = 0 Then
T2 = T2 + 1
End If
End If
End If

If Pinc.3 = 0 Then
Waitms 800
If Portc.5 = 1 Then
If Pinc.3 = 0 Then
T2 = T2 - 1
End If
End If
End If

Locate 1 , 1
Lcd T ; " "

Locate 2 , 1
Lcd T2 ; " "



Loop
End
################ ENDE ######################