Hallo! Ich habe ein Problem mit der Programmierung! Wenn ich Pind.0 und Pind.1 "Taste" geht die LED nicht an. Der Chip hat an Pind.0 und Pind.1 den RXD und TXD eingange.... Kann das damit was zu tun haben? Ich programmiere den Chip in BASCOM über ISP! Wo kann das Problem liegen? Hier der Code: $regfile "8515def.dat" $crystal = 3000000 Config Portb = Output Config Portd = Input 'Inverslogik erstellen STK500 LED's If Pinb.0 = 0 Then Portb.0 = 1 If Pinb.1 = 0 Then Portb.1 = 1 If Pinb.2 = 0 Then Portb.2 = 1 If Pinb.3 = 0 Then Portb.3 = 1 If Pinb.4 = 0 Then Portb.4 = 1 If Pinb.5 = 0 Then Portb.5 = 1 If Pinb.6 = 0 Then Portb.6 = 1 If Pinb.7 = 0 Then Portb.7 = 1 '--------------------------------------------- ' Taster Do If Pind.0 = 0 Then Portb.0 = 0 Else Portb.0 = 1 'xxx If Pind.1 = 0 Then Portb.1 = 0 Else Portb.1 = 1 'xxx If Pind.2 = 0 Then Portb.2 = 0 Else Portb.2 = 1 If Pind.3 = 0 Then Portb.3 = 0 Else Portb.3 = 1 If Pind.4 = 0 Then Portb.4 = 0 Else Portb.4 = 1 If Pind.5 = 0 Then Portb.5 = 0 Else Portb.5 = 1 If Pind.6 = 0 Then Portb.6 = 0 Else Portb.6 = 1 If Pind.7 = 0 Then Portb.7 = 0 Else Portb.7 = 1 Loop End Gruß, Stephan
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.