Noch eine dämliche Frage?
Warum wird mir am LCD nichts angezeigt, wenn ich eine Taste drücke?
Unten bei LCD Eingang
oder LCD PortD
Müßte da nicht eine 2 kommen, wenn ich die Taste 1 betätige?


$regfile = "8515def.dat"
$crystal = 4000000
Config Lcd = 20 * 4
Config Lcdmode = Port
Config Lcdbus = 4
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6
Config Lcdpin = Pin , Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2
Baud = 9600

'--- Definitionen
Dim A As Byte
Dim B As Byte
Dim C As Byte
Dim Eingang As Byte

'-- PortD.0 bis PortD.7 als Input (Taste 0...7) konfigurieren
Config Portd = Input
Config Portb = Output

'-- Alle Leds ausschalten. Wegen pullup ist 0= eingeschaltet
Set Portb.0
Set Portb.1
Set Portb.2
Set Portb.3
Set Portb.4
Set Portb.5
Set Portb.6
Set Portb.7
Cls


Main:

Do
A = 10 And 2 'Ergebnis 2
B = 10 Or 2 'Ergebnis 10
C = 10 Xor 2 'Ergebnis 8

Cls
Locate 1 , 1
Lcd A
Waitms 500

Locate 2 , 1
Lcd B
Waitms 500

Locate 3 , 1
Lcd C
Waitms 500

' keine Anzeige wenn eine Taste gedrückt wird? Warum?

Eingang = Portd
Locate 4 , 1
Lcd Eingang
Lcd Portd

Wait 3
Loop
End