Manipulate specific bits of a port

Status
Not open for further replies.

SneaKSz

Member
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
 
The same way as you would with lesser chips, you read the port, AND or OR it accordingly, and write it back.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…