Getting Started: Running the “USB HID Mouse device” demo

Required Hardware: 1

Configuration: Explorer 16. 1

Configuring the Hardware: 2

Configuration: Explorer 16. 3

Firmware. 6

Running the Demo. 7

Trademarks: 9

## Required Hardware:

To run this project, you will need one of the following sets of hardware:

### Configuration: Explorer 16

Explorer 16 (DM240001)

USB PICtail™ Plus Daughter Card (AC164131)

PIC32MX USB Plug-In-Module (PIM) (MA320002)

## Configuring the Hardware:

This section describes how to set up the various configurations of hardware to run this demo.

Configuration: Explorer 16

### Configuration: Explorer 16

1) Before attaching the PIM to the Explorer 16 board, insure that the processor selector switch (S2) is in the “PIM” position as seen in the image below.

2) Short the J7 jumper to the “PIC24” setting

3) Before connecting the PIM to the Explorer 16 board, remove all attached cables from both boards. Connect the PIM to the Explorer 16 board. Be careful when connecting the boards to insure that no pins are bent or damaged during the process. Also insure that the PIM is not shifted in any direction and that all of the headers are properly aligned.

4) On the USB PICTail Plus board, short jumper JP1. Remove all other shorts on the board.

5) Connect the USB PICTail Plus board to either of the female PICTail Plus connectors or on the card edge connector (J9) at the edge of the Explorer 16 board.

Firmware:

To run this project, you will need to load the corresponding firmware into the devices. There are two methods available for loading the demos: Precompiled demos and source code projects.

Precompiled Demos are available in the “<Install Directory>\USB Precompiled Demos” folders. Each demo should be prefaced with the hardware platform it is compiled for. Select the file that matches the hardware that you have and the demo that you want to run. For more information about how to load a precompiled project, please see the “Getting Started – Loading a precompiled demo” guide.

The source code for this demo is available in the “<Install Directory\usb_hid_mouse_device_demo” directory. In this directory you will find all of the user level source and header files as well as project and workspace files. Find the project (*.mcp) or workspace (*.mcw) file. Compile and program the demo code into the hardware platform. For more help on how to compile and program projects, please refer to the MPLAB® IDE help available through the help menu of MPLAB IDE (Help->Topics…->MPLAB IDE).

Running the Demo:

This demo uses the hardware platform as a USB mouse, allow you to move the cursor by pressing switches on the Explorer 16 board. The demo also displays the status of the demo using the LEDs on the board. The switches and LEDs are used as follows:

Switches and LEDs:

S3 - Enable or disable mouse emulation (toggle)

S6 - Move mouse cursor left (momemtary contact)

S5 - Move mouse cursor up (momentary contact)

S4 - Invert direction of mouse move for S5 & S6 (momentary contact)

- Request remote wake up (when in sleep mode)

D9 - Mouse Emulation & Connection status:

LED On - Mouse emulation enabled

LED Off - Mouse emulation disabled

LED Blinking - Enabled and attached to USB

D6 - Remote Wakeup Status

LED On - Remote wakup enabled

LED Off - Remote wakup disabled

D5 - Device sleep status

LED On - Device is asleep

LED Off - Device is awake

## Trademarks:

The Microchip name and logo, the Microchip logo, MPLAB, and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

PICDEM and PICTail are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

Microsoft, Windows, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.