Ich hätte es so gemacht, da ich mit dem Debounce Befehl auf Kriegsfuß stehe... Ich entprelle Hardwareseitig...
Die 2 StoppBits und die Polarität sind korrekt?Code:$regfile = "attiny2313.dat" $crystal = 4000000 $baud = 9600 Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 2 , Databits = 8 , Clockpol = 1 $hwstack = 32 $swstack = 10 $framesize = 40 Ddrd = &B01110010 Ddrb = &B11111100 Dim Vari As Byte Tast1alt Alias Vari.0 Tast2alt Alias Vari.1 Tast1 Alias Pinb.0 Tast2 Alias Pinb.1 Portd = 0 Portb = 0 Do If Tast1 = 1 Then If Tast1alt = 0 Then Set Tast1alt Gosub Step 100 End If Else Reset Tast1alt End If If Tast2 = 1 Then If Tast2alt = 0 Then Set Tast2alt Gosub Step 100 End If Else Reset Tast2alt End If Loop End Step100: Printbin 100 ; 100 ; 100 Waitms 1 Return Step200: Printbin 100 ; 110 ; 110 Waitms 1 Return







Zitieren

Lesezeichen