Package contentThe kit came in a handy book-sized black plastic box. It contained the following items:
- PIC32 Ethernet Starter Kit Board
- USB mini B to standard A cable - to debug and powering the board
- USB micro B to standard A cable - for USB application development (to communicate between the PIC32 and the PC)
- RJ-45 CAT5 patch ("straight") cable for Ethernet connection
- Software CD
- Registration card
The PIC32 Ethernet Starter Kit board is a small, compact circuit board containing an PIC32MX795F512L 32-bit microcontroller, an on-board debugger (surprisingly the debugger is realized with a MCU so the Ethernet Starter board actually contains two PIC32 MCUs), an Ethernet PHY, a 3,3 V regulator, connectors, LEDs for state displaying, and three LEDs and pushbuttons for user interaction. The board has compatible form factor and expansion connector as other PIC32 Starter Kits. The circuit can be supplemented with an 32 kHz oscillator for the RTCC (see the unpopulated place for Y3, C15 and C16).
The PIC32MX795F512L microcontroller has 512KB Flash/128 KB RAM, on chip 10/100 Ethernet MAC with MII/RMII interfaces, 2 x CAN2.0b modules with 1024 buffers, USB host/OTG/device connectivity, 6 UART, 4 SPI, 5 I2C, 5 timers with CCP, 16 ADC channels, RTCC etc.
The block scheme and the circuit diagram in the PIC32 Ethernet Starter Kit Schematics.pdf helps to understand the role of the connectors: the USB mini-B connector is used for debugging. It can be also used to provide +5V supply for the board as well as for the USB host applications (in the latter case the JP2 jumper should be installed). The USB micro-B connector (on the back side of the board) is used for USB device or OTG applications or to provide power for the board. The USB type A connector is used for USB host applications. The VBUS power can be obtained from the computer through the debugger cable (in this case JP2 should be installed) or from an external +5 V source through the 132 pin extension connector (in this case the JP2 jumper should be removed).
The software CD bundled in the kit is a bit outdated, a newer version of the software is available at Microchip's PIC32 Starter Kit Software Update page. Downloading the Updated PIC32 Starter Kits Software (v2.0A).zip package (155 MB) requires sign in at microchip.com (the registration is free) . After unzipping the package to a local directory one have to start the setup.exe program. The installation requires system administrator privileges.
The installation is simple and automatic: one only have to specify the installation directory and to accept the license terms and conditions. The "all in one" package contains every program and documentation you need for experimenting with all kind of the PIC32 Starter Kits (including the PIC32 Ethernet Starter Kit). You will get the MPLAB Integrated Development System (MPLAB IDE v8.43), the demo version of the C32 compiler (v1.10B), example programs (starting from the LED blinking to the Ethernet TCPIP BSD web server, including USB device and host applications) tailored for the PIC32 Starter Kits, and a lot of documentation (PIC32 Starter Kits User Guide, PIC32 datasheets, software manuals etc.). The downloaded package does not contain the PIC32MX Family Reference Manual, you will find only a link to it at the Microchip's web page. The CD, however, contains it.
Possible interference with earlier installationsThe MPLAB IDE and the C32 compiler will be installed even in that case you have already a newer (or older) version installed on your computer. They can coexist and work alternately without any trouble. I had a special problem, however, due to my earlier experimenting with the SourceBoost IDE and C/C++ compilers. Though these software have been uninstalled quite a long ago, there were remained records in the Windows Registry database. At every startup of the MPLAB IDE installed with the PIC32 Starter Kit software I have got a lot of error messages complaining about Legacy language files. I had to remove all records containing the word "boost" from the Windows Registry database (except of Micboost which belongs to the microphone input of the audio subsystem). An alternative (and lazy) solution would be to copy the missing files from the old MPLAB IDE installation...
Device driver for the on-board debuggerThe last step of the installation is the installation of the device driver of the debugger. Connect the USB mini-B cable to the Debug port (the J1 connector on the board) and connect the other end of the cable to the computer. The operating system will recognize the new hardware and ask for the proper driver. The relevant files are in the <installation directory>\MPLAB IDE\PIC32MXSKit\Drivers subdirectory, but some files may be also needed from the <installation directory>\MPLAB IDE\PIC32MXSKit\bin subdirectory as well.
Where to find the information?
The most important pieces of information needed for getting started are in the PIC32MX Starter Kit User's Guide.pdf document which walks newcomers through the first steps in developing for the PIC32MX Starter Kits. This document is a combo, it contains information for the PIC32 (General Purpose) Starter Kit, for the PIC32 USB Starter Kit II and also for the PIC32 Ethernet Starter Kit we are interested in. You have to learn to skip the irrelevant part and pick up the information valid for the Ethernet Starter board.
The PIC32MX Starter Kit Release Notes contains very important technical information, a PIC32MX Starter Kit FAQs section and information about PIC32MX Device Re-Flash Utility, PIC32 Peripheral Library support, Debug Print Library support and Debugging/stand alone applications.
Each demo project contains a separate information page in the project directory (Getting started - Running the Device/Host xxxxx demo.html). These files explains how to configure the board and how to use the application. Don't miss these pages!
Copy-paste effectsBeing the fourth member of the PIC32 Starter Kits, the PIC32 Ethernet Starter Kit is a product of an evolution process. The documentation, however is slightly behind in the evolution of the hardware. Few examples:
- The documentation refers to a PIC18F4550 debugger but the PIC32 Ethernet Starter Kit have a PIC32MX440F512H MCU for debugging.
- The Getting Started - Running the Starter_Kit_Tutorial Demo.html says that "The source code for this demo is available in the <Install Directory>\PIC32 Starter Kits\Blink_Leds directory" though is in the Starter_Kit_Tutorial subdirectory.
- Several demo recommends to use the OTG cable to connect the board to a PC, however, you have to use the debugger cable instead, since the debug print facility requires the communication with the debugger. For example the Bink LEDS demo was not even started if the debugger cable was not connected to the PC.
Using the board out of the boxThe PIC32 Ethernet Starter Kit may be used directly from the box as a demonstration board for the PIC32 device. The PIC32 is preprogrammed with the classic “Simon Says” game. The goal is to imitate the light patterns as long as you can without getting frazzled Refer to the PIC32MX Starter Kit User's Guide for the details.
The most simple project is the Hello world example which demonstrates the usage of the Debug Print Library. You should include the plib.h file, and to call DBINIT() first before any other Debug Print Library macros. After that you can communicate between the PIC32 and the MPLAB through the debugger cable. In the Hello world example the main program uses the DBPRINTF("Hello World !\n"); command to print out a message in the Output window of the MPLAB IDE.
The Blink LEDs example demonstrates the handling of the hardware (the user LEDs are toggled).
The Starter Kit Tutorial project demonstrates a simple menu-driven console application, using the PIC32 Debug Print Library macros, to turn on/off the PIC32MX Starter Kit LEDs and echo text when the user responds to a menu hosted in MPLAB IDE Starter Kit console window. Refer to the PIC32MX Starter Kit User's Guide for the details.
Programming the PIC32 MCU
After the successful compilation of a project the generated hex code should be written into the flash memory of the PIC32 MCU. This can be done by the on board debugger. Select Debugger>Select Tool>PIC32 Starter Kit from the menu bar of the MPLAB IDE, then click on the Program all Memory icon or select the Debugger>Programming>Program all Memory menu item.
USB projectsThere are several USB demo projects bundled into the PIC32 Starter Kits Software package which can be divided into two classes: USB device projects (in which the PC is the host and the PIC32 acts as an USB device) and USB host applications (where the PIC32 is the host). Among these projects I have tested the USB device - CDC Basic demo and the USB Host - Mass Storage - Thumb Drive Demo. The CDC Basic demo worked the same way as its PIC18 predecessor. The USB host application, however, was completely new for me. This was the first occasion I could see a PIC microcontroller to handle the content of my pen drive.
Unfortunately there is only one Ethernet demo project available for the PIC32 Ethernet Starter Kit, the Ethernet - TCPIP-BSD - HTTP Server Demo. I was curious mostly about this project. The default host address (192.168.2.105) was not suitable for me, since my home network uses the 192.168.1.* IP range. Therefore I modified the definition of the host address to 192.168.1.15 and the gateway address to 192.168.1.1 8 (this is the IP of my router). The project was compiled without any hassle. The RJ-45 connector of the Starter board was connected to the router by the UTP patch cable. A connection (using either the debug cable or the USB OTG cable) to a PC is also necessary in order to supply power for the board. After directing a browser to the host address (18.104.22.168 in my case) the demo page appeared on the screen.You can connect the board directly to your PC (if you don't have a router available), however, you should use a crosswired cable in that case.
The Ethernet - TCPIP-BSD - HTTP Server Demo/Getting Started - Running the Device - TCPIP-BSD - HTTP Server Demo.html file contained all information I needed to build and run the project successfully.
Both hardware and software worked perfectly, the demo project were compiled and running without any trouble. The engineers of Microchip have done an excellent job. In my earlier experiences I have had much more troubles with the Explorer 16 board (where the on board debugger was not provided with firmware by the manufacturer) or with the MPLAB IDE until I learned tos configure the directory paths for a given language toolkit. I think the key of the success of the PIC32 Starter Kits Software is that it contains everything (IDE, compiler, software libraries and demo projects) in a consistent single package. If you were installed all these components from independent packages, you would expect much more troubles!
The PIC32 Ethernet Starter Kit is an ideal tool for education. It can be best used to learn about programming the PIC32 MCU or to develop USB or Ethernet applications. The board has only one drawback: it is very difficult to connect it to your own circuit. Even if you want to extend the board with a single LED you have to buy the PIC32 I/O Expansion Board which may not exactly fit your needs and may be too expensive for your simple project. Of course, the PIC32 I/O Expansion Board is very useful, if you want to make experiments (or development) by using PICtail Plus cards. However, I would like to see some other (and simpler) solutions as well.
Revised by: Istvan Cserny at 11:46 CET on July 27, 2010.