View Single Post
  #5   Spotlight this post!  
Unread 07-10-2007, 20:01
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
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