X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=common%2FOWTimerInterrupt.s;h=a23009e9aa5f9cdd7cb71fd342305c278df119be;hp=cd8af1c9f7508611748d2c8fee73a74b66ee1e1a;hb=eb07c81c36a283327b156eeee4d3d5030a4ed75f;hpb=22f8e0389304cc3f78fec16d8ecc30069afe8584 diff --git a/common/OWTimerInterrupt.s b/common/OWTimerInterrupt.s index cd8af1c..a23009e 100644 --- a/common/OWTimerInterrupt.s +++ b/common/OWTimerInterrupt.s @@ -32,20 +32,26 @@ .global TIMER_INTERRUPT - TIMER_INTERRUPT: +TIMER_INTERRUPT: + sdb push r_temp in r_temp,_SFR_IO_ADDR(SREG) push r_temp + cdb sbic OW_PIN,OW_PINN ; abkuerzung wenn Leitung schon h 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