How To Information for PIC32 Starter Kit
Updates
9/15/09; 2:50pm; Added a note on device drivers.
9/21/09; 2:15pm; Install MPLAB IDE from web, not from CD.
9/23/09; 1:35pm; Revised links for C32 compiler to Academic version.
This board can be purchased through Microchip (the manufacturer), or through Digikey (link).
Instruction set for PIC32; this is from pp. 49-54 of the datasheet for the PIC32.
MIPS Corp. calls the PIC32MX by a different name-- MIPS M4K.
MIPS Page for M4K processor (link)
M4K data sheet (link):
Includes desciption of instruction set
One thing you should know about the MIPS chip on the PIC32 board is
that it runs with no operating system. Your program, and any libraries that you use, will be
downloaded to the MIPS chip RAM and executed. This is typical of
microcontroller hardware-- it has no operating system.
The PIC32 can be programmed in the C
language and in assembly language. We will be using assenbly language.
We will use an IDE (Integrated Development Environment) provided by Microchip to do our programming. The IDE
is called the MPLAB IDE, and it is freely available. We will be using
the C32 assembler to assemble our programs into machine language. The
MWAH 177 lab will have these pieces of software installed. If you want
to install this software on your computer, they are freely available:
MPLAB IDE page at Microchip (link)
Version 8.36 of IDE (download)
C32 Academic Version Compiler & Assembler (link;
login required to download compiler-- free account)
Version 1.05 also available here.
Microsoft Vista:
Vista may pose some installation issues for the MPLAB IDE and the driver
software for the Starter Kit.
Make sure you install the version of MPLAB from the Web, and not from a PIC32 Starter Kit CD. The CD will probably not have the most recent version of MPLAB and likely will not work with Vista.
MPLAB IDE page at Microchip (link)
Version 8.36 of IDE (download)
If
you are installing on a Vista system, you can try following the
instructions in this video.
Documentation on C32 libraries.
From
C language
From assembly language: Section
5.6 of this document has calling conventions.
If you use Linux or Mac OS, it appears to be possible to use the
assembler on these platforms. See this
link. I'm not sure how to use Linux or Mac OS to download your
machine
language code to the Starter Kit, however.
Using MPLAB on Linux:
Here's some more information about VirtualBox from Sun that I use to emulate windows XP.
http://www.virtualbox.org/wiki/DownloadsI did something along this line to get my USB working, tho this isn't the exact page I used (can't find it).
http://www.hooto.com/home/rui/blog/archives/1326.htmlAlthough it looks like this might work as well
http://news.softpedia.com/news/How-to-Fix-VirtualBox-USB-Support-111715.shtmlAlso I had to install VirtualBox guest add-ons in the virtual Windows to get everything working.
On my virtual Windows I can access all my connected USB devices, including the PIC32, and from there I can program it and everything works correctly.
Robert Nelson
Assembler documentation
The assembler within the C32 compiler is the GNU assembler.
Some documentation on this assembler is here.
Other MIPS documentation
1) First, launch the MPLAB IDE and connect the Starter Kit
If this is the first time you have connected the PIC32 Starter Kit to your computer, you will likely need to install a device driver. You can point the Windows device driver installer to:
C:\Program Files\Microchip\PIC32MXSKit\Drivers