![Digilent Cerebot MX7cK REV B Reference Manual Download Page 14](http://html1.mh-extra.com/html/digilent/cerebot-mx7ck-rev-b/cerebot-mx7ck-rev-b_reference-manual_2497465014.webp)
Cerebot MX7cK Reference Manual
www.digilentinc.com
page 14 of 34
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
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.
When operating as a USB host, the
PIC32MX795 microcontroller controls
application of power to the connected device
via the VBUSON control pin. The VBUSON
signal is connected to the circuit net labeled
P32_VBUSON in the schematic. Bus power is
applied to the attached USB device by driving
the VBUSON pin high. Power is removed from
the device by driving the VBUSON pin low.
The VBUSON pin is accessed via bit 3 of the
U1OTGCON register.
The VBUSON pin drives the enable input of a
Texas Instruments TPS2051B Current-Limited
Power Distribution Switch to control the
application of USB power to the host
connector. This switch has over-current
detection capability and provides an over-
current fault indication by pulling the signal
P32_USBOC low. The over-current output
indication can be monitored via I/O Port D pin
13 (RD13) on the PIC32MX795
microcontroller. This pin can function as
change notification pin 19 (CN19), so that a
change notification interrupt can be used to
detect the overcurrent condition.
Details about the operation of the TPS2051B
can be obtained from the data sheet available
at the Texas Instruments web site.
The Microchip Applications Library, MAL,
available on the Microchip web site contains
USB driver code for implementing either USB
host devices or USB function devices. This
library contains numerous examples
demonstrating both device and host operation
of PIC32 microcontrollers. With minor
modification or configuration, these reference
designs are suitable to use for developing USB
firmware for the Cerebot MX7cK board.
Digilent has USB libraries available that can be
used to develop both USB device and USB
host applications when using the board with
the chipKIT MPIDE development environment.
These libraries are built on a custom version of
the Microchip Applications Library and can be
downloaded from the Cerebot MX7cK product
page on the Digilent web site.
The Digilent chipKIT libraries contain examples
illustrating various USB host and device
applications.
CAN Interface
The Controller Area Network (CAN) is a control
networking standard originally developed for
use in automobile systems, but has since
become a standard used in various industrial
control and building automation networking
applications as well.
The PIC32MX795 microcontroller contains two
independent CAN network controllers. These
CAN controllers in combination with two
Microchip MCP2551 CAN transceivers allow
the Cerebot MX7cK board to operate on up to
two independent CAN networks. Refer to the
PIC32MX5XX/6XX/7XX Family Data Sheet
and the PIC32 Family Reference Manual,
Section 34, Controller Area Network (CAN),
plus CAN network documentation for
information on operation of the CAN controllers
and CAN networking in general.
The Microchip C32 peripheral library, plib,
provides basic support for all CAN operations
using the CAN controllers in the PIC32MX795
microcontroller.
Digilent has a basic CAN library available for
use with the chipKIT MPIDE software
environment. This library can be downloaded
from the Cerebot MX7cK product page on the
Digilent web site.
The PIC32MX795 microcontroller provides two
sets of pins that can be used to connect the
CAN controllers to the external transceivers.
The Cerebot MX7cK is designed to use the
alternate (not the standard) pins. This selection
is made using the configuration variables in the
microcontroller, set using a
#pragma config
statement. To select the use of the alternate