ao. Which USB cable do I need to connect my PIC microcontroller to a PC?

NOTE: It is not uncommon for a high speed microcontroller to PC USB 2.0 connection to fail due to a bad cabling. IF YOU RUN D+ and D- WIRES UNDER YOUR PCB, MAKE A HELIX CABLE TO THE USB PLUG ON YOUR PCB. IF YOU ARE MAKING D+ and D- LINES ON YOUR CUSTOM PCB, THEY MUST BE OF APPROXIMATELY THE SAME LENGTH AND THEY MUST RUN IN PARALLEL.

HIGH SPEED is only achievable with short enough USB 2.0 cables and PIC32MZ microcontrollers. Usually, the cable length should not exceed 1.5 meters. It is also not recommendable to use cable extenders, because they increase +D and -D signal lines overall capacitance.

LOW SPEED (up to 1.5 Mb/s)

FULL SPEED (up to 12 Mb/s)

HI-SPEED or HIGH SPEED (up to 480 Mb/s)

However, selection of a USB cable also depends on the maximum connection speed that you intend to use. USB 2.0 supports three speeds:

USB cables with A and B type plugs are mostly used in home USB projects. This is because a B type socket is usually the easiest to mount on a home-made PCB.

ANSWER:

Which USB cable do I need to connect my PIC microcontroller to a PC?

QUESTION:

Click on the photo to enlarge it.

I have experienced it myself while connecting my PIC32MZ2048ECH100 - 100-pin PIM basic USB circuit to my PC. The microcontroller connected properly only through a quality USB 2.0 cable.

Bottom side of the prototyping PCB. Click on the photo to enlarge it.