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.
Using assembly for PIC16F690, is it possible to move a single bit from one register into another withour effecting the other bits? I am attempting to use a shadow register with PORTA,5 to toggle an led without effecting PORTA <4:0>.
;
movf PORTA,W ; use WREG as a port shadow
iorlw b'00010000' ; set RA4 shadow unconditionally
btfss <portx>,<bit#> ; is source bit a '1'? yes, skip, else
xorlw b'00010000' ; clear the RA4 shadow bit
movwf PORTA ; update PORTA from shadow