It sounds like you are describing the R-M-W (read-modify-write) effect that you get when setting one bit of a PORT output.
When you do a bit operation on a PORT, the entire PORT is read, the bit is modified, and the entire PORT is written back.
The easiest way to fix this is to use a part that has LAT registers, and always write to the LAT, read from the PORT.





Bookmarks