Bob Ammerman wrote: > > Actually, his code compiles to bcf and bsf instructions, too, which >> are RMW instructions. Perhaps that's the original source of his >> problems? > >Yes, but the bit being set or cleared is the one in question, so it can't >cause the typical RMW problem. The RMW problem with BCF/BSF happens on >_other_ bits within the same port. Good -- now that's cleared up in my mind. To bad the PIC doesn't have a btf (bit toggle flag) instruction -- in that case PORTA ^= 0x40 would be the perfect solution. -- ______________________________________ Andrew E. Kalman, Ph.D. aek@pumpkininc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body