Digilent MX4cK User Manual
Page 3

Cerebot MX4cK Reference Manual
www.digilentinc.com
page 3 of 35
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
copy 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.
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 PIC32MX460F512L.
In order to use the on-board program/debug
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 J9, labeled DEBUG. Connector J9 is
a USB micro-B 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 it if is out of date with the version of
MPLAB being used.
The in-system programming/debugging
interface uses two pins on the PIC32
microcontroller. The PIC32 devices support
two alternate pin pairs for this interface:
PGC1/PGD1 or PGC2/PGD2. PIC32 devices
use PGC2/PGD2 by default. The Cerebot
MX4ck is designed to use PGC2/PGD2. It is
not normally necessary to select the use of
PGC2/PGD2 for the debugging interface, as
this should occur automatically.
If for some reason, it is necessary to select the
correct pins for the programming/debugging
interface, this can done using configuration
variables set using the
#pragma config
statement. The following statement can be
used to configure the microcontroller for use
with the on-board licensed debugger circuit:
#pragma config ICESEL = ICS_PGx2
The MPLAB IDE may report an error indicating
that the device is not configured for debugging
until the first time a program is loaded onto 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 JP8 can be used
to disconnect the USB serial converter reset
circuit. Remove the shorting block from JP8 to
disable the reset circuit. If the shorting block
has been removed, it is necessary to reinstall it
on JP8 in order to use the Cerebot MX4cK
board with the MPIDE again.
Using the Microchip development tools to
program the Cerebot MX4cK 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 MX4cK 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 PIC32MX460F512L
• Use the “Programmer.Select Programmer”
menu to select the “Licensed Debugger”.