Is it possible to XOR a single bit. In theory, this is what I want to do:
movlw b'00100000' ; moves bit configuration to register W
xorwf PORTB, f ; xor this value to toggle state of bit 5
call Delay
return
But I do not want to change the values of any other bits besides bit 5. The code above will change the other bits if the bits in PORTB are a 1 (in which some cases they will be).
I want to just single out bit 5 and XOR that to toggle the state. What is the function to do this?
movlw b'00100000' ; moves bit configuration to register W
xorwf PORTB, f ; xor this value to toggle state of bit 5
call Delay
return
But I do not want to change the values of any other bits besides bit 5. The code above will change the other bits if the bits in PORTB are a 1 (in which some cases they will be).
I want to just single out bit 5 and XOR that to toggle the state. What is the function to do this?