Add the lines:

Code:
ADCON1=7
CMCON=7
Near the top of your program. This should set your analog ports as digital. Then the TRIS register will have an effect.

Best Regards,
Paul