beautypg.com

Digilent MX7cK User Manual

Page 3

background image

Cerebot MX7cK Reference Manual

www.digilentinc.com

page 3 of 36

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

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:

#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.