Dim Fstart As Integer 'STARTFREQUENZ Dim Fmax As Integer 'MAX FREQUENZ Dim Fq As Long 'Quearzfrequenz Dim Trampe As Long 'DAUER DER RAMPE IN TIMERTIKS Dim Ddelay As Long 'TIMER VERT 65536-DMERK Dim Fre As Single 'FREQUENZ Dim Bemerker As Integer 'BERECHNUNGSMERKER Dim Tactual As Long 'AKTUELLE ZEIT SEIT START IN TIMERTIKS Tactual = 0 Timer1_irq: Fstart = 4 ' MIN 4HZ Fmax = 300 Fq = 16000000 Trampe = 2000 Trampe = Trampe * 14285 If Trampe > Tactual Then Bemerker = Fmax - Fstart Fre = Tactual / Trampe Fre = Fre * Bemerker Fre = Fstart + Fre Fre = Fq / Fre Tactual = Tactual + Ddelay If Fre >= 4 Then Tccr0 = 64 Fre = Fre / 64 End If If Fre >= 31 Then Tccr0 = 8 Fre = Fre / 8 End If If Fre >= 245 Then Tccr0 = 1 End If Ddelay = Round(fre) Timer1 = 65536 - Ddelay End If ' Print Ddelay Gosub Xy 'gibt die takt aus nach bresenham Return