So gehts, sorry war vorher einiges falsch weil ich wie gesagt die Bascom Syntax net (gut) kann..Code:$regfile = "m32def.dat" $framesize = 32 $swstack = 32 $hwstack = 32 Dim I As Integer Dim taste_gedrueckt As Integer taste_gedrueckt = 0 Config Portc.2 = Input Config Timer0 = Timer, Prescale = 1024 On Timer0 Timer_irq Const Timervorgabe = 100 Enable Timer0 Enable Interrupts Do If Portc.2 = 1 Then If taste_gedrueckt = 0 Then taste_gedrueckt = 1 If taste_gedrueckt = 1 Then taste_gedrueckt = 0 End If Waitms 1 Loop Timer_irq: Timer0 = Timervorgabe If I = 30000 Then taste_gedrueckt = 0 I = 0 Elseif taste_gedrueckt = 1 Then Incr I End If Return
Lesezeichen