Hacking the Microchip Explorer 16 Development Board
November 8, 2008 — Phillip Burgess — http://www.PaintYourDragon.com/uc/
Disclaimer and caution: some of the changes outlined on this page involve soldering and modifications to a fairly costly circuit board, which always runs some small risk of damage or mayhem. While I suspect that most anyone with the inclination to buy and use one of these boards is well-versed in soldering and related precautions, maybe that’s not actually the case, and I assume no liability for any damage that might occur to the board, yourself or your belongings.
The Explorer 16 Development Board is Microchip’s mainline trainer/project board for 16-bit (and lately now, 32-bit) microcontrollers. The modular design of this board allows use of three different microcontroller families along with add-ons for networking, storage, audio, LCD graphics and more, and providing a common point of reference that allows Microchip to provide working example software templates for these different types of projects.
For all its virtues, this is not to say the experience can’t be improved. What follows are a few simple tidbits I’ve learned for enhancing the functionality of this kit.
A typical
Explorer 16 development setup (shown at right) is comprised of several
parts:
Implied in this setup but not specifically highlighted are the host development system running the MPLAB IDE development environment (or alternate software as detailed in my other articles), and a USB connection between this system and the PICkit 2 or other programmer device.
Collectively this makes for a great deal of clutter on one’s desk, and the assorted parts can be frustrating to travel with. My frugal nature would also have preferred any opportunity to avoid unnecessary expense. Let’s see what can be done to fix this…
This hardly even qualifies as a “hack,” since the feature is
built-in and documented. But there’s a right way and a wrong way to go
about it…
Situated adjacent to the PICtail™ Plus slot connector (or between the two, if you’ve soldered on a second), position J14 is a 6-pin ICSP header to which a PICkit 2 can connect directly. Earlier Explorer 16 boards have plated vias where a 6-pin row connector can optionally be added, but more recent supplies of the board already have this connector soldered in place — there’s nothing to add.
There’s just one small problem: the silkscreen on the face of the board
is incorrect — the ICSP header is turned around, and where they’ve
marked pin 1 is actually pin 6! First-time users will often try this connector
as labeled, then give up in disgust after it doesn’t work and go back to
using the cable. Perhaps the silkscreen will be fixed on future boards by the
time you’re reading this; in either case, use the photo at right as an
indication of how the PICkit 2 is supposed to attach, with the top
face and button facing the procesor PIM.
Appendix B in the Explorer 16 Development Board User’s Guide describes a tremendously useful feature that unfortunately was never implemented: the intent was to allow an auxiliary PIC18 chip on the Explorer 16 board to perform the same functions as the separate PICkit 2, using the board’s USB connector to permit downloading code without a separate programmer device. All the necessary components are still present on the board, but they sit idle as the necessary firmware was never written and the feature was dropped. You can ignore that entire chapter of the manual.
The good news is that one enterprising user, Rafal Waniurski, has taken it upon himself to implement the firmware that enables this missing capability, and has given permission to repost his work here. Once this firmware is installed, any host-side software that works with a regular PICkit 2 will also work with the Explorer 16 board directly via USB; no separate programmer is needed. If you have a colleague or instructor with another device programmer you can borrow, then you can set up your board this way and avoid the expense and additional clutter of a separate PICkit 2.
The process works like this:
Write firmware as appropriate to the device programmer and operating system in use; for a PICkit 2 and Windows, run the PICkit 2 application, select “Import Hex” from the File menu and choose the previously-downloaded firmware file, then click the “Write” button. For Mac or Linux using the command-line pk2cmd program, type:
pk2cmd -PPIC18F4550 -M -F ./PK2_Explorer16_V0210007-BL.hex -R
Note: if the above method ‘hangs’ after writing the firmware, try using Microchip’s Windows-based PICkit 2 program (via Boot Camp or virtualization) to download the hex file to the Explorer 16.
Once configured as above, there are still a couple of differences from a
normal PICkit 2:
This one also came to me by way of Rafal Waniurski, who developed the PICkit 2-masquerading firmware:
The Explorer 16 has a barrel-jack connector for an external 9 to 15 volt DC power supply. Rummaging through my collection of “wall warts” I was fortunate enough to find one of the right voltage, polarity and plug diameter (from a Maxtor external hard drive), but if you’re unable to turn up something suitable then purchasing the correct one directly from Microchip will set you back a ludicrous $24.00.
With a simple modification it’s possible to power the Explorer 16
board from a USB port. This requires soldering one or two Schottky diodes of
type 1N5817 or 1N5819 between specific points on the back of the
board. Schottky diodes are required as they have a very low voltage drop;
combined with the 5 volts from the USB port, it’s just enough overhead
to allow the 3.3 volt regulator on the board to operate.
The diagram at right shows the placement and polarity of the two diodes. Looking at the back side of the board, with the barrel jack under the bottom-right corner, the anode side of both diodes should connect to the 5 volt supply from the USB connector — this is the lower-left of the four pin cluster near the center right edge of the board. The cathode end (with a silver mark) of one diode connects to the cathode end of the existing diode at the corner of the board, adjacent to the power jack, while the other connects to the nearby +5 volt test point. Both diodes pass by a number of exposed contacts on the back of the board, so it’s absolutely essential to cover the bare leads of the diodes with heat-shrink tubing or a length of insulation stripped from 24 gauge wire. After soldering, I also like to use a few dots of hot-melt glue to help secure things in case the board gets knocked around.
Drawing from the USB port means that available current is limited to about
200 milliamps — enough for a modestly-populated board, but not
higher-current accessories such as the Graphics PICtail board — and
it’s necessary to use a powered USB hub or connect directly to a port
on the computer. The “9V” points on the breadboard section will
only provide about 4.8 volts in this configuration. If any of these are
inadequate for a specific situation, it’s still possible to connect an
external DC power source when needed.
With all of the modifications complete, basic Explorer 16 development requires only the board and a single USB cable (as seen at the top of the page), leaving the rest of one’s desk space free for reference books, test equipment, lunch or a collection of small plastic dinosaurs.