A chronic problem for me when laying out PCBs is pinout mixups on header connectors — sometimes I will inadvertently interchange adjacent pins or hook pins to things that seem right but aren't, at others I will mirror or rotate the connector altogether from its expected mating orientation. While debugging tools with flylead cables (my FTDI cable and Bus Pirate both have this) or female-terminated jumper wires can be quite helpful when working around this when prototyping, they're quite a chore to use compared to the correct mating connector, and not always possible now that some things (ARM Cortex-M JTAG/SWD, most notably) are migrating to 50mil header pitch from 100mil. Building one-off adapters is also a hassle, and the extra mounting height an adapter imposes is sometimes undesirable from a mechanical standpoint as well.
How can I prevent these problems at the design stage — especially rotated/mirrored pinouts, as they seem to be a bigger problem for me than swapped pins? Also, are there design strategies I can use to reduce the impact of this class of problems in terms of rework/adaptation effort needed? I am doing schematic capture here — I've had this problem when working both with gEDA in the past and currently with KiCAD. DRC and netlisting aren't able to catch these issues because I'm dealing with generic pins on the header side, and sometimes on the "other end" (i.e. the component the connector is wired to) as well — and these problems are occurring in schematic capture — not necessarily at actual layout time.
Best Answer
If you are not already doing so you should make sure to use a schematic capture tool that can then create a net list of the design connections. This can then be fed into the PCB layout tool to specify all the connections. This goes a long way to eliminating issues because: