pic micro - BSF\BCF

Status
Not open for further replies.

trennonix

New Member
hi,

the BSF and the BCF functions are supposed to set or clear a specific bit in a register, now this works fine for all registers except for ports

when i try to use it on ports, it seems to clear the whole register and then set or clear the specific bit.

Am I doing something wrong? Is there's a trick of somekind? Or should i just write my own function for that?

Thanks
 
It sounds like you are writing to a port that is configured as analogue. Which chip are you using? Do you turn off the analogue function CMCON=7 or ANSEL=0 etc.

Mike.
 
i'm using, for now, the pic12f675
i just tried clearing ANSEL, and still same result,
right now i'm testing my code in a simulator so i can monitor anything if i have to
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…