Quote Originally Posted by mark_s View Post
Tris Registers?
The OP needs to learn about those also, but if I am not missing something his code is using commands that set TRIS in the background.