**OBSOLETE** Getting Started with PIC32 and UBW32

From Mech
Jump to navigationJump to search

Follow these steps to get the UBW32 started.

Driver for UBW32

Download the driver to your computer from here.

Plug a miniUSB cord into the UBW32 and into the computer.

The New Hardware Wizard should appear. The driver is for a COM PORT. Complete wizard and select driver you downloaded.

The UBW32 should now communicate with the computer.

Open a terminal (I used HyperTerminal) and type 'v'. The Firmware version should appear.

Bootloader

An advantage of the UBW32 is that a bootloader has already been installed. This means you do not need to a programmer to put new programs on the PIC32.

The HID bootloader v2.4 executable can be downloaded here.

This bootloader is used to put HEX files on the PIC32.

NOTE: occassionally, the bootloader will get stuck verifying that the program is running. (There must be a bug in the bootloader application code) It will take 90-100% of CPU. End task manually with the task manager if this happens.

Firmware

There is already firmware installed on the PIC32. This firmware should be updated.

The HEX for Firmware version 1.1 can be downloaded here.

The Source Files for the Firmware can be downloaded here. It is not necessary to download these files unless you want to modify the Firmware. It is NOT recommended to modify the firmware.

Using the HEX downloaded above, use directions here to download the hex with the bootloader to the PIC.

MPLAB

MPLAB is the software used for editing, compiling, debugging code. This software creates the HEX files to download to the PIC.

Download and Install Microchip MPLAB (Microchip's free IDE for editing, debugging and compiling code)

Download and Install Microchip C32 Compiler (the academic version is free)

Download and Install PIC32 USB Device/Embedded Host Software Stack located at bottom of page (this software contains common source code and header files) Note: this stack may get combined with the applications library of PIC18 and PIC24.

  • Header files from the framework do not need to be specifically added to the project in MPLAB, but MPLAB needs to be directed to their location (see HelloUSBWorld for directions)
  • Source files from the framework do need to be added to the project

Linker File

When creating new projects to download to the PIC. Make sure procdefs.ld linker file is in the project folder. The procdefs.ld for UBW32 is different than the standard procdefs.ld for PIC32 when using the bootloader originally installed on UBW32. Make sure to use the procdefs.ld file above for UBW32.

This website warns that if this linker file is not in the project the bootloader may be hosed.

Start Up Projects

Follow Directions for Starting New MPLAB Project.