Quote Originally Posted by CuriousOne View Post
The main issue is that either TRIS statements does not work, or HIGH-LOW statements interfere with them. In practice, this means that when I issue HIGH PORTB.3 or any other similar statement, some other PORTB pins also change their state. Adding TRIS.X=1 or 0 changes nothing. How to avoid this?
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.