Review of Microchip DM240012 USB Starter Kit

Table of contents

RoadTest: Microchip DM240012 USB Starter Kit

Author: speedsthatbeat

Creation date:

Evaluation Type: Evaluation Boards

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?:

What were the biggest problems encountered?:

Detailed Review:

The MPLAB USB Starter Kit for PIC24E is a nice kit that allows for easy prototyping of projects that require USB OTG, device or host interface. the PIC24E is also well equipped in terms of supported periferials (SPI, I2C, UART). The kit includes :

1. PIC24E USB Starter Kit Development Board with a PIC24EP512GU810-I/PT MCU

2. PIC24E USB Starter Kit Information Sheet with the details on where to download the MPLAB compiler and libraries

3. USB mini-B to standard A cable  this is the debug cable that powers also the board

4. USB micro-B to standard A cable - used for applications where the board is used as USB device

 

Getting the basic demo running is quite easy. First the MPLAB IDE (currently v8.83) and compiler  need to be downloaded and installed. Then the CDC demo should be installed. It can be easily run following these instructions. Once you are done with this demo and verified that the board works properly you may want to download the Microchip USB framework for PIC 18, PIC24 & PIC 32.

This is really a nice set of  libraries and demos  and several of them work well with this board. Working demos in the package  include Device CDC demo, USB microphone and sleaker demo, USB MIDI demo,  Printer demo, bar code scanner demo, CDC serial emulator, device composite HID and mass storage, generic driver demo, HID mouse demo, HID keyboard demo, thumb drive data logger (host) and more.

 

Expanding the possibilities

The board as is allows only simple experimentation that is focused on the USB OTG and device modes using the 3 switches and 3 leds as simple interfaces. In order to expand the capabilities of the board there are several options. Microchip provides a multimedia expansion board and an I/o expansion board   Alternatively it should be possible to reuse this PIC32 breakout board. I have not tested it but it is likely to work.

 

Adding  RTOS

There are several options available on the market to add real time OS to this board. The free RTOS has been ported to the PIC24 family but it will not work out of the box on this kit that uses the PIC24E chip. Here are the steps needed to get it to compile on MPLAB.

 

1. Donwload the FreeRTOS sources (current version 7.1.0) from http://www.freertos.org/

2. install it (or unzip it) and in the demo directory look for the PIC24_MPLAB directory while in MPLAB.

3. Open the workspace.

4. Change the target device to  PIC24EP512GU810

5.remove  the existing file in the directory linker script and substitute it with the corresponding one for the PIC24EP512GU810

6. Add the files

     HardwareProfile.h

     HardwareProfile - PIC24E USB Starter Kit.h

from the CDC demo that came with the kit

7. add the correct header file to FreeRTOSConfig.h and comment the existing one

//#include <p24FJ128GA010.h>

#include <p24EP512GU810.h>

 

8. Look a this post : http://www.microchip.com/forums/m568144-print.aspx.

The kernel code need to be changed in several locations 

-in the file port.c look for  the portRESTORE_CONTEXT() macro and replace the line "POP PSVPAG" with POP "DSWPAG" and "POP DSRPAG".

- In the file port.c under in the pxPortInitialiseStack function definition, replace

 

                 *pxTopOfStack = PSVPAG; pxTopOfStack++;

with         

                 *pxTopOfStack = DSRPAG; pxTopOfStack++; *pxTopOfStack = DSWPAG; pxTopOfStack++;

.

- In portasm_PIC24.S in the _vPortYield section, replace

                    

                                "PUSH PSVPAG"

 

with

                               "PUSH DSRPAG"

                               "PUSH DSWPAG",

 

and replace

                                "POP PSVPAG"

 

with

                                "POP DSWPAG"

                                "POP DSRPAG".

 

with all these changes you should be able to compile and load FreeRTOS successfully.

Anonymous

Top Comments