The Cerebot MX3cK is a microcontroller
development board based on the Microchip
PIC32MX320F128H, 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
MX3cK 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 MX3cK is designed to be easy to
use and suitable for use by anyone from
beginners to advanced users for experimenting
with electronics and embedded control
systems. It is intended to be used with either
the Multi-Platform IDE, (modified Arduino IDE),
MPIDE, or the Microchip MPLAB IDE. The kit
contains everything needed to start developing
embedded applications using the MPIDE. In
order to use the MPLAB IDE, an additional
programming/debugging device, such as a
Microchip PICkit3 is required.
The Cerebot MX3cK provides 42 I/O pins that
support a number of peripheral functions, such
as UART, SPI and I2C™ ports as well as five
pulse width modulated outputs and five
external interrupt inputs. Eleven of the I/O pins
can be used as analog inputs in addition to
their use as digital inputs and outputs.
The Cerebot MX3cK can be powered via USB,
or an external power supply that may be either
an AC-DC power adapter, or batteries.
Specifications
Microcontroller: PIC32MX320F128H
Flash Memory: 128K
RAM Memory: 16K
Operating Voltage: 3.3V
Max Operating Frequency: 80Mhz
Typical operating current: 75mA
Input Voltage (recommended): 7V to 15V
Input Voltage (maximum): 20V
I/O Pins: 42 total
Analog Inputs: 12
Analog input voltage range: 0V to 3.3V
DC Current per pin: +/-18mA
1300 NE Henley Court, Suite 3
Pullman, WA 99163
(509) 334 6306 Voice | (509) 334 6300 Fax
Doc: 502-227 page 1 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
Programming Tools
The Cerebot MX3cK is designed to be used
with either the Multi-Platform IDE (MPIDE), the
development software environment used with
the chipKIT™ system, or as a more traditional
microcontroller development platform using the
Microchip MPLAB® IDE and development
tools. The Cerebot MX3cK if fully compatible
with Microchip development tools that support
the PIC32 family of microcontrollers.
The Cerebot MX3cK is immediately useable
with the chipKIT MPIDE. Additional hardware
is required to use the Microchip MPLAB tools.
Using the Cerebot MX3cK 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 MX3cK board is designed to be
fully compatible with the chipKIT MPIDE
system, version 20111209 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 MX3cK
board is implemented using an FTDI FT232R
USB serial converter. Before attempting to use
the MPIDE to communicate with the MX3cK,
the appropriate USB device driver must be
installed.
The Cerebot MX3cK board uses a standard
mini-USB connector for connection to a USB
port on the PC. Use a standard USB-A to miniB cable (not provided) to connect the board to
an available USB port on the PC.
In the MPIDE, use the “Tools.Board” command
to select the Cerebot MX3cK 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 MX3cK board, the board is reset and starts
running the boot loader. The MPIDE then
establishes communications with the boot
loader and downloads the program to the
board.
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.
Driving the MCLR line low resets the
microcontroller, restarting execution with the
boot loader.
Once the MPIDE has established
communication with the boot loader, it
transfers the user’s program to the boot loader,
which programs it into the flash memory in the
Microcontroller.
The automatic reset action when the serial
communications connection is opened can be
disabled. To disable this operation, remove the
shorting block from jumper JP1. It is also
possible that it will interfere with the operation
of the MPLAB IDE and a Microchip hardware
programmer/debugger. In this case, also, the
shorting block should be removed from JP1.
The shorting block is reinstalled on JP1 to
restore operation with the MPIDE.
Two red LEDs (LD1 and LD2) will blink when
data is being sent or received between the
Cerebot MX3cK and the PC over the serial
connection.
The header connector J3 provides access to
the other serial handshaking signals provided
by the FT232R. Connector J3 is not loaded at
the factory but can be installed by the user to
access these signals.
www.digilentinc.com page 2 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
Using the Cerebot MX3cK with
Microchip Development Tools
In addition to being used with the MPIDE, the
Cerebot MX3cK can be used as a more
traditional microcontroller development board
using Microchip Development Tools.
The Microchip MPLAB® IDE or the MPLAB® X
IDE can be used to program and debug code
running on the Cerebot MX3cK board. These
programs can be downloaded from the
Microchip web site. These software suites
include a free evaluation copy of the Microchip
C32 compiler for use with the PIC32
microcontroller family.
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 PIC32MX320F128H.
Programming and debugging a program on the
Cerebot MX3cK using the MPLAB IDE requires
the use of external programming hardware.
Typically, this will be a Microchip PICkit™3, but
can be any other tool that supports the same
connection interface as the PICkit3 and
supports the PIC32MX3XX processor family.
Connector JP3 on the left side of the board is
used to connect to the Microchip hardware
development tool. This connector is not loaded
at the factory, but can be installed by the user
if desired. The holes for JP3 are staggered so
that a standard, 100mil spaced, 6-pin header
can be press fit to the board without the need
to solder it in place. The connector at JP3 can
be soldered in place if desired for a more
reliable permanent connection.
Typically, a right angle male connector will be
used in JP3 so that a PICkit3 can be attached
coplanar with the Cerebot MX3cK board. If the
connector is loaded from the top, the PICkit3
will be upright (button and LEDs visible).
Alternatively, the connector can be loaded from
the bottom. In this case, the PICkit3 will be
upside down.
If JP3 is loaded from the top, the PICkit3 will
interfere with the USB connector and the
external power connector. A short six-wire
cable can be used between the PICkit3 and
the Cerebot MX3cK. If JP3 is loaded from the
bottom, the PICkit3 won’t interfere with the
USB and external power connectors.
Digilent has a kit available (PICkit3
Programming Cable Kit) that includes all
necessary connectors and the cable for
connecting a PICkit3 to the Cerebot MX3cK.
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 JP1 can be used
to disconnect the USB serial converter reset
circuit. Remove the shorting block from JP1 to
disable the reset circuit. If the shorting block
has been removed, it is necessary to reinstall it
on JP1 in order to use the Cerebot MX3cK
board with the MPIDE again.
Using the Microchip development tools to
program the Cerebot MX3cK will erase the
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 MX3cK 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 PIC32MX320F128H
www.digilentinc.com page 3 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
• Use the “Programmer.Select Programmer”
menu to select the “PICkit3” or other hardware programming tool being used.
• 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_MX3ck.hex
• Use the “Programmer.Program” command to
program all memories on the device.
Additional Reference Documentation
For additional information about the Cerebot
MX3cK board and the use and operation of the
PIC32MX320F128H microcontroller, refer to
the following documents in addition to this
reference manual.
The Cerebot MX3cK Schematic, available on
the Cerebot MX3cK product page on the
Digilent web site: www.digilentinc.com
The PIC32MX3XX/4XX Family Data Sheet and
the PIC32MX Family Reference Manual
available from the Microchip web site:
www.microchip.com
Additional 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
www.digilentinc.com page 4 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
Board Hardware Description
The following describes the various features of
the Cerebot MX3cK hardware and the
PIC32XM320F128H microcontroller.
Power Supply
It will get noticeably warm when the current
consumed by the VCC3V3 bus is close to the
500mA maximum.
The 5V power bus, VCC5V0 can be powered
from one of three sources: 1) The USB5V0 bus
when the board is operating under USB power;
2) The output of the on-board 5V regulator
The Cerebot MX3cK is designed to be
powered either from USB or from an external
power supply. There is an automatic
switchover circuit that causes the external
supply to be used if both supplies are present.
The power supply section uses two voltage
regulators. The first regulates the external
voltage to 5V to power the VCC5V0 bus. The
second regulates the VCC5V0 bus to 3.3V to
provide power to the VCC3V3 bus that powers
the PIC32 microcontroller.
The 5V voltage regulator, IC2, is normally an
NCP1117. The board is designed to be able to
also use an LM1117, but the NCP1117 is the
part normally used. The NCP1117 is rated for
an output current of 1A (the LM1117 is rated
for 800mA). The dropout voltage of the
NCP1117 is a maximum of 1.2V at the rated
output current (1.3V for the LM1117). There is
a reverse polarity protection diode in the
external power supply circuit. Considering the
diode drop plus the forward drop across the
regulator, the minimum input voltage to the
regulator should be 7V to produce a reliable 5V
output. The absolute maximum input voltage of
both the NCP1117 and the LM1117 is 20V.
The recommended maximum operating
voltage is 15V. For input voltages above 9V,
the regulator will get extremely hot when
drawing high currents. Both the NCP1117 and
the LM1117 have output short circuit protection
and internal thermal protection and will shut
down automatically to prevent damage.
The 3.3V regulator, IC3, is a Microchip
MCP1725. This regulator is rated for a
maximum output current of 500mA. The
absolute maximum input voltage for the
MCP1725 is 6V. This regulator has internal
when operating from an external 7V–15V
supply; or 3) Directly from the external supply
when operating from a regulated 5V external
supply and jumper JP2 is in the BYP position.
Switchover from USB power to external power
is done automatically and the external supply
will be used if both are present.
Jumper JP2 is used to route the external
power supply voltage through the on-board 5V
regulator or directly to the VCC5V0 bus,
bypassing the on-board 5V regulator.
Normally, JP2 should be in the REG position.
This routes the external supply through the 5V
regulator. Operation from an externally
regulated 5V supply is accomplished by
placing the jumper in the BYP position.
The forward drop across the MCP1725 is
typically 210mV (350mV max) at 500mA
output. With JP2 in the BYP position, this will
allow correct operation of the 3.3V power
supply from an input voltage down to 3.5V.
This allows powering the board from batteries
and other lower voltage power sources. In this
case, the VCC5V0 power bus will not be
powered at 5V.
NOTE: It is extremely important to observe the
MCP1725 maximum input voltage rating of 6V
when JP2 is in the BYP position. Applying
more than 6V to the external power input with
the jumper in the BYP position can damage the
3.3V regulator and possibly the PIC32
microcontroller as well.
The PIC32 microcontroller is rated to use a
maximum of 75mA of current when operating
at 80Mhz. This allows up to 425mA from the
VCC3V3 bus and up to 925mA from the
VCC5V0 bus to power external devices. The
short circuit protection and thermal protection.
www.digilentinc.com page 5 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
combined power used by the VCC5V0 bus and
the VCC3V3 bus should not exceed 925mA.
The Cerebot MX3cK can provide power to any
peripheral modules attached to the Pmod
connectors, JA-JE, and to I2C devices
connected to the I2C daisy chain connector,
J2. Each Pmod connector provides power pins
that can be powered from either the switched
main power bus, VCC5V0, or the regulated
voltage, VCC3V3, by setting the voltage
jumper block to the desired position.
The I2C power connector only provides 3.3V
from the VCC3V3 bus.
It is also possible to power the Cerebot MX3cK
from any one of the Pmod connectors or the
I2C connector. When powering the board from
a Pmod connector with the power select
jumper in the 5V0 position, a voltage applied at
the Pmod connector will power the VCC5V0
bus and be regulated to 3.3V for the VCC3V3
bus. When powering the board from the I2C
connector or a Pmod connector with the power
select jumper in the 3V3 position, only the
VCC3V3 bus will be powered and the VCC5V0
bus will not be powered.
Pmod™ Connectors
The Cerebot MX3cK has five connectors for
connecting Digilent Pmod peripheral modules.
The Pmod connectors, labeled JA–JF, are 2x8
right-angle, female pin header connectors.
Each connector has an associated power
select jumper block labeled JPA–JPF.
Digilent Pmods are a line of small peripheral
modules that provide various kinds of I/O
interfaces. The Pmod product line includes
such things as button, switch and LED
modules, connector modules, LCD displays,
high current output drivers, and many others.
There are two styles of Pmod connector: sixpin and twelve-pin. Both connectors use
standard pin headers with 100mil spaced pins.
The six-pin connectors have the pins in a 1x6
configuration, while the twelve-pin connectors
use a 2x6 configuration. All of the Pmod
connectors on the Cerebot MX3cK are twelve
pin connectors.
The six-pin connectors provide four I/O signals,
ground and a switchable power connection.
The twelve-pin connectors provide eight I/O
signals, two power and two ground pins. The
twelve-pin connectors have the signals
arranged so that one twelve-pin connector is
equivalent to two of the six-pin connectors.
Pins 1–4 and 7–10 are the signal pins, pins 5
and 11 are the ground pins and pins 6 & 12 are
the power supply pins.
The pin numbering that Digilent uses on the
twelve-pin Pmod connectors is non-standard.
The upper row of pins are numbered 1–6, left
to right (when viewed from the top of the
board), and the lower row of pins are
numbered 7–12, left to right. This is in keeping
with the convention that the upper and lower
rows of pins can be considered to be two sixpin connectors stacked. When viewed from the
end of the connector, pin 1 is the upper right
pin and pin 7 is immediately below it (closer to
the PCB).
Each Pmod connector has an associated
power select jumper. These are used to select
the power supply voltage supplied to the power
supply pin on the Pmod connector. They are
switchable between either the regulated 5V
power supply or the 3.3V main board supply.
Place the shorting block in the 3V3 position for
regulated 3.3V and in the 5V0 position for
regulated 5V. Note that the 5V0 position will
supply the unregulated input supply if the
regulator bypass jumper JP2 is in the BYP
position.
Each signal pin on the Pmod connectors is
connected to an input/output pin on the PIC32
microcontroller. Each pin has a 200 ohm series
resistor and an ESD protection diode. The
series resistor provides short circuit protection
to prevent damaging the I/O block in the
microcontroller if the pin is inadvertently
shorted to VDD or GND, or two outputs are
shorted together. The ESD protection diode
www.digilentinc.com page 6 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Cerebot MX3cK Reference Manual
protects the I/O block from damage due to
electro-static discharge.
Although ESD protection is provided between
the connector pins and the microcontroller
pins, ESD safe handling procedures should be
followed when handling the circuit board. The
pins on the microcontroller and other circuits
on the board are exposed and can be
damaged through ESD when handling the
board.
Digilent Pmod peripheral modules can either
be plugged directly into the connectors on the
Cerebot MX3cK or attached via cables.
Digilent has a variety of Pmod interconnect
cables available.
See the Pinout Tables in Appendices B–D
below for more information about connecting
peripheral modules and other devices to the
Cerebot MX3cK. These tables indicate the
mapping between pins on the PIC32MX320
microcontroller and the pins on the various
connectors.
The PIC32 microcontroller can source or sink a
maximum of 18mA on all digital I/O pins.
However, to keep the output voltage within the
specified input/output voltage range (VOL 0.4V,
VOH 2.4V) the pin current must be restricted to
+7/-12mA. The maximum current that can be
sourced or sunk across all I/O pins
simultaneously is +/-200mA. The maximum
voltage that can be applied to any digital I/O
pin is 5.5V. For more detailed specifications,
refer to the PIC32MX3XX/4XX Data Sheet.
Digital Inputs and Outputs
The Cerebot MX3cK board provides access to
40 of the I/O pins from the PIC32
microcontroller via the Pmod connectors. Two
additional I/O pins can be accessed via the I2C
connector, J2. Any of the pins on the Pmod or
I2C connectors can be individually accessed for
digital input or output. Note that when the I2C
signals on J2 are being used for I2C
communications, they are not available for
general purpose I/O.
On PIC32 microcontrollers, the input/output
pins are grouped into I/O Ports and are
accessed via peripheral registers in the
microcontroller. There are seven I/O Ports
numbered A–G and each is 16 bits wide.
Depending on the particular PIC32
microcontroller, some of the I/O Ports are not
present, and not all 16 bits are present in all
I/O Ports.
Each I/O Port has four control registers: TRIS,
LAT, PORT, and ODC. The registers for I/O
Port A are named TRISA, LATA, PORTA and
ODCA. The registers for the other I/O Ports are
named similarly.
The TRIS register is used to set the pin
direction. Setting a TRIS bit to 0 makes the pin
an output. Setting the TRIS bit to 1 makes the
pin an input.
The LAT register is used to write to the I/O
Port. Writing to the LAT register sets any pins
configured as outputs. Reading from the LAT
register returns the last value written.
The PORT register is used to read from the I/O
Port. Reading from the PORT register returns
the current state of all of the pins in the I/O
Port. Writing to the PORT register is equivalent
to writing to the LAT register.
PIC32 microcontrollers allow any pin set as an
output to be configured as either a normal
totem-pole output or as an open-drain output.
The ODC register is used to control the output
type. Setting an ODC bit to 0 makes the pin a
normal output and setting it to 1 makes the pin
a open drain output.
Refer to the PIC32MX3XX/4XX Family Data
Sheet, and the PIC32 Family Reference
Manual, Section 12, IO Ports, for more detailed
information about the operation of the I/O Ports
in the microcontroller.
The chipKIT MPIDE system uses logical pin
numbers to identify digital I/O pins on the
www.digilentinc.com page 7 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Loading...
+ 16 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.