X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=common%2FOWPinInterrupt.s;h=00feec0f99f90ebcf286cf267cb4267d88b69eea;hp=660c7f39f43f0d49fc113b01489af1739f9060f8;hb=a8381e5cea363746ce596f2b57e3dbe13d0a15a6;hpb=22f8e0389304cc3f78fec16d8ecc30069afe8584 diff --git a/common/OWPinInterrupt.s b/common/OWPinInterrupt.s index 660c7f3..00feec0 100644 --- a/common/OWPinInterrupt.s +++ b/common/OWPinInterrupt.s @@ -43,6 +43,7 @@ PIN_INTERRIPT: ;Weitere Register sichern push r_temp2 push r_temp + sdb ; Wegen Power Down Mode Widerherstellen der fallenden Flanke und disable von POWER DONW SET_FALLING_RESET_SLEEP push r_bcount @@ -117,16 +118,18 @@ zeropolling: sbic OW_PIN,OW_PINN ;warten bis leitung wieder h rjmp zeropolling_wait ;leitung ist low ->Schleie in r_temp,TCNT_REG - cpi r_temp,(~OWT_MIN_RESET)+50;aller zwei us zaehlt der timer + cpi r_temp,(~OWT_MIN_RESET)+OWT_ZP_WAIT_LOW_TO;aller zwei us zaehlt der timer brsh zeropolling_timeout ;Timeout Reset? rjmp zeropolling zeropolling_wait: sbis OW_PIN,OW_PINN ;warten bis leitung wieder l rjmp zeropolling_low_imp ;Leitung ist low raus aus schleufe in r_temp,TCNT_REG - cpi r_temp,(~OWT_MIN_RESET)+70 ;aller zwei us zaehlt der timer - brsh zeropolling_timeout ;Timeout - rjmp zeropolling_wait + cpi r_temp,(~OWT_MIN_RESET)+OWT_ZP_WAIT_HIGH_TO ;aller zwei us zaehlt der timer + sbis OW_PIN,OW_PINN ;noch eine Abfrage, da sonst schleife zu lang (sbis aendert keine flags) + rjmp zeropolling_low_imp ;Leitung ist low raus aus schleufe + brlo zeropolling_wait + rjmp zeropolling_timeout zeropolling_low_imp: sbi OW_DDR,OW_PINN RESETZEROMARKER @@ -147,6 +150,7 @@ no_zerromaker: pop r_rwbyte pop r_bcount pop r_temp + cdb cbi OW_DDR,OW_PINN ;vorsichtsmassname Nicht dauerhaft auf low pop r_temp2 //; die benutzten Register wiederherstellen out _SFR_IO_ADDR(SREG),r_temp2