6.4 Parallel I/O (PIO) Ports
Each I/O port has 14 registers directly associated with the operation of the port. Each I/O port pin has a corresponding bit in these registers. The data direction register (TRISx) determines whether the pin is an input or an output. If the data direction bit is a ‘1
’, then the pin is an input. All port pins are defined as inputs after a Reset. Throughout this section, the letter ‘x’, denotes any or all port module instances. For example, TRISx represents TRISA or TRISB. Any bit and its associated data and control registers that are not valid for a particular device are disabled and read as zeros.