RCU Forums - View Single Post - CDI gr8flyer55
View Single Post
Old 09-19-2012 | 10:03 PM
  #348  
nyemi
Senior Member
 
Joined: Feb 2010
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
From: szarvas, HUNGARY
Default RE: CDI gr8flyer55

Hi Jake
<span lang="en" id="result_box" class="short_text"><span class="hps">I</span> <span class="hps">assembler</span><span>:</span> <span class="hps">routine</span> <span class="hps">handles</span> <span class="hps">the</span> <span class="hps">Hall</span> <span class="hps">inputs.</span></span>
<span lang="en" id="result_box" class="short_text"><span class="hps">This</span> <span class="hps">bounce-free</span> <span class="hps">input.</span></span>



Label_0003 BTFSC GPIO ,GP2 ;BTFSC = wait for high pulse on Hall switch (-_+).
GOTO Label_0002 ;BTFSS = wait for low pulse on Hall switch (+_-) Alterable!!
MOVLW 0x01 ;Hall input configuration (GP2)
MOVWF 0x24 ;<span id="result_box" class="short_text"><span style="background-color: rgb(255, 255, 255);" title="Seg&eacute;d regiszter.">Auxiliary registers=0x24</span></span>
GOTO Label_0003
Label_0002 MOVF 0x24 , F
BTFSC STATUS , Z
GOTO Label_0003
CLRF 0x24
<span lang="en" id="result_box" class="short_text"><span class="hps">Continue</span> <span class="hps">program execution</span><span>.</span></span>