Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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 :confused:

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top