In-depth Review: Microchip PIC32 Starter Kit

In-depth Review: Microchip PIC32 Starter Kit

Jon Titus, Senior Review Editor -- EDN, 6/1/2008



Microchip has put together a top-notch evaluation package that introduces engineers to the power of its new 32-bit PIC32MX MCUs. The company's approach to documentation makes it easy to find manuals and guides. This is a kit programmers can use to learn about the Microchip development and debug tools. After running a few demo programs, hardware engineers may decide to move up an Explorer-16 development board with a PIC32MX daughter card. Microchip should have PIC32 expansion boards available starting in June 2008. I stumbled on an error in the User's Guide, but Microchip's support people quickly got me squared away.


Microchip has moved into the 32-bit MCU world with a selection of seven devices that vary mainly by numbers of pins (I/O connections) and amounts of R/W and flash memory. I had not experimented with Microchip processors and tools for some time, so the PIC32MX kit provided a way to jump back into the Microchip realm.


The evaluation board's processor--a PIC32MX360F512L MCU--furnishes 32 Kbytes of R/W memory and 512 Kbytes of flash memory. This MCU chip and one other in the PIC32MX family includes unobtrusive instruction-trace capabilities. The board provides three LEDs (red, yellow, and green) and three pushbutton switches, all of which developers can control or sense from standard I/O ports.


Documentation Much Improved


In earlier reviews of Microchip kits, I faulted the company for poor documentation and a lengthy set-up process that involved tracking down updated files. The company has vastly improved its approach to kits and instructions. Upon opening this kit I couldn't miss a circular paper disk placed over the CD-ROM. The disk, labeled "Important Installation Instructions," explains how to start the setup process so users don't run into any problems. The paper-disk insert over the CD-ROM forces users to pay attention and perform steps in the proper order. Nice job, Microchip.


The "Starter Kit" splash screen offers two options, install the software and check for updates. The software installation went smoothly. I checked for updates, but the Microchip Web site quickly reported I needed none. Instead of having to "explore" the CD's contents file by file, Microchip provides a Web-like Flash page that lists the documentation on the CD. The paper disk lists viewing the "Getting Started" guide as the second installation step but I opted to print this 44-page document so I could check off steps and make notes. Next, I connected the small eval board to my lab PC through the provided USB cable. Hardware installation went quickly and without problems.


When first powered, the eval-board's three LEDs flash to indicate the MCU has started to run a preprogrammed game that tests a user's ability to duplicate light patterns. I skipped the game and moved on to the tutorial project. The Getting Started instructions are clear and screen images show what you will see as you perform setup and programming steps.


Compile and Load a Test Program


The first project involved using the Microchip MPLAB tools to compile a test program, download it to the PIC32MX processor and run it. The steps went smoothly and the program ran as described. In this example, the debug window displays information transmitted by special C commands embedded in the downloaded code. So, as a program operates, it can send information back to a host PC. In this example, the MCU transmitted short messages about how to change the state of each LED. Typing in a command transmitted a keyboard code to the MCU where the software determined which LED to turn on or off.


The statements below (and others) exist within the C-language code for the MCU:


DBPRINTF("type R to toggle the RED LED. \n");


DBGETC (&choice); //Read keyboard choice


I particularly liked this type of programmable interaction between the MCU and my lab PC, and can understand the utility of these debug commands during development and testing.


Modify the Sample Program


After toggling the LEDs, I "jumped" out of the User's Guide and modified the example code to use the LED ports on my own. I printed the C source code for the sample program and located the LED-control commands. Because I/O ports figure so significantly in MCU-based designs, I use accessibility of I/O-port information and ease of controlling them as a gauge of a manufacturer's support for its customers. Engineers shouldn't have to spend days trying to decipher header and include files and hardware manuals to learn how to control I/O ports.


Microchip provides excellent documentation. The kit's CD-ROM includes a manual of peripheral libraries for the MPLAB C32 compiler (300+ pages), a PIC32MX family reference manual (1140 pages), and a PIC32MX family data "sheet" (632 pages). (Some manuals download from the Microchip Web site, so you always have up-to-date information.) You can select and print sections you need. Information in the peripheral-library manual explains how to use I/O ports and how to use C macros and functions to write to each port. My new code used FOR loops to set up delay timers and an unsigned integer for a 16-bit counter. The code transferred the count to the three LEDs to create a visual 3-bit counter. (Before writing all 16 bits to the I/O port I checked to ensure writing to I/O port D would not upset any external devices.) After increasing time constants in the do-nothing delay loops, I could see the counter code control the three LEDs.


Create Your Own Project


The User's Guide includes a section about how to create a project from scratch. I made progress but ran into a snag and didn't get past an error message until I talked with two experts at Microchip. They reproduced my problem and found it stemmed from a small misstatement in Section 3.3.2 in the 10-05-2007 version of the "User's Guide." Microchip has a revision underway.


The instructions in Section 3.3.2 should say:


=====

3.3.2 Task 2, Select the Language Toolsuite


2.1. In this step you will associate specific software tools and their locations with the Microchip PIC32 C-Compiler Toolsuite.


2.2. In the "Active Toolsuite" drop-down list, click "Microchip PIC32 C-Compiler Toolsuite." The "Toolsuite Contents" box below lists the tools, including the assembler and linker, that you will use in this project. If the PIC32 compiler option is not available, check the "Show all installed toolsuites" box to locate it.


2.3. In the "Toolsuite Contents" box, select "MPLAB C32 C Compiler (pic32-gcc.exe)".


2.4. In the "Location" box, click "Browse..." navigate to: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-gcc.exe." This step associates the Toolsuite with the C compiler located in the proper directory. DO NOT click on any of the buttons at the bottom of this box.


2.5. Now, go back to the "Toolsuite Contents" list and select "MPLAB LINK32 Object Linker (pic32-ld.exe)."


2.6. In the "Location" box use the "Browse..." button to navigate to: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-ld.exe." This step associates the Toolsuite with the linker located in the proper directory. DO NOT click on any of the buttons at the bottom of this box.


2.7. Again, go back to the "Toolsuite Contents" list and select "MPLAB ASM32 Assembler (pic32-as.exe)."


2.8. In the "Location" box use the "Browse..." button to navigate to: "C:\Program Files\Microchip\MPLAB C32\bin\pic32-as.exe." This step associates the Toolsuite with the assembler in the proper directory.


2.9. Click "Next" to continue. The Project Wizard Step Three: dialog opens, as shown in Figure 3-3.


Note: If you need to check or change these toolsuite file associations later on, go to the "Project" menu and choose "Select Language Toolsuite..." When you finish, click the "OK" button.


=====

Although Microchip provides a 120-pin Hirose FX10-series connector on the back of the board for I/O expansion, I missed having easier access to I/O lines on this eval board. Microchip expects to release three expansion boards starting in June. The first board will include a break-out area with all the PIC-32 signals, connectors for two PICtail modules, debug and trace connectors and a connector for an LCD module. Next up; an adapter board for the Explorer-16 demo board and a network-expansion board that will provide an OLED display, SD-card interface and Ethernet port.


For a short VIDEO review of this kit CLICK HERE


For Jon’s CONDENSED VERSION, INCLUDING RATINGS on this kit, CLICK HERE


For MORE INFO ON THIS KIT and access to related materials CLICK HERE


2-minute Review... from the DEV-monkey Lab June (PDF)



Blog Post

Jon Titus
An mbed Module to the Rescue
A request for design help arrived by email: An engineer needed ideas about how to get...
March 16, 2010
Posted In:JON TITUS BLOG
DEV-monkey
Minimizing Video Processing Design Time with FPGA Development Kits and Reference Designs
Introduction Video standards and methods of encoding/decoding have made tremendous p...
October 7, 2009
Posted In:DEV-MONKEY BLOG

» View all blog posts>>

 Free-Newsletter

 



Development Resource Center

MPLAB ICD 3 In-Circuit Debugger
Date: Oct 5, 2009
The MPLAB ICD 3 is the most cost-effective high-speed emulator for PIC MCUs and dsPIC DSCs. It debugs and programs with the powerful, yet easy-to-use... More...

PICkit 3 Debug Express
Date: Oct 5, 2009
Microchip’s PICkit™ 3 Debug Express uses in-circuit debugging logic incorporated into each chip with Flash memory to provide a low-cost hardware debugger and... More...

Free C Compilers from Microchip
Date: Oct 5, 2009
Microchip has a complete selection of C compilers for programming on any PIC microcontroller or dsPIC digital signal processor. The MPLAB C and HI-TECH C... More...



©1997-2010 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy