chipKIT® Development Platform

Inspired by Arduino™

Manually wiring a USB cable to program the Chipkit?

Created Fri, 05 Apr 2013 20:38:16 +0000 by rasmadrak


Fri, 05 Apr 2013 20:38:16 +0000

Hi there!

Long story short - I left the USB cable plugged in in the Chipkit, my daughter saw it and now the USB port is broken. To make things worse, while attempting to replace it by removing and resoldering a new port I accidentally messed up the circuitboards and its traces. So now I cannot place a new port there.

Reading the manual, it says that "The USB OTG controller allows using the Max32 board to implement a USB device, USB host or USB OTG host/device. The following pins are used by the USB interface: Pin 27 (D+), Pin 26 (D-), Pin 25 (USBID), Pin 24 (VBUS). Pin 24 (VBUS) can be used by a self powered USB device to monitor the presence of bus voltage on the USB bus.".

Does this mean I can connect a USB cable directly to these ports and program the Chipkit? When looking at the schematics, the USB port seems to be laid out as follows:

5: G 4: ID 3: D+ 2: D- 1: V

If possible to hijack the pins for programming the Chipkit, how should the wiring from the cable to the pins look?

All I need is to be able to program the board, preferably with automatic reset if possible.

Please help! :)


Fri, 05 Apr 2013 21:10:11 +0000

Yes, but you'd need to replace the bootloader on the PIC32 with one that supports USB bootloading. The default one is a serial bootloader which communicates via an onboard USB->serial adaptor.


Fri, 05 Apr 2013 21:34:41 +0000

Hmm. Bummer. I'll rephrase my question slightly: Is it possible to utilize a USB cable to program the board via the TX/RX pins directly?

I want to avoid having to buy a new Max32 just for the USB port... :S


Fri, 05 Apr 2013 22:02:37 +0000

When examining the board closer, I might actually be lucky... Bear with me on these beautiful ascii-drawings.

The board from left to right (looking from the processor with the USB port up): 1 X 1 1 1

Meaning, the second pin is broken.

However - When counting pins on the serial converter and measuring pins I find that they seem to be connected like this:

USB 1 X 1 1 1

G _ 14 15 V

This would imply that the broken pin is the ID pin, which has no obvious connection according to the schematics. Could it be that this trace wasn't connected in the first place and just used for extra support for the USB-port?

If that's the case I'll be able to solder a new port. :)


Fri, 05 Apr 2013 22:13:28 +0000

Yes, according to this ( [url][/url] ) the broken pin is indeed pin 4, labeled "ID" in the Chipkit-schematics.

When looking at the schematics I cannot find that this pin is not connected to anything. Now the only question remains - is USB pin 4 used on the Chipkit? :)


Fri, 05 Apr 2013 22:22:42 +0000

Pin 4, the "ID" pin, is only used for USB OTG to switch between host and device mode. As the USB interface is device only pin 4 is not used. It doesn't connect to anything.

The mini USB connectors are a bitch to hand solder though - I always use a reflow oven for mine.

The other option is to use a USB->TTL RS-232 adapter to connect direct to the Serial TX and RX pins. You really want one with a DTR pin, and you connect that to the RESET pin on the MAX32 via a 100nF (0.1µF) capacitor to enable the auto-reset facility used by the IDE for entering programming mode.

[url][/url] is an ideal board.


Fri, 05 Apr 2013 22:36:42 +0000

Awesome! Since the cost of replacing the USB-port will be around 1$, I figure I'll give it a try at least. :)

Following the link of retired products one finally ends up with this ([url][/url]), which will be plan B in case the soldering goes south.

Thanks, I really appreciate your help in this matter! :)


Sat, 13 Apr 2013 22:26:28 +0000

Great success! :D

I managed to solder the new USB port and I'm up and running with the Chipkit again. Awesome!



Sat, 13 Apr 2013 22:48:09 +0000


They really are a pain to solder by hand. You did well to avoid solder bridges.