Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
chipkit_pro_mx4:refmanual [2015/03/18 18:31] – [2.2 Reloading the MPIDE boot loader] brandon marcumchipkit_pro_mx4:refmanual [2021/10/13 22:31] (current) Arthur Brown
Line 1: Line 1:
 ====== ChipKIT™ PRO MX4 Board Reference Manual ====== ====== ChipKIT™ PRO MX4 Board Reference Manual ======
-{{ :chipkit_pro_mx4:16348686721_82f8478b32_z.jpg?nolink |}}+{{:chipkit_pro_mx4:16163071870_943553623a_z.jpg?500|}}
 ---- ----
 ==== Revision History ==== ==== Revision History ====
Line 73: Line 73:
 The ChipKIT Pro MX4 has a number of input/output connection options, and is specially designed to work with the The ChipKIT Pro MX4 has a number of input/output connection options, and is specially designed to work with the
 Digilent Pmod™ line of peripheral modules to provide a variety of input and output functions. For more Digilent Pmod™ line of peripheral modules to provide a variety of input and output functions. For more
-information, see www.digilentinc.com. In addition to the Pmod connectors, the board provides eight connectors+information, see [[https://digilent.com/shop/boards-and-components/system-board-expansion-modules/pmods/|digilent.com]]. In addition to the Pmod connectors, the board provides eight connectors
 for RC hobby servos, two push button switches, and four LEDs, as well as providing connections for two I<sup>2</sup>C busses. for RC hobby servos, two push button switches, and four LEDs, as well as providing connections for two I<sup>2</sup>C busses.
  
Line 136: Line 136:
 removed, it is necessary to reinstall it on JP8 in order to use the ChipKIT Pro MX4 board with the MPIDE again. removed, it is necessary to reinstall it on JP8 in order to use the ChipKIT Pro MX4 board with the MPIDE again.
  
-==== 2.2 Reloading the MPIDE Boot Loader ==== +====2.2 Using ChipKIT Pro MX4 with MPIDE====
-Using the Microchip development tools to program the ChipKIT Pro MX4 will erase the chipKIT boot loader. To use +
-the board with the MPIDE again, it is necessary to program the boot loader back onto the board. The programming 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 X, perform the following steps: +
- +
-  - On the MX4 PRO board, move the jumper block on header J12 to the "DBG" connection, connect the USB cable to the "DEBUG" port next to the power switch, and turn the board on with the power switch. (See images above for clarification.) +
-  - Open MPLAB X, click on "File", highlight "Import", then select "HEX/ELF...(Prebuilt) File"{{ :chipkit_pro_mx4:bl_import_1.png?nolink |}} +
-  - Under "Prebuilt Filename", click on the "Browse" button to locate the boot loader file that you downloaded previously. The file name should be something like "chipKIT_Bootloader_MX4ck.hex"+
-  - Select "32-bit MCUs (PIC32)" in the "Family:" dialog box, then select the device ID "PIC32MX460F512L" in the "Device:" dialog box. +
-  - With your board connected and turned on in DBG mode, the programmer SN will load automatically under "Licensed Debugger" in the dialog box. +
-  - Click the "Next" button at the bottom.{{ :chipkit_pro_mx4:bl_file_chip.png?nolink |}} +
-  - Rename the project if you wish. The name of the .hex file is used by default. +
-  - Choose where to place your project. The file where your boot loader is located is used by default. +
-  - Click "Finish" to finalize the project file. The project will pop up in "Projects" tab on the left side of the screen.{{ :chipkit_pro_mx4:bl_name_loc.png?nolink |}} +
-  - Right-click the project name and select "Make and Program Device". The boot loader will now load to the MX4. (You may also click the button on the tool bar with the green arrow pointing down to load the project if the project has been set as the main project.) +
- +
-====2.3 Using ChipKIT Pro MX4 with MPIDE====+
 {{ :chipkit_pro_mx4:mpide.png?nolink|}} {{ :chipkit_pro_mx4:mpide.png?nolink|}}
 ChipKIT and the MPIDE is a PIC32 based hardware and software system ChipKIT and the MPIDE is a PIC32 based hardware and software system
Line 193: Line 174:
 The header connector J7 provides access to the other serial handshaking signals provided by the FT232R. 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. Connector J7 is not loaded at the factory but can be installed by the user to access these signals.
 +
 +==== 2.3 Reloading the MPIDE Boot Loader ====
 +Using the Microchip development tools to program the ChipKIT Pro MX4 will erase the chipKIT boot loader. To use
 +the board with the MPIDE again, it is necessary to program the boot loader back onto the board. The programming 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 X, perform the following steps:
 +
 +  - On the MX4 PRO board, move the jumper block on header J12 to the "DBG" connection, connect the USB cable to the "DEBUG" port next to the power switch, and turn the board on with the power switch. (See images above for clarification.)
 +  - Open MPLAB X, click on "File", highlight "Import", then select "HEX/ELF...(Prebuilt) File"{{ :chipkit_pro_mx4:bl_import_1.png?nolink |}}
 +  - Under "Prebuilt Filename", click on the "Browse" button to locate the boot loader file that you downloaded previously. The file name should be something like "chipKIT_Bootloader_MX4ck.hex".
 +  - Select "32-bit MCUs (PIC32)" in the "Family:" dialog box, then select the device ID "PIC32MX460F512L" in the "Device:" dialog box.
 +  - With your board connected and turned on in DBG mode, the programmer SN will load automatically under "Licensed Debugger" in the dialog box.
 +  - Click the "Next" button at the bottom.{{ :chipkit_pro_mx4:bl_file_chip.png?nolink |}}
 +  - Rename the project if you wish. The name of the .hex file is used by default.
 +  - Choose where to place your project. The file where your boot loader is located is used by default.
 +  - Click "Finish" to finalize the project file. The project will pop up in "Projects" tab on the left side of the screen.{{ :chipkit_pro_mx4:bl_name_loc.png?nolink |}}
 +  - Right-click the project name and select "Make and Program Device". The boot loader will now load to the MX4. (You may also click the button on the tool bar with the green arrow pointing down to load the project if the project has been set as the main project.)
  
 ==== 2.4 Additional Tools Information ==== ==== 2.4 Additional Tools Information ====
Line 199: Line 199:
 microcontroller, refer to the following documents in addition to this reference manual. microcontroller, refer to the following documents in addition to this reference manual.
  
-The ChipKIT Pro MX4 Schematic, available on the ChipKIT Pro MX4 product page on the Digilent web site: +The ChipKIT Pro MX4 Schematic, available on the ChipKIT Pro MX4 [[/chipkit_pro_mx4:chipkit_pro_mx4#documentation|resource page]].
-www.digilentinc.com+
  
 The PIC32MX3XX/4XX Family Data Sheet and the PIC32MX Family Reference Manual available from the Microchip The PIC32MX3XX/4XX Family Data Sheet and the PIC32MX Family Reference Manual available from the Microchip
Line 309: Line 308:
 ===== 4 Pmod Connectors ===== ===== 4 Pmod Connectors =====
  
-The ChipKIT Pro MX4 has nine connectors for connecting Digilent Pmod peripheral modules. The Pmod +{{ :chipkit_pro_mx4:pmod.png?nolink&200|}}The ChipKIT Pro MX4 has nine connectors for connecting Digilent Pmod peripheral modules. The Pmod connectors, labeled JA–JF and JH–JK, are 2x8 pin right-angle, female pin header connectors. Each connector has an associated power select jumper block labeled JPA–JPF and JPH–JPK. The silkscreen next to each connector lists the function of each pin on that Pmod connector: 2 dedicated VDD pins, 2 dedicated GND pins, and 8 data pins, each assigned to a different PIC32 register as indicated.
-connectors, labeled JA–JF and JH–JK, are 2x8 pin right-angle, female pin header connectors. Each connector has an +
-associated power select jumper block labeled JPA–JPF and JPH–JPK.+
  
-Digilent Pmods are a line of small peripheral modules that provide various kinds of I/O interfaces. The Pmod +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, various kinds of RF interfaces, and many others.
-product line includes such things as button, switch and LED modules, connector modules, LCD displays, high +
-current output drivers, various kinds of RF interfaces, and many others.+
  
-There are two styles of Pmod connector: six-pin and twelve-pin. Both connectors use standard pin headers with +There are two styles of Pmod connector: six-pin 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 ChipKIT Pro MX4 are twelve pin connectors, which 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.
-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 ChipKIT Pro MX4 are twelve pin connectors.+
  
-Six-pin Pmod connectors provide four I/O signals, ground and a switchable power connection. The twelve-pin +{{ :chipkit_pro_mx4:chipkit_pmod_connector.png?nolink |}}
-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 The pin numbering that Digilent uses on the twelve-pin Pmod connectors is non-standard. The upper row of pins
Line 350: Line 340:
 attached via cables. Digilent has a variety of Pmod interconnect cables available. attached via cables. Digilent has a variety of Pmod interconnect cables available.
  
-See the Pinout Tables in Appendix C, for more information about connecting peripheral modules and other devices+See the Pinout Tables in the appendices for more information about connecting peripheral modules and other devices
 to the ChipKIT Pro MX4. These tables describe the mapping between pins on the PIC32MX460 microcontroller and to the ChipKIT Pro MX4. These tables describe the mapping between pins on the PIC32MX460 microcontroller and
 the pins on the various connectors. the pins on the various connectors.
Line 365: Line 355:
  
 The ChipKIT Pro MX4 board provides access to 72 of the I/O pins from the PIC32 microcontroller via the Pmod The ChipKIT Pro MX4 board provides access to 72 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, J6. Any of the pins on the Pmod or I2C +connectors. Two additional I/O pins can be accessed via the I<sup>2</sup>connector, J6. Any of the pins on the Pmod or I<sup>2</sup>connectors can be individually accessed for digital input or output. Note that when the I<sup>2</sup>signals on J6 are being used for I<sup>2</sup>communications, they are not available for general purpose I/O. Note that the signals on I<sup>2</sup>connector J2 are shared with pins 1 & 2 of Pmod connector JF. 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
-connectors can be individually accessed for digital input or output. Note that when the I2C signals on J6 are being +
-used for I2C communications, they are not available for general purpose I/O. Note that the signals on I2C connector +
-J2 are shared with pins 1 & 2 of Pmod connector JF. +
-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. Ports.
  
Line 377: Line 361:
 LATA, PORTA and ODCA. The registers for the other I/O Ports are named similarly. 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 +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.
-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 the output level of any pins The LAT register is used to write to the I/O Port. Writing to the LAT register sets the output level of any pins
 configured as outputs. Reading from the LAT register returns the last value written. 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 +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 an open drain output.
-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 an open drain output.+
  
 Refer to the PIC32MX3XX/4XX Family Data Sheet, and the PIC32 Family Reference Manual, Section 12, IO Ports, for 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. more detailed information about the operation of the I/O Ports in the microcontroller.
  
-The MPIDE system uses logical pin numbers to identify digital I/O pins on the connectors. These pin numbers start +You can use I/O Port assignments with MPIDE, but the MPIDE system uses logical pin numbers to identify digital I/O pins on the connectors. These pin numbers start with pin 0 and are numbered up consecutively.
-with pin 0 and are numbered up consecutively.+
  
-On the ChipKIT Pro MX4, pin numbers 0–71 are used to access the pins on the Pmod connectors and pin numbers +On the ChipKIT Pro MX4, pin numbers 0–71 are used to access the pins on the Pmod connectors and pin numbers 72 and 73 are used for the two signal pins on the I<sup>2</sup>connector, J6. The pin numbers are assigned so that  connector JA pin 1 (JA-01) is digital pin 0, JA pin 2 (JA-02) is digital pin 1, and so on. So pins 0-7 are on connector JA, pins 8-15 on JB, pins 16-23 on JC, pins 24-31 and so on. Refer to the tables in the appendices for detailed information about the pin mapping between Pmod connector, logical pin number, and PIC32 microcontroller pin number and pin function.
-72 and 73 are used for the two signal pins on the I2C connector, J6. The pin numbers are assigned so that +
-connector JA pin 1 (JA-01) is digital pin 0, JA pin 2 (JA-02) is digital pin 1, and so on.+
  
-Pins 0-7 are on connector JA, pins 8-15 on JB, pins 16-23 on JC, pins 24-31 and so on. Refer to the tables in +When using the ChipKIT Pro MX4 with the MPIDE the functions pinMode(), digitalRead(), and digitalWrite() are
-Appendix C for detailed information about the pin mapping between Pmod connector, logical pin number, and +
-PIC32 microcontroller pin number and pin function. +
- +
-When using the ChipKIT Pro MX4 with the MPIDE the functions pinMode(),  +
-digitalRead(), and digitalWrite() are+
 used for digital pin I/O. used for digital pin I/O.
  
-The pinMode() function is used to set the pin direction. Pin direction can be set to: INPUT, OUTPUT, or OPEN. +The pinMode() function is used to set the pin direction. Pin direction can be set to: INPUT, OUTPUT, or OPEN. OPEN is used for open-drain and implies output.
-OPEN is used for open-drain and implies output.+
  
-The digitalRead() and digitalWrite() functions are used to read or write the pins. DigitalRead() returns the current +The digitalRead() and digitalWrite() functions are used to read or write the pins. digitalRead() returns the  current state of the specified pin, and digitalWrite() is used to set the state of an output pin.
-state of the specified pin, and digitalWrite is used to set the state of an output pin.+
  
  
Line 417: Line 386:
  
  
-Pin 20 on the PIC32MX460 has multiple functions. It provides the VBUSON signal when the board is being used to +{{ :chipkit_pro_mx4:j16.png?nolink&200|}}Pin 20 on the PIC32MX460 has multiple functions. It provides the VBUSON signal when the board is being used to implement a USB host. It also provides the positive input for analog comparator 1, analog to digital converter input AN5, change notice interrupt CN7 and bit 5 of general I/O Port B. In order to support all of these different functions, jumper block J16 is used to select the routing of this pin.
-implement a USB host. It also provides the positive input for analog comparator 1, analog to digital converter input +
-AN5, change notice interrupt CN7 and bit 5 of general I/O Port B. In order to support all of these different +
-functions, jumper block J16 is used to select the routing of this pin.+
  
-Normally, the shorting block will be in the JJ-8 position. This connects microcontroller pin 20 to Pmod connector JJ +Normally, the shorting block will be in the JJ-8 position. This connects microcontroller pin 20 to Pmod connector JJpin 8. This allows the use of most functions of this pin.
-pin 8. This allows the use of most functions of this pin.+
  
 When the board is being used as a USB host, the shorting block is placed in the VBUSON position to allow use of When the board is being used as a USB host, the shorting block is placed in the VBUSON position to allow use of
Line 434: Line 399:
 ==== 5.2 Push Buttons and LEDs ==== ==== 5.2 Push Buttons and LEDs ====
  
-The ChipKIT Pro MX4 board provides two push button switches for user input and four LEDs for output. The +{{ :chipkit_pro_mx4:buttons.png?nolink&200|}}The ChipKIT Pro MX4 board provides two push button switches for user input and four LEDs for output. The buttons, BTN1 and BTN2 are connected to I/O pins TRCLK/RA6 and TRD3/RA7 respectively. To read the buttons, pins 6 and 7 of I/O Port A must be configured as inputs by setting the corresponding bits in the TRISA register. The button state is then obtained by reading the PORTA register. When a button is pressed, the corresponding bit will be high (‘1’). Note that the microcontroller pins used by the buttons are shared with pins 3 & 4 of Pmod connector JF. Note that the button circuitry will effectively act as a 10K ohm pull-up resistor when the button is pressed and a 20K ohm pull-down resistor when the button is not pressed. This will not interfere with most normal uses of the I/O pins if the buttons are not being used.
-buttons, BTN1 and BTN2 are connected to I/O pins TRCLK/RA6 and TRD3/RA7 respectively. To read the buttons, +
-pins 6 and 7 of I/O Port A must be configured as inputs by setting the corresponding bits in the TRISA register. The +
-button state is then obtained by reading the PORTA register. When a button is pressed, the corresponding bit will +
-be high (‘1’). Note that the microcontroller pins used by the buttons are shared with pins 3 & 4 of Pmod connector +
-JF. Note that the button circuitry will effectively act as a 10K ohm pull-up resistor when the button is pressed and a +
-20K ohm pull-down resistor when the button is not pressed. This will not interfere with most normal uses of the +
-I/O pins if the buttons are not being used.+
  
-The four LEDs are connected to bits 10-13 of I/O Port B. LED 1 is connected to bit 10, LED 2 is connected to bit 11, +{{ :chipkit_pro_mx4:leds.png?nolink&200|}}The four LEDs are connected to bits 10-13 of I/O Port B. LED 1 is connected to bit 10, LED 2 is connected to bit 1, and so on. These four bits are also shared with pins 1-4 of Pmod connector JK. To use the LEDs, set the desired bits as outputs by clearing the corresponding bits in the TRISB register. The state of an LED is set by writing values to the LATB register. Setting a bit to 1 will illuminate the LED and setting the bit to 0 will turn it off.
-and so on. These four bits are also shared with pins 1-4 of Pmod connector JK. To use the LEDs, set the desired +
-bits as outputs by clearing the corresponding bits in the TRISB register. The state of an LED is set by writing values +
-to the LATB register. Setting a bit to 1 will illuminate the LED and setting the bit to 0 will turn it off.+
  
-When using the MPIDE and the chipKIT system, the buttons are accessed using digitalRead() and the LEDs using +When using the MPIDE and the chipKIT system, the buttons are accessed using digitalRead() and the LEDs using digitalWrite(). Use the following pins to access them:
-digitalWrite(). Use the following pins to access them:+
  
   *  BTN1 – PIN_BTN1, pin 42, RA6   *  BTN1 – PIN_BTN1, pin 42, RA6
   *  BTN2 – PIN_BTN2, pin 43, RA7   *  BTN2 – PIN_BTN2, pin 43, RA7
 +
   *  LD1 – PIN_LED1, pin 64, RB10   *  LD1 – PIN_LED1, pin 64, RB10
   *  LD2 – PIN_LED2, pin 65, RB11   *  LD2 – PIN_LED2, pin 65, RB11
Line 460: Line 415:
 ==== 5.3 RC Servo Connectors ==== ==== 5.3 RC Servo Connectors ====
  
-The ChipKIT Pro MX4 provides eight 3-pin RC hobby servo connectors, labeled S1-S8, for direct control of servos in +{{ :chipkit_pro_mx4:servos.png?nolink&200|}}The ChipKIT Pro MX4 provides eight 3-pin RC hobby servo connectors, labeled S1-S8, for direct control of servos in robotics and other embedded hardware actuator applications. The connectors share the I/O pins with Pmod connector JC. Individual I/O pins may be accessed through the JC connector if they're not being used to control a servo.
-robotics and other embedded hardware actuator applications. The connectors share the I/O pins with Pmod +
-connector JC. Individual I/O pins may be accessed through the JC connector if they're not being used to control a +
-servo.+
  
-RC Servos use a pulse width modulated signal, PWM, to control the servo position. The 16-bit timers in the PIC32 +RC Servos use a pulse width modulated signal, PWM, to control the servo position. The 16-bit timers in the PIC32 microcontroller have the ability to generate PWM signals using the output compare registers. However, it is also possible to use timer interrupts to accomplish this same thing. Using timer interrupts allows a single timer to be used to control the signal timing for all eight servo connectors.
-microcontroller have the ability to generate PWM signals using the output compare registers. However, it is also +
-possible to use timer interrupts to accomplish this same thing. Using timer interrupts allows a single timer to be +
-used to control the signal timing for all eight servo connectors.+
  
-The servo connectors on the ChipKIT Pro MX4 board are intended to be driven using timer interrupts rather than +The servo connectors on the ChipKIT Pro MX4 board are intended to be driven using timer interrupts rather than directly by the pulse width modulators in the internal timers. This frees the pulse width modulators for other uses, such as DC motor speed control. Digilent has a reference design available that illustrates using timer interrupts to control signal timing for the PWM signals to control RC servos.
-directly by the pulse width modulators in the internal timers. This frees the pulse width modulators for other uses, +
-such as DC motor speed control. Digilent has a reference design available that illustrates using timer interrupts to +
-control signal timing for the PWM signals to control RC servos.+
  
-When using the MPIDE development environment, the Servo library can be used to drive servos attached to these +When using the MPIDE development environment, the Servo library can be used to drive servos attached to these connectors. The symbols PIN_S1 through PIN_S8 can be used to refer to the servo connectors being used.
-connectors. The symbols PIN_S1 through PIN_S8 can be used to refer to the servo connectors being used.+
  
 The following give the correspondence between servo connector, MPIDE digital pin number, and microcontroller The following give the correspondence between servo connector, MPIDE digital pin number, and microcontroller
Line 498: Line 443:
   *  An on-board power bus for the ChipKIT Pro MX4 (BRD_VU) and an external power bus for servos   *  An on-board power bus for the ChipKIT Pro MX4 (BRD_VU) and an external power bus for servos
  
-For the first case above: Install a shorting block on jumper JP1 to connect the VS servo power bus to the BRD_VU +{{ :chipkit_pro_mx4:servo_power.png?nolink&200|}}For the first case above: Install a shorting block on jumper JP1 to connect the VS servo power bus to the BRD_VU power bus. The servo power bus is then powered from the same source as the BRD_VU power bus. Powering a large number of servos from USB power is not recommended. Pin header jumpers and shorting blocks such as JP1 are rated for a maximum of 2A of current. USB power (J12 in the USB, DBG, or URT positions) should only be used to power a couple of servos to avoid exceeding the 500mA that a USB device is allowed to use.
-power bus. The servo power bus is then powered from the same source as the BRD_VU power bus. Powering a +
-large number of servos from USB power is not recommended. Pin header jumpers and shorting blocks such as JP1 are rated for a maximum of 2A of current. USB power (J12 in the USB, DBG, or URT positions) should only be used +
-to power a couple of servos to avoid exceeding the 500mA that a USB device is allowed to use.+
  
-For the second case above: Remove the shorting block from jumper JP2 to make the VS servo power bus +For the second case above: Remove the shorting block from jumper JP2 to make the VS servo power bus independent from the BRD_VU bus. Attach the servo power supply to screw terminal connector J5.
-independent from the BRD_VU bus. Attach the servo power supply to screw terminal connector J5.+
  
-Finally, for very high servo current applications, a separate power bus external to the ChipKIT Pro MX4 can be used +{{ :chipkit_pro_mx4:jp2.png?nolink&100|}}Finally, for very high servo current applications, a separate power bus external to the ChipKIT Pro MX4 can be used to provide servo power. In this case, remove the shorting block on JP1, tie the external servo power bus ground to the ChipKIT Pro MX4 ground through the ground terminal on J10, and use pin 1 on the servo connectors to bring the servo control signals out to the servos. The servo power and ground connections are made off-board.
-to provide servo power. In this case, remove the shorting block on JP1, tie the external servo power bus ground to +
-the ChipKIT Pro MX4 ground through the ground terminal on J10, and use pin 1 on the servo connectors to bring +
-the servo control signals out to the servos. The servo power and ground connections are made off-board.+
  
-The on-board servo power bus can be used to provide a maximum of 2A to each servo connector and 5A total to all +The on-board servo power bus can be used to provide a maximum of 2A to each servo connector and 5A total to all servo connectors.
-servo connectors.+
  
 ---- ----
Line 518: Line 455:
  
  
-The PIC32 microcontroller operates at 3.3V. And the I/O pins provide 3.3V logic levels. It is possible, in some +The PIC32 microcontroller operates at 3.3V. And the I/O pins provide 3.3V logic levels. It is possible, in some circumstances, to use the ChipKIT Pro MX4 to operate with 5V logic devices.
-circumstances, to use the ChipKIT Pro MX4 to operate with 5V logic devices.+
  
-There are two issues to consider when dealing with 5V compatibility for 3.3V logic. The first is protection of 3.3V +There are two issues to consider when dealing with 5V compatibility for 3.3V logic. The first is protection of 3.3V inputs from damage caused by 5V signals. The second is whether the 3.3V output is high enough to be recognized as a logic high value by a 5V input.
-inputs from damage caused by 5V signals. The second is whether the 3.3V output is high enough to be recognized +
-as a logic high value by a 5V input.+
  
-The digital I/O pins on the PIC32 microcontroller are 5V tolerant. It is safe to apply 5V logic signals directly to these +The digital I/O pins on the PIC32 microcontroller are all 5V tolerant. It is safe to apply 5V logic signals directly to these pins without risk of damage to the microcontroller.
-pins without risk of damage to the microcontroller.+
  
-The analog capable I/O pins on the PIC32 are not 5V tolerant. The absolute maximum voltage rating for the analog +The analog capable I/O pins on the PIC32 are not 5V tolerant. The absolute maximum voltage rating for the analog pins is 3.6V. Generally, the analog pins are the pins on I/O port B, however, there are other non-5V tolerant pins on the device.
-pins is 3.6V. Generally, the analog pins are the pins on I/O port B, however, there are other non-5V tolerant pins on +
-the device.+
  
-Refer to the PIC32MX3XX/4XX Family Data Sheet for more information about which pins on the device are 5V +See the appendices to determine which pins are 5V tolerant.
-tolerant before applying input signals higher than 3.3V to any pin on the ChipKIT Pro MX4 board.+
  
-If a 5V signal is applied to a non-5V tolerant pin, some external means must be used to limit the applied voltage to +If a 5V signal is applied to a non-5V tolerant pin, some external means must be used to limit the applied voltage to 3.6V or less. The ChipKIT Pro MX4 board provides 200 ohm series resistors between the microcontroller pins and the Pmod connector pins. These resistors are primarily intended to provide short circuit protection on the outputs, but will also provide limited protection if a 5V signal is inadvertently applied to a non-5V tolerant pin.
-3.6V or less. The ChipKIT Pro MX4 board provides 200 ohm series resistors between the microcontroller pins and +
-the Pmod connector pins. These resistors are primarily intended to provide short circuit protection on the outputs, +
-but will also provide limited protection if a 5V signal is inadvertently applied to a non-5V tolerant pin.+
  
-One technique that can be used to limit an input voltage to a safe level is to use a 200 ohm series resistor and +One technique that can be used to limit an input voltage to a safe level is to use a 200 ohm series resistor and Shottky diode connected to the 3.3V supply to clamp the voltage.
-Shottky diode connected to the 3.3V supply to clamp the voltage.+
  
-The minimum output high voltage of the PIC32 microcontroller is rated at 2.4V when sourcing 12mA of current. +The minimum output high voltage of the PIC32 microcontroller is rated at 2.4V when sourcing 12mA of current. When driving a high impedance input (typical of CMOS logic) the output high voltage will be close to 3.3V. Some 5V devices will recognize this voltage as a logic high input, and some won’t. Many 5V logic inputs will work reliably with 3.3V inputs.
-When driving a high impedance input (typical of CMOS logic) the output high voltage will be close to 3.3V. Some 5V +
-devices will recognize this voltage as a logic high input, and some won’t. Many 5V logic inputs will work reliably +
-with 3.3V inputs.+
  
-If the 3.3V logic output is not sufficient for the 5V logic input to be reliably seen as a logic high input signal, some +If the 3.3V logic output is not sufficient for the 5V logic input to be reliably seen as a logic high input signal, some external means must be used to raise the output level. In some cases, a pull-up resistor to 5V is sufficient. A pull-up resistor in the range of 2Kohm–10kOhm can be used. This technique should not be used with pins that are not 5V tolerant on the PIC32 microcontroller.
-external means must be used to raise the output level. In some cases, a pull-up resistor to 5V is sufficient. A pull-up +
-resistor in the range of 2Kohm–10kOhm can be used. This technique should not be used with pins that are not 5V +
-tolerant on the PIC32 microcontroller.+
  
 ---- ----
Line 557: Line 477:
  
  
-The PIC32 microcontroller supports numerous clock source options for the main processor operating clock. The +The PIC32 microcontroller supports numerous clock source options for the main processor operating clock. The ChipKIT Pro MX4 circuit board is designed to support either a silicon resonator from Discera, IC8, for use with the EC oscillator option, or an external crystal for use with the XT oscillator option. Standard production boards will have an 8Mhz Discera silicon resonator loaded and the EC oscillator option should be used. If IC2 is not loaded, an 8Mhz crystal will be loaded for X1 (on the top of the board) and the XT oscillator option should be used. Oscillator options are selected via the configuration variables specified using the #pragma config statement. Use 
-ChipKIT Pro MX4 circuit board is designed to support either a silicon resonator from Discera, IC8, for use with the +<code>#pragma config POSCMOD=EC</code>to select the EC option and <code>#pragma config POSCMOD=XT</code> to select the XT option.
-EC oscillator option, or an external crystal for use with the XT oscillator option. Standard production boards will +
-have an 8Mhz Discera silicon resonator loaded and the EC oscillator option should be used. If IC2 is not loaded, an +
-8Mhz crystal will be loaded for X1 (on the bottom of the board) and the XT oscillator option should be used. +
-Oscillator options are selected via the configuration variables specified using the #pragma config statement. Use +
-#pragma config POSCMOD=EC to select the EC option and #pragma config POSCMOD=XT to select the +
-XT option.+
  
-Using the internal system clock phase-locked loop (PLL), it is possible to select numerous multiples or divisions of +Using the internal system clock phase-locked loop (PLL), it is possible to select numerous multiples or divisions of the 8Mhz input frequency to produce CPU operating frequencies up to 80Mhz. The clock circuit PLL provides an input divider, multiplier, and output divider. The external clock frequency (8Mhz) is first divided by the selected input divider value. This is multiplied by the selected multiplier value and then finally divided by the selected output divider. The result is the system clock, SYSCLK, frequency. The SYSCLK frequency is used by the CPU, DMA controller, interrupt controller and pre-fetch cache.
-the 8Mhz input frequency to produce CPU operating frequencies up to 80Mhz. The clock circuit PLL provides an +
-input divider, multiplier, and output divider. The external clock frequency (8Mhz) is first divided by the selected +
-input divider value. This is multiplied by the selected multiplier value and then finally divided by the selected +
-output divider. The result is the system clock, SYSCLK, frequency. The SYSCLK frequency is used by the CPU, DMA +
-controller, interrupt controller and pre-fetch cache.+
  
-The values controlling the operating frequency are specified using the PIC32MX460 configuration variables. These +The values controlling the operating frequency are specified using the PIC32MX460 configuration variables. These are set using the #pragma config statement. Use <code>#pragma config FPLLIDIV</code> to set the input divider, 
-are set using the #pragma config statement. Use #pragma config FPLLIDIV to set the input divider, +<code>#pragma config FPLLMUL</code> to set the multiplication factor and <code>#pragma config FPLLODIV</code> to set the output divider. Refer to the PIC32MX3XX/4XX Family Data Sheet and the PIC32MX Family Reference Manual, 
-#pragma config FPLLMUL to set the multiplication factor and #pragma config FPLLODIV to set the +Section 6. Oscillators, for information on how to choose the correct values, as not all combinations of multiplication and division factors will work.
-output divider. Refer to the PIC32MX3XX/4XX Family Data Sheet and the PIC32MX Family Reference Manual, +
-Section 6. Oscillators, for information on how to choose the correct values, as not all combinations of +
-multiplication and division factors will work.+
  
-In addition to configuring the SYSCLK frequency, the peripheral bus clock, PBCLK, frequency is also configurable. +In addition to configuring the SYSCLK frequency, the peripheral bus clock, PBCLK, frequency is also configurable. The peripheral bus clock is used for most peripheral devices, and in particular is the clock used by the timers, and serial controllers (UART, SPI, I2C). The PBLCK frequency is a division of the SYSCLK frequency selected using 
-The peripheral bus clock is used for most peripheral devices, and in particular is the clock used by the timers, and +#pragma config FPBDIV. The PBCLK divider can be set to divide by 1, 2, 4, or 8 using the values DIV_1, DIV_2, DIV_4 or DIV_8.
-serial controllers (UART, SPI, I2C). The PBLCK frequency is a division of the SYSCLK frequency selected using +
-#pragma config FPBDIV. The PBCLK divider can be set to divide by 1, 2, 4, or 8 using the values DIV_1, +
-DIV_2, DIV_4 or DIV_8. +
- +
-The following example will set up the ChipKIT Pro MX4 for operation using the Discrea silicon resonator with a +
-SYSCLK frequency of 80Mhz and a PBCLK frequency of 10Mhz:+
  
 +The following example will set up the ChipKIT Pro MX4 for operation using the Discrea silicon resonator with a SYSCLK frequency of 80Mhz and a PBCLK frequency of 10Mhz:
 +<code>
 #pragma config FNOSC = PRIPLL #pragma config FNOSC = PRIPLL
- 
 #pragma config POSCMOD = EC #pragma config POSCMOD = EC
- 
 #pragma config FPLLIDIV = DIV_2 #pragma config FPLLIDIV = DIV_2
- 
 #pragma config FPLLMUL = MUL_20 #pragma config FPLLMUL = MUL_20
- 
 #pragma config FPLLODIV = DIV_1 #pragma config FPLLODIV = DIV_1
- 
 #pragma config FPBDIV = DIV_8 #pragma config FPBDIV = DIV_8
 +</code>
  
-Documentation for the PIC32 configuration variables can be found in the PIC32MX Configuration Settings guide. +Documentation for the PIC32 configuration variables can be found in the PIC32MX Configuration Settings guide. This is found using the “Help.Topics…” command in the MPLAB IDE. Also, refer to Appendix B for an example of setting the configuration variables.
-This is found using the “Help.Topics…” command in the MPLAB IDE. Also, refer to Appendix B for an example of +
-setting the configuration variables.+
  
-When using the ChipKIT Pro MX4 with the MPIDE software, the clock source is set by the boot loader and no action +When using the ChipKIT Pro MX4 with the MPIDE software, the clock source is set by the boot loader and no action is required.
-is required.+
  
 ---- ----
Line 612: Line 507:
  
  
-The PIC32MX460 microcontroller contains a USB 2.0 Compliant, Full Speed Device and On-The-Go (OTG) controller. +The PIC32MX460 microcontroller contains a USB 2.0 Compliant, Full Speed Device and On-The-Go (OTG) controller. This controller provides the following features:
-This controller provides the following features:+
  
   *  USB full speed host and device support   *  USB full speed host and device support
Line 621: Line 515:
   *  Integrated DMA to access system RAM and Flash memory.   *  Integrated DMA to access system RAM and Flash memory.
  
-The USB controller uses a phased lock loop, PLL, to generate the necessary USB clock frequency from the external +The USB controller uses a phased lock loop, PLL, to generate the necessary USB clock frequency from the external primary oscillator input frequency. By default, this PLL is disabled. In order to use the USB controller, it is necessary to enable the USB PLL, and set the input divider to the correct value to generate a valid USB clock. The input to the USB PLL must be 4Mhz. The ChipKIT Pro MX4 provides an 8Mhz clock to the PIC32 microcontroller, so a USB PLL input divider value of 2 must be used. These parameters are set in the PIC32 microcontroller configuration registers using the #pragma config statement. The following statements must be used to configure the PIC32 microcontroller for use of the USB controller: 
-primary oscillator input frequency. By default, this PLL is disabled. In order to use the USB controller, it is necessary +<code>
-to enable the USB PLL, and set the input divider to the correct value to generate a valid USB clock. The input to the +
-USB PLL must be 4Mhz. The ChipKIT Pro MX4 provides an 8Mhz clock to the PIC32 microcontroller, so a USB PLL +
-input divider value of 2 must be used. These parameters are set in the PIC32 microcontroller configuration +
-registers using the #pragma config statement. The following statements must be used to configure the PIC32 +
-microcontroller for use of the USB controller: +
 #pragma config UPLLEN = ON #pragma config UPLLEN = ON
- 
 #pragma config UPLLIDIV = DIV_2 #pragma config UPLLIDIV = DIV_2
 +</code>
 +When using the chipKIT MPIDE development environment, these will have been set by the boot loader, so no action is needed.
  
-When using the chipKIT MPIDE development environment, these will have been set by the boot loader, so no +When operating as a USB device, the ChipKIT Pro MX4 can be operated as a self-powered device or as a bus powered device. To operate as a self-powered device, an external power supply should be connected to one of the external power connectors (J13, J14 or J18) and a shorting block placed on the “EXT” position of J12. To operate as a USB bus powered device, the shorting block should be placed in the USB Device position, “USB”, on J12.
-action is needed. +
- +
-When operating as a USB device, the ChipKIT Pro MX4 can be operated as a self-powered device or as a bus +
-powered device. To operate as a self-powered device, an external power supply should be connected to one of +
-the external power connectors (J13, J14 or J18) and a shorting block placed on the “EXT” position of J12. To +
-operate as a USB bus powered device, the shorting block should be placed in the USB Device position, “USB”, on +
-J12.+
  
-Note that when operating as a bus powered device, the ChipKIT Pro MX4 and all devices connected to it are limited +Note that when operating as a bus powered device, the ChipKIT Pro MX4 and all devices connected to it are limited to using no more than 500mA of current.
-to using no more than 500mA of current.+
  
-Connector J15, on the bottom of the board in the lower right corner is the Device/OTG connector. This is a +{{ :chipkit_pro_mx4:j15.png?nolink&200|}}Connector J15, on the bottom of the board in the lower right corner is the Device/OTG connector. This is a standard USB micro-AB connector. Connect a cable with a micro-A plug (optionally available from Digilent) from this connector to an available USB port on a PC or USB hub for device operation.
-standard USB micro-AB connector. Connect a cable with a micro-A plug (optionally available from Digilent) from +
-this connector to an available USB port on a PC or USB hub for device operation.+
  
-When operating as a USB host, the ChipKIT Pro MX4 must be externally powered. Connect a regulated 5V power +When operating as a USB host, the ChipKIT Pro MX4 must be externally powered. Connect a regulated 5V power supply to one of the external power connectors (J13, J14, or J18) and ensure that the shorting block is in the center, “EXT” position of J12. The power supply used must be a regulated 5V supply. The ChipKIT Pro MX4 board provides power to the attached USB device when operating as a host, and the USB specification requires the use of a 5V power supply. NOTE: Providing a voltage greater than 5V can damage the ChipKIT Pro MX4 board and/or the USB device being used.
-supply to one of the external power connectors (J13, J14, or J18) and ensure that the shorting block is in the +
-center, “EXT” position of J12. The power supply used must be a regulated 5V supply. The ChipKIT Pro MX4 board +
-provides power to the attached USB device when operating as a host, and the USB specification requires the use of +
-a 5V power supply. NOTE: Providing a voltage greater than 5V can damage the ChipKIT Pro MX4 board and/or the +
-USB device being used.+
  
-Connector J17, on the top of the board in the lower right corner is the USB host connector. This is a standard USB +{{ :chipkit_pro_mx4:j17.png?nolink&200|}}Connector J17, on the top of the board in the lower right corner is the USB host connector. This is a standard USB type A receptacle. USB devices may be connected either directly or through a standard USB cable.\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 
-type A receptacle. USB devices may be connected either directly or through a standard USB cable.+
  
-Jumper JP6 is used to route power to the host connector being used. Place the shorting block in the “HOST” +{{ :chipkit_pro_mx4:jp6.png?nolink&200|}}Jumper JP6 is used to route power to the host connector being used. Place the shorting block in the “HOST” position when using the standard USB type A (host) connector, J17. Place the shorting block in the “OTG” position for use with the USB micro-AB (OTG) connector, J15.
-position when using the standard USB type A (host) connector, J17. Place the shorting block in the “OTG” position +
-for use with the USB micro-AB (OTG) connector, J15.+
  
-When operating as a USB host, the PIC32MX460 microcontroller controls application of power to the connected +When operating as a USB host, the PIC32MX460 microcontroller controls application of power to the connected device via the VBUSON control pin. Bus power is applied to the device by driving the VBUSON pin high. Power is removed from the device by driving the VBUSON pin low. The VBUSON pin is accessed via bit 3 of the U1OTGCON register.\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 
-device via the VBUSON control pin. Bus power is applied to the device by driving the VBUSON pin high. Power is +
-removed from the device by driving the VBUSON pin low. The VBUSON pin is accessed via bit 3 of the U1OTGCON +
-register.+
  
-Pin 20 of the PIC32MX460 microcontroller is used for the VBUSON function. Place the shorting block in the +{{ :chipkit_pro_mx4:j16.png?nolink&200|}}Pin 20 of the PIC32MX460 microcontroller is used for the VBUSON function. Place the shorting block in the VBUSON position of jumper block J16 when using the ChipKIT Pro MX4 for USB host operation.\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 
-VBUSON position of jumper block J16 when using the ChipKIT Pro MX4 for USB host operation.+
  
-The VBUSON pin drives the enable input of a TPS2051B Current-Limited Power Distribution Switch to control the +{{ :chipkit_pro_mx4:jp5.png?nolink&200|}}The VBUSON pin drives the enable input of a TPS2051B Current-Limited Power Distribution Switch to control the application of USB power to the host connector. This switch has over-current detection capability and provides an over-current fault indication by pulling the signal P32_USBOC low. Jumper JP5 is used to enable monitoring of the overcurrent fault indication. The over-current output pin can be monitored via the INT2/RE9 pin on the PIC32MX460 microcontroller when a shorting block is installed on JP5. The INT2/RE9 pin is also connected to Pmod connector JE, pin 7 (JE-07). Pmod connector pin JE-07 should not be used when using INT2/RE9 to monitor the USB overcurrent fault indicator. Remove the shorting block from JP5 to restore normal operation of JE-07.
-application of USB power to the host connector. This switch has over-current detection capability and provides an +
-over-current fault indication by pulling the signal P32_USBOC low. Jumper JP5 is used to enable monitoring of the +
-overcurrent fault indication. The over-current output pin can be monitored via the INT2/RE9 pin on the +
-PIC32MX460 microcontroller when a shorting block is installed on JP5. The INT2/RE9 pin is also connected to Pmod +
-connector JE, pin 7 (JE-07). Pmod connector pin JE-07 should not be used when using INT2/RE9 to monitor the +
-USB overcurrent fault indicator. Remove the shorting block from JP5 to restore normal operation of JE-07.+
  
-Details about the operation of the TPS2051B can be obtained from the data sheet available at the Texas +Details about the operation of the TPS2051B can be obtained from the data sheet available at the Texas Instruments web site.
-Instruments web site.+
  
-Jumper JP10 can be used to disconnect the power supply from USB load switch, IC6, when the board is operating +{{ :chipkit_pro_mx4:jp10.png?nolink&200|}}Jumper JP10 can be used to disconnect the power supply from USB load switch, IC6, when the board is operating from a power supply with a higher voltage than 5V. When the ChipKIT Pro MX4 is operating as a USB host, a shorting block must be in place on JP10.
-from a power supply with a higher voltage than 5V. When the ChipKIT Pro MX4 is operating as a USB host, a +
-shorting block must be in place on JP10.+
  
-The Microchip Applications Library, MAL, available on the Microchip web site contains USB driver code for +The Microchip Applications Library, MAL, available on the Microchip web site contains USB driver code for implementing either USB host devices or USB function devices. This library contains numerous examples demonstrating both device and host operation of PIC32 microcontrollers. With minor modification or configuration, these reference designs are suitable to use for developing USB firmware for the ChipKIT Pro MX4 board.
-implementing either USB host devices or USB function devices. This library contains numerous examples +
-demonstrating both device and host operation of PIC32 microcontrollers. With minor modification or +
-configuration, these reference designs are suitable to use for developing USB firmware for the ChipKIT Pro MX4 +
-board.+
  
-Digilent has USB libraries available that can be used to develop both USB device and USB host applications when +Digilent has USB libraries available that can be used to develop both USB device and USB host applications when using the board with the MPIDE development environment. These libraries can be downloaded from the ChipKIT Pro MX4 product page on the Digilent web site.
-using the board with the MPIDE development environment. These libraries can be downloaded from the ChipKIT +
-Pro MX4 product page on the Digilent web site.+
  
 The Digilent chipKIT libraries contain examples illustrating various USB host and device applications. The Digilent chipKIT libraries contain examples illustrating various USB host and device applications.
Line 701: Line 553:
 ===== 9 UART Interface ===== ===== 9 UART Interface =====
  
-The PIC32MX460 microcontroller provides two UART interfaces, UART1 and UART2. These UARTs can provide +The PIC32MX460 microcontroller provides two UART interfaces, UART1 and UART2. These UARTs can provide either a 2-wire or a 4-wire asynchronous serial interface. The 2-wire interface provides receive (RX) and transmit (TX) signals. The 4-wire interface includes request-to-send (RTS) and clear-to-send (CTS) in addition to receive and
-either a 2-wire or a 4-wire asynchronous serial interface. The 2-wire interface provides receive (RX) and transmit +
-(TX) signals. The 4-wire interface includes request-to-send (RTS) and clear-to-send (CTS) in addition to receive and+
 transmit. transmit.
  
-UART1 can be accessed from Pmod connector JE and UART2 can be accessed from Pmod connector JH using the +UART1 can be accessed from Pmod connector JE and UART2 can be accessed from Pmod connector JH using the following pins:
-following pins:+
  
   *  U1CTS JE-01   *  U1CTS JE-01
Line 719: Line 568:
   *  U2RTS JH-04   *  U2RTS JH-04
  
-Detailed information about the operation of the UART peripherals can be found in the PIC32 Family Reference +Detailed information about the operation of the UART peripherals can be found in the PIC32 Family Reference Manual, Section 21, UART.
-Manual, Section 21, UART.+
  
-The USB Serial converter is connected to UART1. The MPIDE uses this to communicate with the boot loader. This +The USB Serial converter is connected to UART1. The MPIDE uses this to communicate with the boot loader. This can also be used for a serial communications interface between the ChipKIT Pro MX4 board and other software running on a PC. Resistors are used to decouple the USB serial interface and so UART1 can also be used via Pmod connector JE when it is not being used to communicate via the USB serial converter.
-can also be used for a serial communications interface between the ChipKIT Pro MX4 board and other software +
-running on a PC. Resistors are used to decouple the USB serial interface and so UART1 can also be used via Pmod +
-connector JE when it is not being used to communicate via the USB serial converter.+
  
-Note that when using the MPIDE software, devices connected to JE can interfere with the operation of the serial +Note that when using the MPIDE software, devices connected to JE can interfere with the operation of the serial interface and prevent the MPIDE from successfully downloading sketches to the board. If this happens, disconnect the external device from JE until the sketch has been downloaded and then reconnect it.
-interface and prevent the MPIDE from successfully downloading sketches to the board. If this happens, disconnect +
-the external device from JE until the sketch has been downloaded and then reconnect it.+
  
-When using the ChipKIT Pro MX4 with the MPIDE and the chipKIT system, the UARTs are accessed using the +When using the ChipKIT Pro MX4 with the MPIDE and the chipKIT system, the UARTs are accessed using the HardwareSerial facility built into the system. UART1, connector JE, is accessed using the Serial object and UART2, connector JH, is accessed using Serial1.
-HardwareSerial facility built into the system. UART1, connector JE, is accessed using the Serial object and +
-UART2, connector JH, is accessed using Serial1.+
  
 ---- ----
 ===== 10 Serial Peripheral Interface (SPI) ===== ===== 10 Serial Peripheral Interface (SPI) =====
  
-SPI is a four wire synchronous serial interface and SPI devices can operate as either master devices or as slave +SPI is a four wire synchronous serial interface and SPI devices can operate as either master devices or as slave devices. The PIC32 microcontroller labels the four SPI signals as Slave Select (SS), Serial Data Out (SDO), Serial Data In (SDI), and Serial Clock (SCK). A master device transmits SS, SDO and SCK, and receives SDI. A slave device receives SS, SDI, and SCK and transmits SDO. The SS signal is used to enable the slave device, and this signal is only significant for slave devices. A master device can use any general purpose I/O pin to generate SS to enable  the slave.
-devices. The PIC32 microcontroller labels the four SPI signals as Slave Select (SS), Serial Data Out (SDO), Serial Data +
-In (SDI), and Serial Clock (SCK). A master device transmits SS, SDO and SCK, and receives SDI. A slave device +
-receives SS, SDI, and SCK and transmits SDO. The SS signal is used to enable the slave device, and this signal is only +
-significant for slave devices. A master device can use any general purpose I/O pin to generate SS to enable the +
-slave.+
  
-An SPI transaction begins with the master device bringing SS low. When the slave sees SS go low it becomes +An SPI transaction begins with the master device bringing SS low. When the slave sees SS go low it becomes enabled and waits for the master to send data. The master shifts data out on SDO and simultaneously shifts data in on SDI. The slave device receives data from the master on its SDI pin and simultaneously sends data to the master on its SDO pin. Each time the master sends a byte to the slave, it simultaneously receives a byte from the slave.
-enabled and waits for the master to send data. The master shifts data out on SDO and simultaneously shifts data in +
-on SDI. The slave device receives data from the master on its SDI pin and simultaneously sends data to the master +
-on its SDO pin. Each time the master sends a byte to the slave, it simultaneously receives a byte from the slave.+
  
-The PIC32MX460 microcontroller provides two Serial Peripheral Interfaces, SPI1 and SPI2. SPI2 is accessed via +{{ :chipkit_pro_mx4:j1.png?nolink&200|}}The PIC32MX460 microcontroller provides two Serial Peripheral Interfaces, SPI1 and SPI2. SPI2 is accessed via Pmod connector JB and SPI1 is accessed via connector J1. Because of the way that peripheral functions are shared on the pins on the PIC32 microcontroller, the signals on J1 are shared with various Pmod connectors around the board. For this reason, when using only a single SPI port, SPI2 is the preferred port to use.
-Pmod connector JB and SPI1 is accessed via connector J1. Because of the way that peripheral functions are shared +
-on the pins on the PIC32 microcontroller, the signals on J1 are shared with various Pmod connectors around the +
-board. For this reason, when using only a single SPI port, SPI2 is the preferred port to use.+
  
 The following gives the mapping between SPI signals and connector pins: The following gives the mapping between SPI signals and connector pins:
Line 767: Line 597:
   *  SCK1 J1-04 (also JD-09)   *  SCK1 J1-04 (also JD-09)
  
-Detailed information about the operation of the SPI peripherals can be found in the PIC32 Family Reference +Detailed information about the operation of the SPI peripherals can be found in the PIC32 Family Reference Manual, Section 23, Serial Peripheral Interface.
-Manual, Section 23, Serial Peripheral Interface.+
  
-When using the ChipKIT Pro MX4 with the MPIDE and the chipKIT system, the SPI ports are accessed using either +When using the ChipKIT Pro MX4 with the MPIDE and the chipKIT system, the SPI ports are accessed using either the standard chipKIT SPI library or using the Digilent DSPI library.
-the standard chipKIT SPI library or using the Digilent DSPI library.+
  
 The standard SPI library supports access to a single SPI port, SPI2. This is accessed using the SPI object. The standard SPI library supports access to a single SPI port, SPI2. This is accessed using the SPI object.
  
-The DSPI library supports access to both SPI ports. The DSPI0 object class is used to create an object used to +The DSPI library supports access to both SPI ports. The DSPI0 object class is used to create an object used to access the default SPI port, SPI2, connector JB. The DSPI1 object class is used to access SPI1, connector J1.
-access the default SPI port, SPI2, connector JB. The DSPI1 object class is used to access SPI1, connector J1.+
  
 ---- ----
-===== 11 I2C ™ Interface =====+===== 11 I²C™ Interface =====
  
-The Inter-Integrated Circuit (I<sup>2</sup>C) Interface provides a medium speed (100K or 400K bps) synchronous serial +The Inter-Integrated Circuit (I<sup>2</sup>C) Interface provides a medium speed (100K or 400K bps) synchronous serial communications bus. The I<sup>2</sup>C interface provides master and slave operation using either 7 bit or 10 bit device addressing. Each device is given a unique address, and the protocol provides the ability to address packets to a specific device or to broadcast packets to all devices on the bus. Refer to the Microchip PIC32MX3XX/4XX Family Data Sheet and the PIC32 Family Reference Manual, Section 24, Inter-Integrated Circuit, for detailed information on configuring and using the I<sup>2</sup>C interface.
-communications bus. The I<sup>2</sup>C interface provides master and slave operation using either 7 bit or 10 bit device addressing. Each device is given a unique address, and the protocol provides the ability to address packets to a specific device or to broadcast packets to all devices on the bus. Refer to the Microchip PIC32MX3XX/4XX Family Data Sheet and the PIC32 Family Reference Manual, Section 24, Inter-Integrated Circuit, for detailed information on configuring and using the I<sup>2</sup>C interface.+
  
-The PIC32MX460 microcontroller provides for two independent I<sup>2</sup>C interfaces. The ChipKIT Pro MX4 is designed to provide dedicated access to one of these interfaces, I2C2, using I<sup>2</sup>C daisy chain connector J6. The other I<sup>2</sup>C interface, I2C1, is accessed using I<sup>2</sup>C daisy chain connector J2. The signals for I2C1 are shared with Pmod connector JF, and also appear on pins 1 & 2 of JF.+{{ :chipkit_pro_mx4:i2c2.png?nolink&200|}}The PIC32MX460 microcontroller provides for two independent I<sup>2</sup>C interfaces. The ChipKIT Pro MX4 is designed to provide dedicated access to one of these interfaces, I2C2, using I<sup>2</sup>C daisy chain connector J6. The other I<sup>2</sup>C interface, I2C1, is accessed using I<sup>2</sup>C daisy chain connector J2. The signals for I2C1 are shared with Pmod connector JF, and also appear on pins 1 & 2 of JF.\\ \\ \\ 
  
-The I<sup>2</sup>C daisy chain connectors provide two positions for connecting to the I<sup>2</sup>C signals, SDA and SCL, as well as power and ground. By using two-wire or four-wire MTE cables (available separately from Digilent) a daisy chain of multiple ChipKIT Pro MX4 boards or other I<sup>2</sup>C-capable boards or devices can be created.+{{ :chipkit_pro_mx4:i2c1.png?nolink&200|}}The I<sup>2</sup>C daisy chain connectors provide two positions for connecting to the I<sup>2</sup>C signals, SDA and SCL, as well as power and ground. By using two-wire or four-wire MTE cables (available separately from Digilent) a daisy chain of multiple ChipKIT Pro MX4 boards or other I<sup>2</sup>C-capable boards or devices can be created.
  
 The I<sup>2</sup>C bus is an open-collector bus. Devices on the bus actively drive the signals low. The high state of the I<sup>2</sup>C signals is achieved by pull-up resistors when no device is driving the lines low. One device on the I<sup>2</sup>C bus must provide the pull-up resistors. On the ChipKIT Pro MX4, I2C2 has fixed 2.2K ohm pull-up resistors. I2C1 has selectable pull-up resistors that can be enabled or disabled via jumpers J3 and J4. The pull-ups are enabled by installing shorting blocks and are disabled by removing the shorting blocks. Generally, only one device on the bus will have the pull-ups enabled. The I<sup>2</sup>C bus is an open-collector bus. Devices on the bus actively drive the signals low. The high state of the I<sup>2</sup>C signals is achieved by pull-up resistors when no device is driving the lines low. One device on the I<sup>2</sup>C bus must provide the pull-up resistors. On the ChipKIT Pro MX4, I2C2 has fixed 2.2K ohm pull-up resistors. I2C1 has selectable pull-up resistors that can be enabled or disabled via jumpers J3 and J4. The pull-ups are enabled by installing shorting blocks and are disabled by removing the shorting blocks. Generally, only one device on the bus will have the pull-ups enabled.
  
-==== 11.1 Jumper Setting for I2C Pull Up Resistors ====+==== 11.1 Jumper Setting for I²C Pull Up Resistors ====
  
  
Line 824: Line 650:
  
  
-==== 11.2 On-Board I2C Peripheral Devices ====+==== 11.2 On-Board I²C Peripheral Devices ====
  
- +The ChipKIT Pro MX4 provides two on-board I<sup>2</sup>C peripheral devices, a Microchip 24LC256 serial EEPROM, and a Microchip MCP4725 Digital to Analog Converter. These devices are both connected to I2C2. The 24LC256 is a 256Kbit (32Kbyte) serial EEPROM device to provide non-volatile memory storage. The MCP4725 is a single channel, 12-bit, serial digital to analog converter that provides an analog output voltage for various uses. The device address for IC2, the 24LC256 is 1010000 (0x50). The device address for IC3, the MCP4725, is 1100000 (0x60).
-The ChipKIT Pro MX4 provides two on-board I<sup>2</sup>C peripheral devices, a Microchip 24LC256 serial EEPROM, and a Microchip MCP4725 Digital to Analog Converter. These devices are both connected to I2C2. The 24LC256 is a +
-256Kbit (32Kbyte) serial EEPROM device to provide non-volatile memory storage. The MCP4725 is a single +
-channel, 12-bit, serial digital to analog converter that provides an analog output voltage for various uses. The +
-device address for IC2, the 24LC256 is 1010000 (0x50). The device address for IC3, the MCP4725, is 1100000 +
-(0x60).+
  
 Refer to the Microchip data sheets for detailed information on the operation of these devices. Refer to the Microchip data sheets for detailed information on the operation of these devices.
  
-The analog output voltage from IC3 is available at two places on the ChipKIT Pro MX4 board. The two pin header, +{{ :chipkit_pro_mx4:j10.png?nolink&200|}}The analog output voltage from IC3 is available at two places on the ChipKIT Pro MX4 board. The two pin header, J10, provides the DAC output voltage and ground for connection to off-board applications.\\ \\ \\ \\ \\ \\ \\ \\ 
-J10, provides the DAC output voltage and ground for connection to off-board applications.+
  
-The DAC output signal is also available at the center, DAC, position of jumper block J16. Placing a shorting block at this position connects the DAC output to pin 20 on the PIC32MX460 microcontroller. One of the functions for this +{{ :chipkit_pro_mx4:j16.png?nolink&200|}}The DAC output signal is also available at the center, DAC, position of jumper block J16. Placing a shorting block at this position connects the DAC output to pin 20 on the PIC32MX460 microcontroller. One of the functions for this pin is as one of the inputs to analog comparator #1 on the PIC32 device. This allows the output of the DAC to be used as a programmable reference voltage for the comparator.
-pin is as one of the inputs to analog comparator #1 on the PIC32 device. This allows the output of the DAC to be +
-used as a programmable reference voltage for the comparator.+
  
 ---- ----
 ===== 12 Analog Inputs ===== ===== 12 Analog Inputs =====
  
-The PIC32MX460 microcontroller provides a 10-bit analog to digital (A/D) converter that provides up to sixteen +The PIC32MX460 microcontroller provides a 10-bit analog to digital (A/D) converter that provides up to sixteen analog inputs. The ChipKIT Pro MX4 board provides access to 14 of them on the Pmod connectors. The converted values produced by the A/D converter will be in the range 0–1023.
-analog inputs. The ChipKIT Pro MX4 board provides access to 14 of them on the Pmod connectors. The converted +
-values produced by the A/D converter will be in the range 0–1023.+
  
-For detailed information on the operation and use of the A/D converter, refer to the PIC32 Family Reference +For detailed information on the operation and use of the A/D converter, refer to the PIC32 Family Reference Manual, Section 17, 10-bit AD Converter.
-Manual, Section 17, 10-bit AD Converter.+
  
-The analog inputs are accessed using the analogRead() function in the MPIDE software. The analog input pin +The analog inputs are accessed using the analogRead() function in the MPIDE software. The analog input pin number is specified using the symbols A0–A13. The digital pin numbers for the pin or the numbers 0–13 can also be used, but using the symbols A0–A13 is recommended. 
-number is specified using the symbols A0–A13. The digital pin numbers for the pin or the numbers 0–13 can also +
-be used, but using the symbols A0–A13 is recommended.+
  
 The following gives the Pmod connector position, digital pin number, and microcontroller I/O port and bit number The following gives the Pmod connector position, digital pin number, and microcontroller I/O port and bit number
Line 878: Line 691:
  
  
-The PIC32 microcontroller provides two voltage reference inputs to the analog to digital converter. Vref- is used to +The PIC32 microcontroller provides two voltage reference inputs to the analog to digital converter. Vref- is used to set the lower reference level and Vref+ is used to set the upper reference level. These reference inputs can be connected to internal references or to external references using two of the analog input pins.
-set the lower reference level and Vref+ is used to set the upper reference level. These reference inputs can be +
-connected to internal references or to external references using two of the analog input pins.+
  
-When the internal references are being used, Vref- is connected to VSS and Vref+ is connected to VDD. This means +When the internal references are being used, Vref- is connected to VSS and Vref+ is connected to VDD. This means that the voltage input range at the analog input pins is 0V–3.3V. In this case, an input voltage of 0V will convert to ~0, an input voltage of 1.65V will convert to ~511, and an input voltage of 3.3V will convert to ~1023.
-that the voltage input range at the analog input pins is 0V–3.3V. In this case, an input voltage of 0V will convert to +
-~0, an input voltage of 1.65V will convert to ~511, and an input voltage of 3.3V will convert to ~1023.+
  
-Either one, or both, of the references can be connected to external reference pins. When this is done, the +Either one, or both, of the references can be connected to external reference pins. When this is done, the references can be set to voltages other than 0V and 3.3V.
-references can be set to voltages other than 0V and 3.3V.+
  
-If, for example, both references were selected to use external references, with 1V applied to Vref- and 2V applied +If, for example, both references were selected to use external references, with 1V applied to Vref- and 2V applied to Vref+, the input voltage range at the analog input pins would be from 1V to 2V. An applied voltage of 1V would have a converted value of ~0, 1.5V would have a converted value of ~511, and 2V would have a converted value of ~1023.
-to Vref+, the input voltage range at the analog input pins would be from 1V to 2V. An applied voltage of 1V would +
-have a converted value of ~0, 1.5V would have a converted value of ~511, and 2V would have a converted value of +
-~1023.+
  
 When both external references are being used, Vref+ must have a higher voltage applied to in than Vref-. When both external references are being used, Vref+ must have a higher voltage applied to in than Vref-.
  
-The analog reference input pins appear on Pmod connector JK, pins 7 & 8. Vref- is on pin JK-07, and Vref+ is on pin +The analog reference input pins appear on Pmod connector JK, pins 7 & 8. Vref- is on pin JK-07, and Vref+ is on pin JK-08. These pins are not available to be used for digital I/O when being used as an external reference.
-JK-08. These pins are not available to be used for digital I/O when being used as an external reference.+
  
-When using the MPIDE software, the use of external analog references is selected using the analogReference() +When using the MPIDE software, the use of external analog references is selected using the analogReference() function. The following values can be used with analogReference():
-function. The following values can be used with analogReference():+
  
   *  DEFAULT – Vref- = 0V, Vref+ = 3.3V   *  DEFAULT – Vref- = 0V, Vref+ = 3.3V
Line 906: Line 709:
   *  EXTERNAL – Vref- = 0V, Vref+ = voltage at A2   *  EXTERNAL – Vref- = 0V, Vref+ = voltage at A2
   *  EXTMINUS – Vref- = voltage at A3, Vref+ = 3.3V   *  EXTMINUS – Vref- = voltage at A3, Vref+ = 3.3V
-  *  EXTPLUSMINUS – Vref- = voltage at A3, Vref+ = voltage at A2  * Unordered List Item+  *  EXTPLUSMINUS – Vref- = voltage at A3, Vref+ = voltage at A2
  
 ---- ----
Line 912: Line 715:
  
 The PIC32 microcontroller provides five timers that can be used for various timing functions. These timers are each The PIC32 microcontroller provides five timers that can be used for various timing functions. These timers are each
-16 bits wide, although two pairs, TIMER2/TIMER3 and TIMER4/TIMER5 can be combined to produce 32 bit wide +16 bits wide, although two pairs, TIMER2/TIMER3 and TIMER4/TIMER5 can be combined to produce 32 bit wide timers.
-timers.+
  
-A timer consists of a control register, a counter register, and a period register. The control register is used to +A timer consists of a control register, a counter register, and a period register. The control register is used to configure the timer for various modes of operation. The count register counts cycles of the clock source selected via the control register. This clock source can be the peripheral bus clock or a division of the peripheral bus clock via a pre-scaler divider. The period register can be used to generate an interrupt and/or reset the count register when a pre-determined value is reached.
-configure the timer for various modes of operation. The count register counts cycles of the clock source selected +
-via the control register. This clock source can be the peripheral bus clock or a division of the peripheral bus clock +
-via a pre-scaler divider. The period register can be used to generate an interrupt and/or reset the count register +
-when a pre-determined value is reached.+
  
-Each timer has an associated input pin. In some operating modes, this pin can be used as an external clock input to +Each timer has an associated input pin. In some operating modes, this pin can be used as an external clock input to the timer, or as a gate input to turn on/off incrementing of the counter register under control of an external signal.
-the timer, or as a gate input to turn on/off incrementing of the counter register under control of an external signal.+
  
 The following gives the Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number The following gives the Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number
Line 933: Line 730:
   *  TCK5 – JK-10, digital pin 71, RC04   *  TCK5 – JK-10, digital pin 71, RC04
  
-For detailed information on the operation of the PIC32 timers, refer to the PIC32 Family Reference Manual, Section +For detailed information on the operation of the PIC32 timers, refer to the PIC32 Family Reference Manual, Section 14, Timers.
-14, Timers.+
  
-When using the MPIDE software, the symbols PIN_TCK2, PIN_TCK3, PIN_TCK4, and PIN_TCK5 can be used to access +When using the MPIDE software, the symbols PIN_TCK2, PIN_TCK3, PIN_TCK4, and PIN_TCK5 can be used to access the timer input pins.
-the timer input pins.+
  
-Control and operation of the timers is not explicitly provided in the current version of the MPIDE software. This +Control and operation of the timers is not explicitly provided in the current version of the MPIDE software. This capability will be added in a future version of the software. Timers are used implicitly by various core functions and libraries, however.
-capability will be added in a future version of the software. Timers are used implicitly by various core functions and +
-libraries, however.+
  
 ---- ----
 ===== 15 Output Compare ===== ===== 15 Output Compare =====
  
-The PIC32 microcontroller provides five output compare units that can be used to control the timing of state +The PIC32 microcontroller provides five output compare units that can be used to control the timing of state changes on certain output pins or to generate pulse width modulated (PWM) outputs.
-changes on certain output pins or to generate pulse width modulated (PWM) outputs.+
  
-Each output compare unit works with a particular output pin (OC1-OC5). They can be programmed to control the +Each output compare unit works with a particular output pin (OC1-OC5). They can be programmed to control the pin in any of the following ways:
-pin in any of the following ways:+
  
   *  PWM output   *  PWM output
Line 959: Line 750:
   *  Generate rising edge   *  Generate rising edge
  
-The output compare units work in conjunction with a timer. Either Timer2 or Timer3 can be used with any of the +The output compare units work in conjunction with a timer. Either Timer2 or Timer3 can be used with any of the five output compare units.
-five output compare units.+
  
-Refer to the PIC32 Family Reference Manual, Section 16, Output Compare for detailed information on the use of +Refer to the PIC32 Family Reference Manual, Section 16, Output Compare for detailed information on the use of the output compares units.
-the output compares units.+
  
-When using the MPIDE software, these are accessed using the analogWrite() function. The digital pin number, or +When using the MPIDE software, these are accessed using the analogWrite() function. The digital pin number, or preferably, the symbols PIN_OC1 through PIN_OC5 are used to specify the pin. The MPIDE software currently only supports using the output compare units to generate PWM outputs. It uses Timer2 to control the output compares.
-preferably, the symbols PIN_OC1 through PIN_OC5 are used to specify the pin. The MPIDE software currently only +
-supports using the output compare units to generate PWM outputs. It uses Timer2 to control the output +
-compares.+
  
-The following gives Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number for +The following gives Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number for the output compare unit’s output pins:
-the output compare unit’s output pins:+
  
   *  OC1 – JH-08, digital pin 53, RD0   *  OC1 – JH-08, digital pin 53, RD0
Line 982: Line 767:
 ===== 16 Input Capture ===== ===== 16 Input Capture =====
  
-The PIC32 microcontroller provides five input capture units. An input capture unit works in conjunction with a +The PIC32 microcontroller provides five input capture units. An input capture unit works in conjunction with a timer and monitors the state of an associated pin. When the pin changes state, the current value of the timer is captured. The input capture units can be used with either Timer2 or Timer3.
-timer and monitors the state of an associated pin. When the pin changes state, the current value of the timer is +
-captured. The input capture units can be used with either Timer2 or Timer3.+
  
-The input capture unit can be programmed to be sensitive to either a rising edge, a falling edge, or both edges on +The input capture unit can be programmed to be sensitive to either a rising edge, a falling edge, or both edges on the input pin. An interrupt can also be signaled when an input capture is triggered. Each input capture has a four level deep FIFO that can buffer up to four capture events.
-the input pin. An interrupt can also be signaled when an input capture is triggered. Each input capture has a four +
-level deep FIFO that can buffer up to four capture events.+
  
-For detailed information on the operation and use of the input capture units, refer to the PIC32 Family Reference +For detailed information on the operation and use of the input capture units, refer to the PIC32 Family Reference Manual, Section 15, Input Capture.
-Manual, Section 15, Input Capture.+
  
-The following gives the Pmod connector position, chipKIT pin number, and microcontroller port and bit number for +The following gives the Pmod connector position, chipKIT pin number, and microcontroller port and bit number for the input capture units input pins:
-the input capture units input pins:+
  
   *  IC1 – JH-09, digital pin 54, RD08   *  IC1 – JH-09, digital pin 54, RD08
Line 1003: Line 782:
  
  
-When using the MPIDE software, the symbols PIN_IC1, PIN_IC2, PIN_IC3, PIN_IC4, and PIN_IC5 can be used to +When using the MPIDE software, the symbols PIN_IC1, PIN_IC2, PIN_IC3, PIN_IC4, and PIN_IC5 can be used to access the capture input pins.
-access the capture input pins.+
  
 Use of the input capture units is not currently supported in the MPIDE software. This will be added in a future Use of the input capture units is not currently supported in the MPIDE software. This will be added in a future
Line 1013: Line 791:
  
  
-The PIC32 microcontroller provides five external interrupt inputs. An external interrupt input can be used to +The PIC32 microcontroller provides five external interrupt inputs. An external interrupt input can be used to generate an interrupt to the microprocessor CPU when the pin changes state. They can be programmed to interrupt on a rising edge or a falling edge on the pin.
-generate an interrupt to the microprocessor CPU when the pin changes state. They can be programmed to +
-interrupt on a rising edge or a falling edge on the pin.+
  
-Refer to the PIC32 Family Reference Manual, Section 8, Interrupts for more information on the operation of the +Refer to the PIC32 Family Reference Manual, Section 8, Interrupts for more information on the operation of the external interrupts.
-external interrupts.+
  
-These are accessed using the attachInterrupt() and detachInterrupt() functions when using the MPIDE software,. +These are accessed using the attachInterrupt() and detachInterrupt() functions when using the MPIDE software. The interrupt number is specified using the numbers 0-4, or preferably, the symbols EXT_INT0 through EXT_INT4.
-The interrupt number is specified using the numbers 0-4, or preferably, the symbols EXT_INT0 through EXT_INT4.+
  
 The following gives Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number: The following gives Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number:
Line 1130: Line 904:
 ==== By Microcontroller Pin # ==== ==== By Microcontroller Pin # ====
 ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                   ^ ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                   ^
-| 1            | JC-04            | 19             | RG15            | RG15                            | also servo S4           | +| 1           | JC-04            | 19             | RG15            | RG15                            | also servo S4           | 
-| 3            | JA-08            | 5              | RE05            | PMD5/RE5                        |                         | +| 3           | JA-08            | 5              | RE05            | PMD5/RE5                        |                         | 
-| 4            | JA-09            | 6              | RE06            | PMD6/RE6                        |                         | +| 4           | JA-09            | 6              | RE06            | PMD6/RE6                        |                         | 
-| 5            | JA-10            | 7              | RE07            | PMD7/RE7                        |                         | +| 5           | JA-10            | 7              | RE07            | PMD7/RE7                        |                         | 
-| 6            | JD-04            | 27             | RC01            | T2CK/RC1                        |                         | +| 6           | JD-04            | 27             | RC01            | T2CK/RC1                        |                         | 
-| 7            | JD-10            | 31             | RC02            | T3CK/RC2                        |                         | +| 7           | JD-10            | 31             | RC02            | T3CK/RC2                        |                         | 
-| 8            | JE-10            | 39             | RC03            | T4CK/RC3                        |                         | +| 8           | JE-10            | 39             | RC03            | T4CK/RC3                        |                         | 
-| 9            | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03              | +| 9           | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03              | 
-| 10           | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                       | +| 10          | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                       | 
-| 11           | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                       | +| 11          | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                       | 
-| 12           | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                         | +| 12          | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                         | 
-| 14           | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                       | +| 14          | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                       | 
-| 17           | JF-07            | 44             | RA00            | TMS/RA0                                                 | +| 17          | JF-07            | 44             | RA00            | TMS/RA0                                                 | 
-| 18           | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07              | +| 18          | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07              | 
-| 19           | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5, USB OC_SENSE  |+| 19          | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5, USB OC_SENSE  |
 | 20           | JJ-08            | 61             | RB05            | VBUSON/C1IN+/AN5/CN7/RB5        | selected by J16         | | 20           | JJ-08            | 61             | RB05            | VBUSON/C1IN+/AN5/CN7/RB5        | selected by J16         |
 | 21           | JJ-07            | 60             | RB04            | C1IN-/AN4/CN6/RB4                                       | | 21           | JJ-07            | 60             | RB04            | C1IN-/AN4/CN6/RB4                                       |
Line 1159: Line 933:
 | 34           | JK-01            | 64             | RB10            | CVrefout/PMA13/AN10/RB10        | also LD1                | | 34           | JK-01            | 64             | RB10            | CVrefout/PMA13/AN10/RB10        | also LD1                |
 | 35           | JK-02            | 65             | RB11            | PMA12/AN11/RB11                 | also LD2                | | 35           | JK-02            | 65             | RB11            | PMA12/AN11/RB11                 | also LD2                |
-| 38           | JF-08            | 45             | RA01            | TCK/RA1                                                 | +| 38          | JF-08            | 45             | RA01            | TCK/RA1                                                 | 
-| 39           | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                         | +| 39          | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                         | 
-| 40           | JH-01            | 48             | RF12            | U2CTS/RF12                      |                         |+| 40          | JH-01            | 48             | RF12            | U2CTS/RF12                      |                         |
 | 41           | JK-03            | 66             | RB12            | PMA11/AN12/RB12                 | also LD3                | | 41           | JK-03            | 66             | RB12            | PMA11/AN12/RB12                 | also LD3                |
 | 42           | JK-04            | 67             | RB13            | PMA10/AN13/RB13                 | also LD4                | | 42           | JK-04            | 67             | RB13            | PMA10/AN13/RB13                 | also LD4                |
 | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                         | | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                         |
 | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                         | | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                         |
-| 47           | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                         | +| 47          | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                         | 
-| 48           | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                   | +| 48          | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                   | 
-| 49           | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                         | +| 49          | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                         | 
-| 50           | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                         | +| 50          | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                         | 
-| 51           | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                   | +| 51          | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                   | 
-| 52           | JE-03            | 34             | RF02            | U1RX/RF2                        |                         | +| 52          | JE-03            | 34             | RF02            | U1RX/RF2                        |                         | 
-| 53           | JE-02            | 33             | RF08            | U1TX/RF8                        |                         |+| 53          | JE-02            | 33             | RF08            | U1TX/RF8                        |                         |
 | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                   | | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                   |
 | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                   | | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                   |
-| 58           | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                    | +| 58          | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                    | 
-| 59           | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                    | +| 59          | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                    | 
-| 60           | JF-09            | 46             | RA04            | TDI/RA4                                                 | +| 60          | JF-09            | 46             | RA04            | TDI/RA4                                                 | 
-| 61           | JF-10            | 47             | RA05            | TDO/RA5                                                 |+| 61          | JF-10            | 47             | RA05            | TDO/RA5                                                 |
 | 63           | N/A              | N/A            | RC12            | OSC1/CLKI/RC12                  | Primary Oscillator      | | 63           | N/A              | N/A            | RC12            | OSC1/CLKI/RC12                  | Primary Oscillator      |
 | 64           | N/A              | N/A            | RC15            | OSC2/CLKO/RC15                  | Primary Oscillator      | | 64           | N/A              | N/A            | RC15            | OSC2/CLKO/RC15                  | Primary Oscillator      |
-| 66           | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1   | +| 66          | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1   | 
-| 67           | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | alsoJ2-03, J2-04 I2C1   | +| 67          | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | alsoJ2-03, J2-04 I2C1   | 
-| 68           | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08              | +| 68          | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08              | 
-| 69           | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01              | +| 69          | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01              | 
-| 70           | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04              | +| 70          | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04              | 
-| 71           | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                         | +| 71          | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                         | 
-| 72           | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02              |+| 72          | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02              |
 | 73           | N/A              | N/A            | RC13            | SOSCI/CN1/RC13                  | Secondary Oscillator    | | 73           | N/A              | N/A            | RC13            | SOSCI/CN1/RC13                  | Secondary Oscillator    |
 | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator    | | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator    |
-| 76           | JD-02            | 25             | RD01            | OC2/RD1                                                 | +| 76          | JD-02            | 25             | RD01            | OC2/RD1                                                 | 
-| 77           | JD-08            | 29             | RD02            | OC3/RD2                                                 | +| 77          | JD-08            | 29             | RD02            | OC3/RD2                                                 | 
-| 78           | JE--0            | 37             | RD03            | OC4/RD3                                                 | +| 78          | JE--0            | 37             | RD03            | OC4/RD3                                                 | 
-| 79           | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                         | +| 79          | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                         | 
-| 80           | JH-10            | 55             | RD13            | PMD13/CN19/RD13                                         | +| 80          | JH-10            | 55             | RD13            | PMD13/CN19/RD13                                         | 
-| 81           | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                       | +| 81          | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                       | 
-| 82           | JB-08            | 13             | RD05            | PMRD/CN14/RD5                                           | +| 82          | JB-08            | 13             | RD05            | PMRD/CN14/RD5                                           | 
-| 83           | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-09              | +| 83          | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-09              | 
-| 84           | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                         | +| 84          | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                         | 
-| 87           | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7           | +| 87          | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7           | 
-| 88           | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8           | +| 88          | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8           | 
-| 89           | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6           | +| 89          | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6           | 
-| 90           | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5           | +| 90          | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5           | 
-| 91           | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1               | +| 91          | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1               | 
-| 92           | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2               | +| 92          | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2               | 
-| 93           | JA-01            | 0              | RE00            | PMD0/RE0                        |                         | +| 93          | JA-01            | 0              | RE00            | PMD0/RE0                        |                         | 
-| 94           | JA-02            | 1              | RE01            | PMD1/RE1                        |                         | +| 94          | JA-02            | 1              | RE01            | PMD1/RE1                        |                         | 
-| 95           | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3           | +| 95          | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3           | 
-| 96           | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1           | +| 96          | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1           | 
-| 97           | JC-02            | 17             | RG13            | TRD0/RG13                       | also servo S2           | +| 97          | JC-02            | 17             | RG13            | TRD0/RG13                       | also servo S2           | 
-| 98           | JA-03            | 2              | RE02            | PMD2/RE2                        |                         | +| 98          | JA-03            | 2              | RE02            | PMD2/RE2                        |                         | 
-| 99           | JA-04            | 3              | RE03            | PMD3/RE3                        |                         | +| 99          | JA-04            | 3              | RE03            | PMD3/RE3                        |                         | 
-| 100          | JA-07            | 4              | RE04            | PMD4/RE4                        |                         +| 100         | JA-07            | 4              | RE04            | PMD4/RE4                        |                          
 +* indicates 5V tolerant PIC32 pin
  
 ==== By Connector Pin # & Digital Pin # ==== ==== By Connector Pin # & Digital Pin # ====
 ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                   ^ ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                   ^
-| 93           | JA-01            | 0              | RE00            | PMD0/RE0                        |                         | +| 93          | JA-01            | 0              | RE00            | PMD0/RE0                        |                         | 
-| 94           | JA-02            | 1              | RE01            | PMD1/RE1                        |                         | +| 94          | JA-02            | 1              | RE01            | PMD1/RE1                        |                         | 
-| 98           | JA-03            | 2              | RE02            | PMD2/RE2                        |                         | +| 98          | JA-03            | 2              | RE02            | PMD2/RE2                        |                         | 
-| 99           | JA-04            | 3              | RE03            | PMD3/RE3                        |                         | +| 99          | JA-04            | 3              | RE03            | PMD3/RE3                        |                         | 
-| 100          | JA-07            | 4              | RE04            | PMD4/RE4                        |                         | +| 100         | JA-07            | 4              | RE04            | PMD4/RE4                        |                         | 
-| 3            | JA-08            | 5              | RE05            | PMD5/RE5                        |                         | +| 3           | JA-08            | 5              | RE05            | PMD5/RE5                        |                         | 
-| 4            | JA-09            | 6              | RE06            | PMD6/RE6                        |                         | +| 4           | JA-09            | 6              | RE06            | PMD6/RE6                        |                         | 
-| 5            | JA-10            | 7              | RE07            | PMD7/RE7                        |                         | +| 5           | JA-10            | 7              | RE07            | PMD7/RE7                        |                         | 
-| 14           | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                       | +| 14          | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                       | 
-| 12           | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                         | +| 12          | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                         | 
-| 11           | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                       | +| 11          | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                       | 
-| 10           | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                       |+| 10          | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                       |
 | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                         | | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                         |
-| 82           | JB-08            | 13             | RD05            | PMRD/CN14/RD5                                           | +| 82          | JB-08            | 13             | RD05            | PMRD/CN14/RD5                                           | 
-| 81           | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                       |+| 81          | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                       |
 | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                         | | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                         |
-| 96           | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1           | +| 96          | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1           | 
-| 97           | JC-02            | 17             | RG13            | TRD0/RG13                      | also servo S2           | +| 97          | JC-02            | 17             | RG13            | TRD0/RG13                       | also servo S2           | 
-| 95           | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3           | +| 95          | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3           | 
-| 1            | JC-04            | 19             | RG15            | RG15                            | also servo S4           | +| 1           | JC-04            | 19             | RG15            | RG15                            | also servo S4           | 
-| 90           | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5           | +| 90          | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5           | 
-| 89           | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6           | +| 89          | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6           | 
-| 87           | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7           | +| 87          | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7           | 
-| 88           | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8           | +| 88          | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8           | 
-| 84           | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                         | +| 84          | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                         | 
-| 76           | JD-02            | 25             | RD01            | OC2/RD1                                                 | +| 76          | JD-02            | 25             | RD01            | OC2/RD1                                                 | 
-| 69           | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01              | +| 69          | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01              | 
-| 6            | JD-04            | 27             | RC01            | T2CK/RC1                        |                         | +| 6           | JD-04            | 27             | RC01            | T2CK/RC1                        |                         | 
-| 83           | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-10              | +| 83          | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-10              | 
-| 77           | JD-08            | 29             | RD02            | OC3/RD2                                                 | +| 77          | JD-08            | 29             | RD02            | OC3/RD2                                                 | 
-| 70           | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04              | +| 70          | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04              | 
-| 7            | JD-10            | 31             | RC02            | T3CK/RC2                        |                         | +| 7           | JD-10            | 31             | RC02            | T3CK/RC2                        |                         | 
-| 47           | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                         | +| 47          | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                         | 
-| 53           | JE-02            | 33             | RF08            | U1TX/RF8                        |                         | +| 53          | JE-02            | 33             | RF08            | U1TX/RF8                        |                         | 
-| 52           | JE-03            | 34             | RF02            | U1RX/RF2                        |                         | +| 52          | JE-03            | 34             | RF02            | U1RX/RF2                        |                         | 
-| 48           | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                   | +| 48          | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                   | 
-| 19           | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5, USB OC_SENSE +| 19          | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5, USB OC_SENSE 
-| 78           | JE-08            | 37             | RD03            | OC4/RD3                                                 | +| 78          | JE-08            | 37             | RD03            | OC4/RD3                                                 | 
-| 71           | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                         | +| 71          | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                         | 
-| 8            | JE-10            | 39             | RC03            | T4CK/RC3                        |                         | +| 8           | JE-10            | 39             | RC03            | T4CK/RC3                        |                         | 
-| 66           | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1   | +| 66          | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1   | 
-| 67           | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | also J2-03,J2-04 I2C1   | +| 67          | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | also J2-03,J2-04 I2C1   | 
-| 91           | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1               | +| 91          | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1               | 
-| 92           | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2               | +| 92          | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2               | 
-| 17           | JF-07            | 44             | RA00            | TMS/RA0                                                 | +| 17          | JF-07            | 44             | RA00            | TMS/RA0                                                 | 
-| 38           | JF-08            | 45             | RA01            | TCK/RA1                                                 | +| 38          | JF-08            | 45             | RA01            | TCK/RA1                                                 | 
-| 60           | JF-09            | 46             | RA04            | TDI/RA4                                                 | +| 60          | JF-09            | 46             | RA04            | TDI/RA4                                                 | 
-| 61           | JF-10            | 47             | RA05            | TDO/RA5                                                 | +| 61          | JF-10            | 47             | RA05            | TDO/RA5                                                 | 
-| 40           | JH-01            | 48             | RF12            | U2CTS/RF12                      |                         | +| 40          | JH-01            | 48             | RF12            | U2CTS/RF12                      |                         | 
-| 50           | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                         | +| 50          | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                         | 
-| 49           | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                         | +| 49          | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                         | 
-| 39           | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                         | +| 39          | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                         | 
-| 18           | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07              | +| 18          | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07              | 
-| 72           | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02              | +| 72          | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02              | 
-| 68           | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08              | +| 68          | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08              | 
-| 80           | JH-10            | 55             | RD13            | PMD13/CN19/RD13                 | also J1-09              |+| 80          | JH-10            | 55             | RD13            | PMD13/CN19/RD13                 | also J1-09              |
 | 25           | JJ-01            | 56             | RB00            | PGD1/EMUD1/AN0/CN2/RB0          |                         | | 25           | JJ-01            | 56             | RB00            | PGD1/EMUD1/AN0/CN2/RB0          |                         |
 | 24           | JJ-02            | 57             | RB01            | PGC1/EMUC1/AN1/CN3/RB1          |                         | | 24           | JJ-02            | 57             | RB01            | PGC1/EMUC1/AN1/CN3/RB1          |                         |
Line 1286: Line 1061:
 | 28           | JK-07            | 68             | RA09            | PMA7/Vref-/CVref-/RA9                                   | | 28           | JK-07            | 68             | RA09            | PMA7/Vref-/CVref-/RA9                                   |
 | 29           | JK-08            | 69             | RA10            | PMA6/Vref+/CVref+/RA10          |                         | | 29           | JK-08            | 69             | RA10            | PMA6/Vref+/CVref+/RA10          |                         |
-| 79           | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                         | +| 79          | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                         | 
-| 9            | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03              | +| 9           | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03              | 
-| 58           | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                    | +| 58          | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                    | 
-| 59           | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                    |+| 59          | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                    |
 | 26           | N/A              | N/A            | RB06            | PGC2/EMUC2/AN6/OCFA/RB6         | debug PGC               | | 26           | N/A              | N/A            | RB06            | PGC2/EMUC2/AN6/OCFA/RB6         | debug PGC               |
 | 27           | N/A              | N/A            | RB07            | PGD2/EMUD2/AN7/RB7              | debug PGD               | | 27           | N/A              | N/A            | RB07            | PGD2/EMUD2/AN7/RB7              | debug PGD               |
-| 51           | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                   |+| 51          | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                   |
 | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                   | | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                   |
 | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                   | | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                   |
Line 1299: Line 1074:
 | 73           | N/A              | N/A            | RC12            | SOSCI/CN1/RC13                  | Secondary Oscillator    | | 73           | N/A              | N/A            | RC12            | SOSCI/CN1/RC13                  | Secondary Oscillator    |
 | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator    | | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator    |
 +*indicates 5V tolerant PIC32 pin
  
 ==== By MCU Port and Bit # ==== ==== By MCU Port and Bit # ====
 ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                  ^ ^ PIC32 Pin #  ^ Connector Pin #  ^ chipKIT Pin #  ^ MCU Port & Bit  ^ PIC32 Signal Name               ^ Notes                  ^
-| 17           | JF-07            | 44             | RA00            | TMS/RA0                                                | +| 17          | JF-07            | 44             | RA00            | TMS/RA0                                                | 
-| 38           | JF-08            | 45             | RA01            | TCK/RA1                                                | +| 38          | JF-08            | 45             | RA01            | TCK/RA1                                                | 
-| 58           | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                   | +| 58          | J6-1, J6-2       | 72             | RA02            | SCL2/RA2                        | I2C2                   | 
-| 59           | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                   | +| 59          | J6-3, J6-4       | 73             | RA03            | SDA2/RA3                        | I2C2                   | 
-| 60           | JF-09            | 46             | RA04            | TDI/RA4                                                | +| 60          | JF-09            | 46             | RA04            | TDI/RA4                                                | 
-| 61           | JF-10            | 47             | RA05            | TDO/RA5                                                | +| 61          | JF-10            | 47             | RA05            | TDO/RA5                                                | 
-| 91           | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1              | +| 91          | JF-03            | 42             | RA06            | TRCLK/RA6                       | also BTN1              | 
-| 92           | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2              |+| 92          | JF-04            | 43             | RA07            | TRD3/RA7                        | also BTN2              |
 | 28           | JK-07            | 68             | RA09            | PMA7/Vref-/CVref-/RA9                                  | | 28           | JK-07            | 68             | RA09            | PMA7/Vref-/CVref-/RA9                                  |
 | 29           | JK-08            | 69             | RA10            | PMA6/Vref+/CVref+/RA10          |                        | | 29           | JK-08            | 69             | RA10            | PMA6/Vref+/CVref+/RA10          |                        |
-| 66           | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1  | +| 66          | JF-01            | 40             | RA14            | SCL1/INT3/RA14                  | also J2-01,J2-02 I2C1  | 
-| 67           | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | also J2-03,J2-04 I2C1  |+| 67          | JF-02            | 41             | RA15            | SDA1/INT4/RA15                  | also J2-03,J2-04 I2C1  |
 | 25           | JJ-01            | 56             | RB00            | PGD1/EMUD1/AN0/CN2/RB0          |                        | | 25           | JJ-01            | 56             | RB00            | PGD1/EMUD1/AN0/CN2/RB0          |                        |
 | 24           | JJ-02            | 57             | RB01            | PGC1/EMUC1/AN1/CN3/RB1          |                        | | 24           | JJ-02            | 57             | RB01            | PGC1/EMUC1/AN1/CN3/RB1          |                        |
Line 1330: Line 1106:
 | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                        | | 43           | JB-10            | 15             | RB14            | PMALH/PMA1/AN14/RB14            |                        |
 | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                        | | 44           | JB-07            | 12             | RB15            | PMALL/PMA0/AN15/OCFB/CN12/RB15  |                        |
-| 6            | JD-04            | 27             | RC01            | T2CK/RC1                        |                        | +| 6           | JD-04            | 27             | RC01            | T2CK/RC1                        |                        | 
-| 7            | JD-10            | 31             | RC02            | T3CK/RC2                        |                        | +| 7           | JD-10            | 31             | RC02            | T3CK/RC2                        |                        | 
-| 8            | JE-10            | 39             | RC03            | T4CK/RC3                        |                        | +| 8           | JE-10            | 39             | RC03            | T4CK/RC3                        |                        | 
-| 9            | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03             |+| 9           | JK-10            | 71             | RC04            | SDI1/T5CK/RC4                   | also J1-03             |
 | 63           | N/A              | N/A            | RC12            | OSC1/CLKI/RC12                  | Primary Oscillator     | | 63           | N/A              | N/A            | RC12            | OSC1/CLKI/RC12                  | Primary Oscillator     |
 | 73           | N/A              | N/A            | RC13            | SOSCI/CN1/RC13                  | Secondary Oscillator   | | 73           | N/A              | N/A            | RC13            | SOSCI/CN1/RC13                  | Secondary Oscillator   |
 | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator   | | 74           | N/A              | N/A            | RC14            | SOSCO/T1CK/CN0/RC14             | Secondary Oscillator   |
 | 64           | N/A              | N/A            | RC15            | OSC2/CLKO/RC15                  | Primary Oscillator     | | 64           | N/A              | N/A            | RC15            | OSC2/CLKO/RC15                  | Primary Oscillator     |
-| 72           | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02             | +| 72          | JH-08            | 53             | RD00            | SDO1/OC1/INT0/RD0               | also J1-02             | 
-| 76           | JD-02            | 25             | RD01            | OC2/RD1                                                | +| 76          | JD-02            | 25             | RD01            | OC2/RD1                                                | 
-| 77           | JD-08            | 29             | RD02            | OC3/RD2                                                | +| 77          | JD-08            | 29             | RD02            | OC3/RD2                                                | 
-| 78           | JE-08            | 37             | RD03            | OC4/RD3                                                | +| 78          | JE-08            | 37             | RD03            | OC4/RD3                                                | 
-| 81           | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                      | +| 81          | JB-09            | 14             | RD04            | PMWR/OC5/CN13/RD4                                      | 
-| 82           | JB08             | 13             | RD05            | PMRD/CN14/RD5                                          | +| 82          | JB08             | 13             | RD05            | PMRD/CN14/RD5                                          | 
-| 83           | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-10             | +| 83          | JD-07            | 28             | RD06            | PMD14/CN15/RD6                  | also J1-10             | 
-| 84           | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                        | +| 84          | JD-01            | 24             | RD07            | PMD15/CN16/RD7                  |                        | 
-| 68           | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08             | +| 68          | JH-09            | 54             | RD08            | IC1/RTCC/RD8                    | also J1-08             | 
-| 69           | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01             | +| 69          | JD-03            | 26             | RD09            | IC2/SS1/RD9                     | also J1-01             | 
-| 70           | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04             | +| 70          | JD-09            | 30             | RD10            | IC3/SCK1/PMCS2/PMA15/RD10       | also J1-04             | 
-| 71           | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                        | +| 71          | JE-09            | 38             | RD11            | IC4/PMCS1/PMA14/RD11            |                        | 
-| 79           | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                        | +| 79          | JK-09            | 70             | RD12            | PMD12/IC5/RD12                  |                        | 
-| 80           | JH-10            | 55             | RD13            | PMD13/CN19/RD13                 | also J1-09             | +| 80          | JH-10            | 55             | RD13            | PMD13/CN19/RD13                 | also J1-09             | 
-| 47           | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                        | +| 47          | JE-01            | 32             | RD14            | CN20/U1CTS/RD14                                        | 
-| 48           | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                  | +| 48          | JE-04            | 35             | RD15            | U1RTS/BCLK1/CN21/RD15                                  | 
-| 93           | JA-01            | 0              | RE00            | PMD0/RE0                        |                        | +| 93          | JA-01            | 0              | RE00            | PMD0/RE0                        |                        | 
-| 94           | JA-02            | 1              | RE01            | PMD1/RE1                        |                        | +| 94          | JA-02            | 1              | RE01            | PMD1/RE1                        |                        | 
-| 98           | JA-03            | 2              | RE02            | PMD2/RE2                        |                        | +| 98          | JA-03            | 2              | RE02            | PMD2/RE2                        |                        | 
-| 99           | JA-04            | 3              | RE03            | PMD3/RE3                        |                        | +| 99          | JA-04            | 3              | RE03            | PMD3/RE3                        |                        | 
-| 100          | JA-07            | 4              | RE04            | PMD4/RE4                        |                        | +| 100         | JA-07            | 4              | RE04            | PMD4/RE4                        |                        | 
-| 3            | JA-08            | 5              | RE05            | PMD5/RE5                        |                        | +| 3           | JA-08            | 5              | RE05            | PMD5/RE5                        |                        | 
-| 4            | JA-09            | 6              | RE06            | PMD6/RE6                        |                        | +| 4           | JA-09            | 6              | RE06            | PMD6/RE6                        |                        | 
-| 5            | JA-10            | 7              | RE07            | PMD7/RE7                        |                        | +| 5           | JA-10            | 7              | RE07            | PMD7/RE7                        |                        | 
-| 18           | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07             | +| 18          | JH-07            | 52             | RE08            | INT1/RE8                        | also J1-07             | 
-| 19           | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5,USB OC_SENSE +| 19          | JE-07            | 36             | RE09            | INT2/RE9                        | also JP5,USB OC_SENSE 
-| 87           | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7          | +| 87          | JC-09            | 22             | RF00            | PMD11/RF0                       | also servo S7          | 
-| 88           | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8          | +| 88          | JC-10            | 23             | RF01            | PMD10/RF1                       | also servo S8          | 
-| 52           | JE-03            | 34             | RF02            | U1RX/RF2                        |                        | +| 52          | JE-03            | 34             | RF02            | U1RX/RF2                        |                        | 
-| 51           | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                  | +| 51          | N/A              | N/A            | RF03            | USBID/RF3                       | USB-4                  | 
-| 49           | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                        | +| 49          | JH-03            | 50             | RF04            | PMA9/U2RX/CN17/RF4              |                        | 
-| 50           | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                        | +| 50          | JH-02            | 49             | RF05            | PMA8/U2TX/CN18/RF5              |                        | 
-| 53           | JE-02            | 33             | RF08            | U1TX/RF8                        |                        | +| 53          | JE-02            | 33             | RF08            | U1TX/RF8                        |                        | 
-| 40           | JH-01            | 48             | RF12            | U2CTS/RF12                      |                        | +| 40          | JH-01            | 48             | RF12            | U2CTS/RF12                      |                        | 
-| 39           | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                        | +| 39          | JH-04            | 51             | RF13            | U2RTS/BCLK2/RF13                |                        | 
-| 90           | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5          | +| 90          | JC-07            | 20             | RG00            | PMD8/RG0                        | also servo S5          | 
-| 89           | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6          |+| 89          | JC-08            | 21             | RG01            | PMD9/RG1                        | also servo S6          |
 | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                  | | 57           | N/A              | N/A            | RG02            | D+/RG2                          | USB-3                  |
 | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                  | | 56           | N/A              | N/A            | RG03            | D-/RG3                          | USB-2                  |
-| 10           | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                      | +| 10          | JB-04            | 11             | RG06            | PMA5/SCK2/CN8/RG6                                      | 
-| 11           | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                      | +| 11          | JB-03            | 10             | RG07            | PMA4/SDI2/CN9/RG7                                      | 
-| 12           | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                        | +| 12          | JB-02            | 9              | RG08            | PMA3/SDO2/CN10/RG8              |                        | 
-| 14           | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                      | +| 14          | JB-01            | 8              | RG09            | PMA2/SS2/CN11/RG9                                      | 
-| 96           | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1          | +| 96          | JC-01            | 16             | RG12            | TRD1/RG12                       | also servo S1          | 
-| 97           | JC-02            | 17             | RG13            | TRD0/RG13                       | also servo S2          | +| 97          | JC-02            | 17             | RG13            | TRD0/RG13                       | also servo S2          | 
-| 95           | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3          | +| 95          | JC-03            | 18             | RG14            | TRD2/RG14                       | also servo S3          | 
-| 1            | JC-04            | 19             | RG15            | RG15                            | also servo S4          | +| 1           | JC-04            | 19             | RG15            | RG15                            | also servo S4          | 
 +*indicates 5V tolerant pin