plz help me with this code

Status
Not open for further replies.

b0rna

New Member
hello, im having much trouble figuring out how to program a key. i need fo this code to do: if key on pin a0 is pressed, then go to this part of the program

does anyone have a simple way of coding a button with if then statement? thank you
 
Code:
test
      bcf        portb
      btfss    porta,0
      goto     test
      call       ledtest

ledtest
      movlw   0x01
      movwf   portb
       return
      end

dood this will work fine
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…