so, ich hoffe nun stimmt es,
@patti16 du meinst wenn ich ein Display anschließe oder?
Code:'-------------------------------------------------------------- $regfile = "attiny2313.dat" ' $crystal = 1000000 'Quarz: 1,0 MHz '******** Deklarationen ******** Dim A As Word '******** Initialisierung ******** Config Int0 = Falling ' Enable Int0 Enable Interrupts On Int0 Taste0int Ddrb = &B11111111 ' port B als Ausgang Ddrd = &B0100000 ' pin D2 asl eingang Portd.2 = 1 ' interne pullup widerstände aktivieren '******** Hauptprogramm ******** Do If Pind.2 = 0 Then Portb = &B10000000 Wait 1 A = A + 1 If A > 1800 Then Portb = &B00000000 End If If A > 1770 Then Portb = &B11000000 Else Portb = &B10000000 End If Loop '******** Unterprogramme ******** Taste0int: A = 1 End







Zitieren

Lesezeichen