Gast
#694168
Hallo Leute, ich bin Neuling im Bereich AVR Programmierung und habe folgendes Problem. Wie in dem Schaltplan zu sehen ist, habe ich eine ATMEGA32 beschaltet. Mein Bascom Source : $regfile = "m32def.dat" $crystal = 4000000 $baud = 19200 $hwstack = 32 $swstack = 10 $framesize = 40 Mcusr = &H80 'disable JTAG Mcusr = &H80 'disable JTAG Config Porta = Input 'Configure Port A as Input Config Portb = Output 'Configure Port B as Output Dim Status As Bit Do If Pina.0 = 1 Then Status = 1 End If If Pina.1 = 1 Then Status = 0 End If If Status = 1 Then Portb.0 = 1 End If If Status = 0 Then Portb.0 = 0 End If Loop End Mein Problem ist nun, dass sich die LED nicht ein und Ausschalten lässt. Ein festhalten der Taster bringt auch nix. Habe ich nun nen Denkfehler, ist meine Schaltung Falsch oder liegts am Code ? Grüße Mark
