beautypg.com

Digilent 410-295P-KIT User Manual

Page 6

background image

ChipKIT Pro MX4 Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 6 of 37

file for the boot loader that was programmed into the board by Digilent at the factory is available for download
from the ChipKIT Pro MX4 product page 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”.
• 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_MX4.hex

• Use the “Programmer.Program” command to program all memories on the device.

2.2 Using ChipKIT Pro MX4 with 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 ChipKIT Pro MX4 board is designed to be fully compatible with the 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 MX4 board is implemented using an FTDI FT232R USB serial converter. Before attempting to use

the MPIDE to communicate with the MX4, the appropriate USB device driver must be installed.

The USB serial converter on the ChipKIT Pro MX4 board uses USB connector J8, labeled UART on the board. This

connector is a micro-USB located next to screw terminal connector J5. Use a standard USB-A to mini-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 ChipKIT Pro MX4 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 MX4 board, the PIC32 microcontroller 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 JP8. The shorting block is reinstalled on JP8 to restore operation

with the MPIDE.

Two red LEDs (LD7 and LD8) will blink when data is being sent or received between the ChipKIT Pro MX4 and the

PC over the serial connection.

The header connector J7 provides access to the other serial handshaking signals provided by the FT232R.

Connector J7 is not loaded at the factory but can be installed by the user to access these signals.