So vielleicht:

Code:
Ocr1a = Adc_wert * 40                   ' Timer setzen
If Ocr1a < Tcnt1 Then Tcnt1 = 0         ' Zählregister anpassen

Loop