I know I promised a post about controlling UBW32 I/O pins and registers this week, but the PK3Err0035 problem has left my board seemingly bricked. After the failed programming attempt I mentioned in a previous blog post, I am unable to upload code using the HIDBootloader program (or any program, for that matter). I have also tried using two other PIC programmers (The MPLAB ICD3 and the REAL ICE) and they both give me the same Err0035 code when I attempt communication with the MX795 chip in question. Read on for my current plan and some nifty DipTrace files to keep you busy developing in the mean time.
I have heard from Brian Schmalz, the UBW32 creator that there have been several people reporting that they are also having the same problem after attempting to program their chips with the PICKit 3. I have a support ticket into Microchip technical support regarding this problem, and I hope to get to the bottom of it. For the time being, I recommend not programming your MX795 with a PICKit 3 and sticking to the bootloader for now. I hope to have a more in-depth post regarding this issue and possible solutions (if any) once I hear back from Microchip.
In the mean time, since I have not been able to work on some example code this week, I will post what I have been working on: A DipTrace library for the UBW32 board based on the Eagle Footprint library that was provided on the UBW32 main page. Here’s a zip file of the pattern file and the component library, as well as a schematic with named traces for ease of use in your future projects. The way DipTrace is set up, you can just name any net the same as another net and it will connect them for you. I have named all the UBW32 nets after their register numbers as shown below (the names above each wire are the net names), so it should be very easy to do some UBW32 schematics in the future with this as your base, and to develop some UBW32 shields using this schematic as a starting point.
As for the library files, I have left the base UBW32_PKG as it was provided on the UBW32 link above, but I have also added another component that is called UBW32_PKG_VERBOSE (shown above) to my library. This second package has the same pattern file footprint reference as the original (for PCB layout), but the schematic contains a copy of all the pin functions as listed on page 17 of the Microchip datasheet for the PIC32MX795F512L chip. Since the UBW32 has its pins in a slightly different order than the default chip packaging and that page is fairly difficult to read, I am providing them in my schematics to make it clear why certain pins were chosen for my future tutorials. I also show a schematic representation of the on-board LEDs and switches on the UBW32 so you know which pins are in use on the board as you design your circuit schematics.
Hopefully this easy-to-follow schematic will be able to hold you over until my replacement chips arrive in the mail and I can fix my UBW32. I’ll attempt to get everything resolved before next weekend so I can continue with my posts as planned, though I may be delayed by Thanksgiving. Happy programming to you all, and I hope to resume my posting useful programming examples with schematics ASAP.
EDIT | 2011-11-26: I noticed that my schematic showed the LEDs on-board going from the digital output pins to ground, but the board is configured to go from +3.3V through the LEDs to the pins. I have corrected the schematic and DipTrace parts libraries to reflect this.

Comments are closed.