X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=common%2FOWTimerInterrupt.s;h=504a68bb8f43e7de510278da0798e54ac5bea053;hp=cd8af1c9f7508611748d2c8fee73a74b66ee1e1a;hb=a28cbb81b2a151999f75dae825107aaecae427a2;hpb=22f8e0389304cc3f78fec16d8ecc30069afe8584 diff --git a/common/OWTimerInterrupt.s b/common/OWTimerInterrupt.s index cd8af1c..504a68b 100644 --- a/common/OWTimerInterrupt.s +++ b/common/OWTimerInterrupt.s @@ -32,7 +32,7 @@ .global TIMER_INTERRUPT - TIMER_INTERRUPT: +TIMER_INTERRUPT: push r_temp in r_temp,_SFR_IO_ADDR(SREG) push r_temp @@ -40,12 +40,16 @@ rjmp tint_end ; Leitung 1 kein Reset ldi r_temp,0 out TCNT_REG,r_temp + CLEAR_TOV_FLAG tint_loop_rend: sbis OW_PIN,OW_PINN ;warten bis leitung wieder h rjmp tint_loop_rend + JMP_NO_TOV ;ueberspringe wenn kein ueberlauf + rjmp tint_overrun in r_temp,TCNT_REG ;schauen ob es lange genug gedauert hat fuer reset cpi r_temp,OWT_RESET2 brlo tint_end +tint_overrun: ldi r_temp,0 out TCNT_REG,r_temp ;zwischen Reset und Presets