6.4.1.5 Configuring Tri-State Functions (TRISx)
The TRISx registers configure the data direction flow through port I/O pins. The TRISx register bits determine whether a PORTx I/O pin is an input or an output:
- If a data direction bit is ‘
1
’, the corresponding I/O port pin is an input. - If a data direction bit is ‘
0
’, the corresponding I/O port pin is an output. - A read from a TRISx register reads the last value written to that register.
- All I/O port pins are defined as inputs after a Power-on Reset (POR).