Ich hätte wieder mal eine Frage, weil wieder mal was nicht funktioniert... Ich möchte dem mcontroller eingaben geben und je nachdem eine Led schneller und langsamer blinken lassen.
Ich lege an Pin4 gnd und pin8 5v Spannung vom Netzgerät an. die Led geht von Pin5 nach gnd. Dann habe ich noch eine Ader von pin8 nach pin6 (portb.1) und mit einem widerstand von 1kohm nach gnd, die ich je nachdem öffne und schließe... Wahrscheinlich ist die schaltung blödsinn aber mir fällt es nicht besser ein. Kann mir da nochmal jemand helfen?Code:$regfile = "attiny13.dat" $crystal = 1200000 $hwstack = 22 Config Portb.0 = Output Config Portb.1 = Input Enable Interrupts Do If Portb.1 = 0 Then Waitms 1000 Portb.0 = 1 Waitms 1000 Portb.0 = 0 End If If Portb.1 = 1 Then Portb.0 = 1 Waitms 200 Portb.0 = 0 Waitms 200 End If Loop End
Vielen Dank
lg
Wolfgang







Zitieren

Lesezeichen