Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
btfsc save, 0
;Set flag1
btfsc save, 1
;Set flag2
;test both flags if none are set then its 00
;if flag 1 is set but flag2 isnt it was a 01
;if flag 1 isnt set and flag2 is then it is 10
;if both flags are set then it was 11
In my code example you have to use #define because sublw will only accept a literal (constant) and not a variable (GPR). To use a variable you would have to use subwf variable, W instead.Iis it better to define TestValue then to set it in cblock or do thay do the same thing I always just used define for like port pins
Then the code could be simplified to:If it's 01 then it will keep checking if becomes 00 it will it goto.