TRISIO set the pin direction: input or output

your POKE to ANSEL or CMCON: is set the input mode, digital or analog.