Datasheet

Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 13 of 35
7 USB Interface
The PIC32MX795 microcontroller contains a USB 2.0 Compliant, Full Speed Device and On-The-Go (OTG) controller.
This controller provides the following features:
USB full speed host and device support
Low speed host support
USB OTG support
Endpoint buffering anywhere in system RAM
Integrated DMA to access system RAM and Flash memory.
The USB controller uses a phased lock loop, PLL, to generate the necessary USB clock frequency from the external
primary oscillator input frequency. By default, this PLL is disabled. In order to use the USB controller, it is necessary
to enable the USB PLL, and set the input divider to the correct value to generate a valid USB clock. The input to the
USB PLL must be 4 MHz. The chipKIT Pro MX7 provides an 8 MHz clock to the PIC32 microcontroller, so a USB PLL
input divider value of 2 must be used. These parameters are set in the PIC32 microcontroller configuration
registers using the #pragma config statement. The following statements must be used to configure the PIC32
microcontroller for use of the USB controller:
#pragma config UPLLEN = ON
#pragma config UPLLIDIV = DIV_2
When using the MPIDE development environment these will have been set by the boot loader, so no action is
needed.
When operating as a USB device, the chipKIT Pro MX7 can be used as a self-powered device or as a bus powered
device. To operate as a self-powered device, an external power supply should be connected to one of the external
power connectors (J17 or J18) and a shorting block placed on the "EXT" position of J3. To operate as a bus powered
device, the shorting block should be placed in the USB Device position, "USB", on J3.
Note that when operating as a bus powered device, the chipKIT Pro MX7 and all devices connected to it are limited
to using no more than 500mA of current to remain in compliance with the USB specification.
Connector J19 on the bottom of the board in the lower right corner is the Device/OTG connector. This is a standard
USB micro-AB connector. Connect a cable with a micro-A plug (optionally available from Digilent) from this
connector to an available USB port on a PC or USB hub for device operation.
When operating as a USB host, the chipKIT Pro MX7 must be externally powered. Connect a regulated 5V power
supply to one of the external power connectors (J17, or J18) and ensure that the shorting block is in the, "EXT"
position of J3. The power supply used must be a regulated 5V supply. The chipKIT Pro MX7 board provides power
to the attached USB device when operating as a host and the USB specification requires the use of a 5V power
supply. NOTE: Providing a voltage greater than 5V can damage the chipKIT Pro MX7 board and/or the USB device
being used.
Connector J20 on the top of the board in the lower right corner is the USB host connector. This is a standard USB
type A receptacle. USB devices may be connected either directly or through a standard USB cable.
Jumper JP10 is used to route power to the host connector being used. Place the shorting block in the "A" position
when using the standard USB type A (host) Connector, J20. Place the shorting block in the "MICRO" position for
use with the USB micro-AB (OTG) connector, J19.