By setting a bit of the TRIS register to zero (pin=0), the corresponding pin of the port will be configured as an output. Similarly, setting a bit of the TRIS register to one (bit=1) will set the corresponding pin of the port as an input. This rule is easy to remember: 0 = Input 1 = Output.