SneaKSz Member Aug 18, 2010 #1 Hello , I want to force specific bits of a port , now by doing bsf / bcf but in 1 time . eg : movlw b'101x001x' movwf PORTC I don't want to change the state of the PORTC.0 and PORTC.4! Is there a way to do this without bsf and bcf? Thanks
Hello , I want to force specific bits of a port , now by doing bsf / bcf but in 1 time . eg : movlw b'101x001x' movwf PORTC I don't want to change the state of the PORTC.0 and PORTC.4! Is there a way to do this without bsf and bcf? Thanks
Nigel Goodwin Super Moderator Most Helpful Member Aug 18, 2010 #2 The same way as you would with lesser chips, you read the port, AND or OR it accordingly, and write it back.
The same way as you would with lesser chips, you read the port, AND or OR it accordingly, and write it back.
bananasiong New Member Aug 18, 2010 #3 You use inclusive OR where bit 0 and bit 4 to zero. Then they won't be affected