tm3d
/
owSlave2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle Overflow of Timer by Reset dedection (Problem was wenn Reset comes verry soon...
[owSlave2.git]
/
common
/
OWTimerInterrupt.s
diff --git
a/common/OWTimerInterrupt.s
b/common/OWTimerInterrupt.s
index
cd8af1c
..
504a68b
100644
(file)
--- a/
common/OWTimerInterrupt.s
+++ b/
common/OWTimerInterrupt.s
@@
-32,7
+32,7
@@
.global TIMER_INTERRUPT
.global TIMER_INTERRUPT
-
TIMER_INTERRUPT:
+TIMER_INTERRUPT:
push r_temp
in r_temp,_SFR_IO_ADDR(SREG)
push r_temp
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
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
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
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
ldi r_temp,0
out TCNT_REG,r_temp
;zwischen Reset und Presets