$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 14745600
$baud = 9600


Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.4 , Db6 = Portc.5 , Db7 = Portc.6 , E = Portc.2 , Rs = Portc.0


Dim B1 As Byte

Config Portc.0 = Output
Config Portc.1 = Output

Led1 Alias Portc.0 'Port A0 für LED1
Led2 Alias Portc.1 'Port A1 für LED2


Do
B1 = Inkey() 'first UART


If B1 <> 0 Then

If B1 = 65 Then
Set Led1 'A LED1 an
Cls
Locate 1 , 1
Lcd "LED A"
end if
If B1 = 66 Then
Set Led2 'B LED2 an
Cls
Locate 1 , 1
Lcd "LED B"
end if
If B1 = 67 Then 'C beide aus
Reset Led1
Reset Led2
Cls
Locate 1 , 1
Lcd "LED aus"

End If
end if

Loop
end