12.07.2015 Views

Electromechanical Timer Replacement - 320Volt

Electromechanical Timer Replacement - 320Volt

Electromechanical Timer Replacement - 320Volt

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Electromechanical</strong> <strong>Timer</strong> <strong>Replacement</strong>call IsTgtZero ;is target timer = 0?SEQ ;goto seqEnd ;if not, go to seqEndclrf modest ;otherwise, move to mode state 0goto seqEnd ;go to seqEndOffDly2aOneShot0OneShot0aOneShot1ROneShot1decf modest ;move back to mode state 1goto seqEnd ;go to seqEndbcf flags,OUTON ;clear timer output on flagbtfsc flags,EDGON ;has an active edge been detected?goto OneShot0a ;if yes, go to OnDly0agoto seqEnd ;go to seqEndincf modest ;move to mode state 1call MoveP1ToTgt ;initialize target counter valuegoto seqEnd ;go to seqEndbsf flags,OUTON ;set timer output on flagcall IsTgtZero ;is target timer = 0?SEQ ;goto seqEnd ;if not, go to seqEndclrf modest ;otherwise, move to mode state 0goto seqEnd ;go to seqEndbsf flags,OUTON ;set timer output on flagbtfsc flags,EDGON ;have we been retriggered?goto ROneShot1a ;yes we have - go to ROneShot1acall IsTgtZero ;is target timer = 0?SEQ ;goto seqEnd ;if not, go to seqEndclrf modest ;otherwise, move to mode state 0goto seqEnd ;go to seqEndROneShot1acall MoveP1ToTgt ;initialize target counter valuegoto seqEnd ;go to seqEndAstable0Astable1Astable2bcf flags,OUTON ;clear timer output on flagincf modest ;move to mode state 1call MoveP1ToTgt ;initialize target counter valuegoto seqEnd ;go to seqEndbsf flags,OUTON ;set timer output on flagcall IsTgtZero ;is target timer = 0?SEQ ;goto seqEnd ;if not, go to seqEndincf modest ;otherwise, move to mode state 2call MoveP2ToTgt ;initialize target counter valuegoto seqEnd ;go to seqEndbcf flags,OUTON ;clear timer output on flagcall IsTgtZero ;is target timer = 0?SEQ ;goto seqEnd ;if not, go to seqEndmovlw 1 ;otherwise, movemovwf modest ; to mode state 0call MoveP1ToTgt ;initialize target counter valueDS40160A/1_005B-page 18© 1997 Microchip Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!