Cerebot MX7cK™ Board
Reference Manual
Revision: June 24, 2013
Note: This document applies to REV B and C of the board.
1300 Henley Court | Pullman, WA 99163
(509) 334 6306 Voice and Fax
Overview
The Cerebot MX7cK is a microcontroller
development board based on the Microchip
PIC32MX795F512L, a member of the 32-bit
PIC32 microcontroller family. It is compatible
with Digilent’s line of Pmod™ peripheral
modules, and is suitable for use with the
Microchip MPLAB
®
IDE tools. The Cerebot
MX7cK is also compatible for use with the
chipKIT™ MPIDE development environment.
ChipKIT and MPIDE is a PIC32 based system
compatible with many existing Arduino™ code
examples, reference materials and other
resources.
The Cerebot MX7cK is designed to be easy to
use and suitable for use by anyone from
beginners to advanced users for experimenting
with embedded control and network
communications application. A built in
programming/debugging circuit compatible with
the Microchip MPLAB
®
IDE is provided, so no
additional hardware is required for use with
MPLAB. The kit contains everything needed to
start developing embedded applications using
either the MPLAB
®
IDE or the MPIDE.
The Cerebot MX7cK provides 52 I/O pins that
support a number of peripheral functions, such
as UART, SPI and I
2
C™ ports as well as five
pulse width modulated outputs and five
external interrupt inputs. Its network and
communications features also include a 10/100
Ethernet interface, Full Speed USB 2.0 OTG
interface, and dual CAN network interfaces.
Ten of the I/O pins can be used as analog
inputs in addition to their use as digital inputs
and outputs.
The Cerebot MX7cK can be powered in
various ways via USB, or using an external
AC-DC power adapter.
Cerebot MX7cK Circuit Diagram
Doc: 502-223
page 1 of 36
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX7cK Reference Manual
Functional Description
The Cerebot MX7cK is designed for embedded
control and network communications
applications as well as for general
microprocessor experimentation. Firmware
suitable for many applications can be
downloaded to the Cerebot MX7cK’s
programmable PIC32 microcontroller.
Features of the Cerebot MX7cK include:
a PIC32MX795F512L microcontroller
support for programming and
debugging within the Microchip MPLAB
development environment
support for programming within the
chipKIT MPIDE development
environment
six Pmod connectors for Digilent
peripheral module boards
10/100 Ethernet
USB 2.0 compatible Device, Host, and
OTG support
two CAN network interfaces
three push buttons
four LEDs
multiple power supply options, including
USB powered
ESD protection and short circuit
protection for all I/O pins.
two analog comparators
The Cerebot MX7cK has a number of
input/output connection options, and is
designed to work with the Digilent line of Pmod
peripheral modules that provide various input
and output functions. For more information,
see
www.digilentinc.com.
In addition to the
Pmod connectors, the board provides three
push buttons and four LEDs for user I/O, as
well as providing connections for two I
2
C
busses. A serial EEPROM is provided on one
of the I
2
C busses.
The Cerebot MX7cK features a flexible power
supply system with a number of options for
powering the board as well as powering
peripheral devices connected to the board. It
can be USB powered via the debug USB port,
the USB UART serial port, or the USB device
port. It can also be powered from an external
5V power supply.
Programming Tools
The Cerebot MX7cK can be used with either
the Microchip MPLAB
®
development
environment or the chipKIT MPIDE
development environment. When used with the
MPLAB
®
IDE, in-system-programming and
debugging of firmware running on the
PIC32MX795 microcontroller is supported
using an on-board programming/debugging
circuit licensed from Microchip.
The Cerebot MX7cK is immediately useable
with either the MPLAB IDE or the chipKIT
MPIDE. No additional hardware is required to
use the board with the Microchip MPLAB tools.
Features of the PIC32MX795F512L include:
512KB internal program flash memory
128KB internal SRAM memory
USB 2.0 compliant full-speed On-The-
Go (OTG) controller with dedicated
DMA channel
10/100 Ethernet controller
two CAN network controllers
up to four serial peripheral interfaces
(SPI)
up to six UART serial interfaces
up to four I2C serial interfaces
five 16-bit timer/counters
five timer capture inputs
five compare/PWM outputs
sixteen 10-bit analog inputs
Using the Cerebot MX7cK with
Microchip Development Tools
The Microchip MPLAB
®
IDE or the MPLAB
®
X
IDE can be used to program and debug code
running on the Cerebot MX7cK board using the
built-in programming/debugging circuit.
The MPLAB development environment can be
downloaded from the Microchip web site. This
software suite includes a free evaluation copy
page 2 of 36
www.digilentinc.com
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX7cK Reference Manual
of the Microchip C32 compiler for use with the
PIC32 microcontroller family. The licensed
debugger is compatible with the MPLAB IDE
version 8.63 or later or all versions of MPLAB
X.
When creating a new project, use the
“Configure.Select Device…”
menu to specify the
PIC32 device being used. Ensure that the
device is set to PIC32MX795F512L.
In order to use the on-board
programming/debugging circuit it must be
selected as the debugger or programmer
within the MPLAB IDE. Use the
“Debugger.Select
Tool”
menu, or the
“Programmer.Select
Tool”
menu, and select
“Licensed Debugger”
as the programmer or
debugger.
The licensed debugger interface uses USB
connector J15, labeled DEBUG. Connector
J15 is a USB micro-B connector located on the
left side of the board below the Ethernet RJ45
connector. Use a USB-A to micro-B cable
(provided with the board) to connect to an
available USB port on the PC.
When the licensed debugger is selected as the
programming or debugging device, the MPLAB
IDE will check the version number of the
firmware running on the debugger and offer to
update if it is out of date with the version of
MPLAB being used.
The PIC32 in-system programming/debugging
interface uses two pins on the microcontroller.
These devices support two alternate pin pairs
for this interface: PGC1/PGD1 or PGC2/PGD2.
The PGC2/PGD2 pair is used by default. Due
to conflicting uses of the microcontroller pins,
the Cerebot MX7cK is designed to use the
PGC1/PGD1 pair of pins. Because of this, it is
necessary to select the use of PGC1/PGD1 for
the debugging interface. This is done using
configuration variables set using the
#pragma
config
statement. The following statement
must be used to configure the microcontroller
for use with the on-board licensed debugger
circuit:
www.digilentinc.com
#pragma config ICESEL = ICS_PGx1
The MPLAB IDE may report an error indicating
that the device is not configured for debugging
until a program containing this statement has
been programmed into the board.
The MCLR pin on the PIC32 microcontroller is
used by the hardware programming/debugging
interface to reset the processor. This same pin
is used by the USB serial converter to reset the
processor when using the MPIDE. It is possible
that the reset function from the USB serial
interface can interfere with correct operation of
the Microchip programming and debugging
tools. If this happens, jumper JP11 can be
used to disconnect the USB serial converter
reset circuit. Remove the shorting block from
JP11 to disable the reset circuit. If the shorting
block has been removed, it is necessary to
reinstall it on JP11 in order to use the Cerebot
MX7cK board with the MPIDE again.
Using the Microchip development tools to
program the Cerebot MX7cK will erase the
chipKIT boot loader. To use the board with the
chipKIT MPIDE again, it is necessary to
program the boot loader back onto the board.
The programming file for the boot loader
programmed into the board by Digilent at the
factory is available for download from the
product page for the Cerebot MX7cK on the
Digilent web site. Additionally, the boot loader
source code is available in the chipKIT project
repository at
www.github.com/chipKIT32/pic32-
Arduino-Bootloader.
To reprogram the boot loader using MPLAB,
perform the following steps:
Use the
“Configure.Select Device …”
menu to
select the PIC32MX795F512L
Use the
“Programmer.Select Programmer”
menu to select the
“Licensed Debugger”.
Use the
“File Import…”
dialog box to
navigate to and select the boot loader
programming downloaded from the Digilent
web site. The file name will be something
like: chipKIT_Bootloader_MX7cK.hex
Use the
“Programmer.Program”
command to
program all memories on the device.
page 3 of 36
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX7cK Reference Manual
Using the Cerebot MX7cK with the
chipKIT MPIDE
ChipKIT and the MPIDE is a PIC32 based
hardware and software system compatible with
many existing Arduino
™
code examples,
reference materials and other resources. The
MPIDE development platform was produced by
modifying the Arduino™ IDE and is fully
backward compatible with the Arduino IDE.
The Cerebot MX7cK board is designed to be
fully compatible with the chipKIT MPIDE
system, version 20111221 or later.
The MPIDE uses a serial communications port
to communicate with a boot loader running in
the target board. The serial port on the MX7cK
board is implemented using an FTDI FT232R
USB serial converter. Before attempting to use
the MPIDE with the MX7cK, the appropriate
USB device driver must be installed.
The USB serial converter on the Cerebot
MX7cK uses USB connector J2, labeled UART
on the board. This connector is a USB micro-
AB, and is located on the lower left side of the
board adjacent to the power switch. Use a
standard USB-A to micro-B cable (provided
with the board) to connect the board to an
available USB port on the PC.
In the MPIDE, use the
“Tools.Board”
command
to select the Cerebot MX7cK from the list of
available boards. Use the
“Tools.Serial Port”
command to choose the appropriate serial port
from the list of available serial ports on the PC.
When the MPIDE needs to communicate with
the MX7cK board, the PIC32 microcontroller is
reset and starts running the boot loader. The
MPIDE then establishes communications with
the boot loader and downloads the user’s
program, programming it into the flash memory
in the microcontroller
When the MPIDE opens the serial
communications connection on the PC, the
DTR pin on the FT232R chip is driven low.
This pin is coupled through a capacitor to the
MCLR pin on the PIC32 microcontroller.
www.digilentinc.com
Driving the MCLR line low resets the
microcontroller, restarting execution with the
boot loader.
The automatic reset action when the serial
communications connection is opened can be
disabled. To disable this operation, remove the
shorting block from jumper JP11. The shorting
block is reinstalled on JP11 to restore
operation with the MPIDE.
Two red LEDs (LD9 and LD10) will blink when
data is being sent or received between the
Cerebot MX7cK and the PC over the serial
connection.
The header connector J1 provides access to
the other serial handshaking signals provided
by the FT232R. Connector J1 is not loaded at
the factory but can be installed by the user to
access these signals.
Additional Reference Documentation
Additional information about the Cerebot
MX7cK board and the use and operation of the
PIC32MX795F512L microcontroller can be
obtained from the following sources.
The Cerebot MX7cK Schematic, as well as
various support libraries, and example
reference designs are available on the board
product page on the Digilent web site:
www.digilentinc.com
The PIC32MX5XX/6XX/7XX Family Data
Sheet and the PIC32MX Family Reference
Manual available from the Microchip web site:
www.microchip.com
Reference material for the chipKIT MPIDE
system is included in the MPIDE software
download, and on-line in the chipKIT wiki. Help
with questions and problems using the board
with the chipKIT MPIDE software can also be
obtained in the chipKIT forums:
www.github.com/chipKIT32
(software
download)
www.chipKIT.org/wiki
www.chipKIT.org/forum
page 4 of 36
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX7cK Reference Manual
Board Hardware Description
The following describes the various hardware
features of the Cerebot MX7cK board and the
PIC32XM795F512L microcontroller.
Board Power Supply
Switch SW1, in the lower left corner of the
board is the power switch. Place this switch in
the ON position to turn on board power and in
the OFF position to turn off board power.
The Cerebot MX7cK may be USB powered via
either the USB debug port, the USB UART
port, or the USB device port. Alternatively, the
board may be powered via dedicated,
“external”, power supply connectors.
Jumper block J3 selects the power source
used to provide power to the board. This
jumper block provides the following four
positions:
USB – power is supplied by USB device
connector J19. This is used when the
Cerebot MX7cK is being used to implement
a USB bus powered device.
EXT – Power is supplied by one of the
external power connectors.
DBG – Power is supplied by DEBUG USB
connector J15.
UART – Power is supplied by UART USB
connector J2.
Place the shorting block in the appropriate
position on J3 for the desired power source for
the board.
The Cerebot MX7cK is rated for external power
from 3.6 to 5.5 volts DC. Using a voltage
outside this range will damage the board and
connected devices. For most purposes, when
using external power, a regulated 5V supply
should be used. If the board is operated from
an external supply with a voltage less than 5V,
some features won’t work correctly.
The USB specification requires that USB
devices not draw more than 100mA of current
www.digilentinc.com
until they have enumerated on the USB bus
and informed the host that they want to
consume more current. To meet this
specification, the debugger circuit turns on
main board power by driving the PWR_ON
signal high after successfully enumerating on
the USB bus. The bus labeled on the
schematic as VCC5V0 is powered when this
occurs. The VCC5V0 bus powers the input to
the main board voltage regulator, the input
voltage to the USB bus voltage load switch
used when using the board as a USB host, the
power supply voltage for the CAN transceivers,
and the 5V0 side of the power select jumpers
for the Pmod connectors. The voltage on the
VCC5V0 bus will be 5V when the board is
being operated from USB power or an external
regulated 5V supply. If a different external
supply voltage is used, that voltage will appear
on the VCC5V0 bus.
The power supply selected by the shorting
block on J3 will appear on the input power
supply bus, labeled VIN in the schematic. This
voltage is regulated to 3.3V to power the
licensed debugger circuit by IC11, a Microchip
MCP1801 Low Dropout voltage regulator. This
regulator is turned on and the debugger circuit
is powered whenever the power switch is in the
on position. The VIN power bus also supplies
power to IC9, a PFET load switch used to turn
main board power on or off.
When the power switch is turned on, transistor
Q7A attempts to drive the ON/OFF pin of IC9
high to enable the main power supply.
If the licensed debugger is connected to an
active USB port, it initially disables the main
power supply by holding the PWR_ON signal
low. This causes Q8B to hold the ON/OFF pin
of IC9 low, forcing the main supply off. The
licensed debugger will enumerate with the host
computer and once it has successfully
enumerated, will turn on the main board power
supply by driving the PWR_ON signal high.
If the licensed debugger is not connected to an
active USB port, the signal labeled DBG5V0
will not be powered. Transistor Q8B will be
unable to hold the ON/OFF pin low and the
page 5 of 36
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.