X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=common%2FOWPinInterrupt.s;h=00feec0f99f90ebcf286cf267cb4267d88b69eea;hp=b5b7b87d3cae315c59f680eeacd4545cb343b59f;hb=a8381e5cea363746ce596f2b57e3dbe13d0a15a6;hpb=a28cbb81b2a151999f75dae825107aaecae427a2 diff --git a/common/OWPinInterrupt.s b/common/OWPinInterrupt.s index b5b7b87..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 @@ -143,11 +146,11 @@ no_zerromaker: sts sendflag,r_sendflag sts bcount,r_bcount sts rwbyte,r_rwbyte - //cdb pop r_sendflag 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