2.1 Pin Layout Planning
During the development of this application, pin planning was a critical consideration. Features such as Peripheral Pin Select (PPS) significantly improve digital I/O routing by providing flexibility in pin assignment. However, analog peripheral I/O is generally limited to a few select pins, with the exception of the Analog-to-Digital Converter (ADC) inputs. Additionally, features enabled from configuration bits, like CLKOUT, have fixed pin assignments.
To begin, first route the inflexible signals. In this case, analog signals and the MCLR line were the top priority. Ideally, analog signals should be routed away from fast-switching digital signals, as these may couple noise into the input. See Microchip Application Note AN4225, “Maximizing the Signal: Tips and Tricks to Properly Acquiring Analog Signals” (DS00004225) for more information.
Once the analog signals were assigned, the digital I/O was routed. These pins are more flexible, but still may only be available on specific ports. Note that while creating the Printed Circuit Board (PCB) layout, it is advantageous to use PPS to rearrange digital signals further to optimize layout patterns.