|
Re: PIC bsf instruction
One other note: bsf and bcf are read-modify-write instructions. The pins of the port are read, the pin you specify in the instruction is modified, and then all the pins are written out. If a pin is allowed to drive it to what you set (a legal high or low), its fine. If the pin was driving a load which kept it from going to a high enough voltage to be a high level, it would be written back to a low.
The Pic18 series parts have output latch registeres, so this is not a probem with them. For the 10, 12, and 16 series parts, you need to be aware of it.
Brian
__________________
Brian K
Team 1225 Robotics Mentor
|