Microchip PIC32 datasheet: 1.0 Device overview

Published by Microchip · pages 21–42 of 214 · Original PDF

71 discussions about the Microchip PIC32

All 10 parts of the datasheet

1.0 DEVICE OVERVIEW

Note 1: This data sheet summarizes the features of the PIC32MX3XX/4XX family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to the "PIC32 Family Reference Manual", which is available from the Microchip web site (www.microchip.com/PIC32).

2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information.

This document contains device-specific information for the PIC32MX3XX/4XX devices.

Figure 1-1 illustrates a general block diagram of the core and peripheral modules in the PIC32MX3XX/4XX family of devices.

Table 1-1 lists the functions of the various pins shown in the pinout diagrams.

FIGURE 1-1: BLOCK DIAGRAM(1,2)

Figure from the manual

Note 1: Some features are not available on all device variants. 2: BOR functionality is provided when the on-board voltage regulator is enabled.

TABLE 1-1: PINOUT I/O DESCRIPTIONS

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
AN0 16 25 K2 I Analog Analog input channels.
AN1 15 24 K1 I Analog
AN2 14 23 J2 I Analog
AN3 13 22 J1 I Analog
AN4 12 21 H2 I Analog
AN5 11 20 H1 I Analog
AN6 17 26 L1 I Analog
AN7 18 27 J3 I Analog
AN8 21 32 K4 I Analog
AN9 22 33 L4 I Analog
AN10 23 34 L5 I Analog
AN11 24 35 J5 I Analog
AN12 27 41 J7 I Analog
AN13 28 42 L7 I Analog
AN14 29 43 K7 I Analog
AN15 30 44 L8 I Analog
CLKI 39 63 F9 I ST/CMOS External clock source input. Always associated with OSC1 pin function.
CLKO 40 64 F11 O — Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes. Always associated with OSC2 pin function.
OSC1 39 63 F9 I ST/CMOS Oscillator crystal input. ST buffer when configured in RC mode; CMOS otherwise.
OSC2 40 64 F11 I/O — Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes.
SOSC1 47 73 C10 I ST/CMOS 32.768 kHz low-power oscillator crystal input; CMOS otherwise.
SOSCO 48 74 B11 O — 32.768 kHz low-power oscillator crystal output.

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
I = Input
P = Power

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
CN0 48 74 B11 I ST Change notification inputs. Can be software programmed for internal weak pull-ups on all inputs.
CN1 47 73 C10 I ST
CN2 16 25 K2 I ST
CN3 15 24 K1 I ST
CN4 14 23 J2 I ST
CN5 13 22 J1 I ST
CN6 12 21 H2 I ST
CN7 11 20 H1 I ST
CN8 4 10 E3 I ST
CN9 5 11 F4 I ST
CN10 6 12 F2 I ST
CN11 8 14 F3 I ST
CN12 30 44 L8 I ST
CN13 52 81 C8 I ST
CN14 53 82 B8 I ST
CN15 54 83 D7 I ST
CN16 55 84 C7 I ST
CN17 31 49 L10 I ST
CN18 32 50 L11 I ST
CN19 — 80 D8 I ST
CN20 — 47 L9 I ST
CN21 — 48 K9 I ST
IC1 42 68 E9 I ST Capture inputs 1-5.
IC2 43 69 E10 I ST
IC3 44 70 D11 I ST
IC4 45 71 C11 I ST
IC5 52 79 A9 I ST
OCFA 17 26 L1 I ST Output Compare Fault A Input.
OC1 46 72 D9 O — Output Compare output 1.
OC2 49 76 A11 O — Output Compare output 2
OC3 50 77 A10 O — Output Compare output 3.
OC4 51 78 B9 O — Output Compare output 4.
OC5 52 81 C8 O — Output Compare output 5.
OCFB 30 44 L8 I ST Output Compare Fault B Input.
INT0 35,46 55,72 H9,D9 I ST External interrupt 0.
INT1 42 18 61 I ST External interrupt 1.
INT2 43 19 62 I ST External interrupt 2.

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
P = Power
I = Input

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
INT3 44 66 E11 I ST External interrupt 3.
INT4 45 67 E8 I ST External interrupt 4.
RA0 — 17 G3 I/O ST PORTA is a bidirectional I/O port.
RA1 — 38 J6 I/O ST
RA2 — 58 H11 I/O ST
RA3 — 59 G10 I/O ST
RA4 — 60 G11 I/O ST
RA5 — 61 G9 I/O ST
RA6 — 91 C5 I/O ST
RA7 — 92 B5 I/O ST
RA9 — 28 L2 I/O ST
RA10 — 29 K3 I/O ST
RA14 — 66 E11 I/O ST
RA15 — 67 E8 I/O ST
RB0 16 25 K2 I/O ST PORTB is a bidirectional I/O port.
RB1 15 24 K1 I/O ST
RB2 14 23 J2 I/O ST
RB3 13 22 J1 I/O ST
RB4 12 21 H2 I/O ST
RB5 11 20 H1 I/O ST
RB6 17 26 L1 I/O ST
RB7 18 27 J3 I/O ST
RB8 21 32 K4 I/O ST
RB9 22 33 L4 I/O ST
RB10 23 34 L5 I/O ST
RB11 24 35 J5 I/O ST
RB12 27 41 J7 I/O ST
RB13 28 42 L7 I/O ST
RB14 29 43 K7 I/O ST
RB15 30 44 L8 I/O ST
RC1 — 6 D1 I/O ST PORTC is a bidirectional I/O port.
RC2 — 7 E4 I/O ST
RC3 — 8 E2 I/O ST
RC4 — 9 E1 I/O ST
RC12 39 63 F9 I/O ST
RC13 47 73 C10 I/O ST
RC14 48 74 B11 I/O ST
RC15 40 64 F11 I/O ST

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
P = Power
I = Input

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
RD0 46 72 D9 I/O ST PORTD is a bidirectional I/O port.
RD1 49 76 A11 I/O ST
RD2 50 77 A10 I/O ST
RD3 51 78 B9 I/O ST
RD4 52 81 C8 I/O ST
RD5 53 82 B8 I/O ST
RD6 54 83 D7 I/O ST
RD7 55 84 C7 I/O ST
RD8 42 68 E9 I/O ST
RD9 43 69 E10 I/O ST
RD10 44 70 D11 I/O ST
RD11 45 71 C11 I/O ST
RD12 — 79 A9 I/O ST
RD13 — 80 D8 I/O ST
RD14 — 47 L9 I/O ST
RD15 — 48 K9 I/O ST
RE0 60 93 A4 I/O ST PORTE is a bidirectional I/O port.
RE1 61 94 B4 I/O ST
RE2 62 98 B3 I/O ST
RE3 63 99 A2 I/O ST
RE4 64 100 A1 I/O ST
RE5 1 3 D3 I/O ST
RE6 2 4 C1 I/O ST
RE7 3 5 D2 I/O ST
RE8 — 18 G1 I/O ST
RE9 — 19 G2 I/O ST
RF0 58 87 B6 I/O ST PORTF is a bidirectional I/O port.
RF1 59 88 A6 I/O ST
RF2 34 52 K11 I/O ST
RF3 33 51 K10 I/O ST
RF4 31 49 L10 I/O ST
RF5 32 50 L11 I/O ST
RF6 35 55 H9 I/O ST
RF7 — 54 H8 I/O ST
RF8 — 53 J10 I/O ST
RF12 — 40 K6 I/O ST
RF13 — 39 L6 I/O ST

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
P = Power
I = Input

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
RG0 — 90 A5 I/O ST PORTG is a bidirectional I/O port.
RG1 — 89 E6 I/O ST
RG6 4 10 E3 I/O ST
RG7 5 11 F4 I/O ST
RG8 6 12 F2 I/O ST
RG9 8 14 F3 I/O ST
RG12 — 96 C3 I/O ST
RG13 — 97 A3 I/O ST
RG14 — 95 C4 I/O ST
RG15 — 1 B2 I/O ST
RG2 37 57 H10 I ST PORTG input pins.
RG3 36 56 J11 I ST
T1CK 48 74 B11 I ST Timer1 external clock input.
T2CK — 6 D1 I ST Timer2 external clock input.
T3CK — 7 E4 I ST Timer3 external clock input.
T4CK — 8 E2 I ST Timer4 external clock input.
T5CK — 9 E1 I ST Timer5 external clock input.
U1CTS 43 47 L9 I ST UART1 clear to send.
U1RTS 35, 49 48 K9 O — UART1 ready to send.
U1RX 34, 50 52 K11 I ST UART1 receive.
U1TX 33, 51 51, 53 J10, K10 O — UART1 transmit.
U2CTS 21 40 K6 I ST UART2 clear to send.
U2RTS 29 39 L6 O — UART2 ready to send.
U2RX 31 49 L10 I ST UART2 receive.
U2TX 32 50 L11 O — UART2 transmit.
SCK1 35 55, 70 D11, H9 I/O ST Synchronous serial clock input/output for SPI1.
SDI1 34 9, 54 E1, H8 I ST SPI1 data in.
SDO1 33 53, 72 D9, J10 O — SPI1 data out.
SS1 14 23, 69 E10, J2 I/O ST SPI1 slave synchronization or frame pulse I/O.
SCK2 4 10 E3 I/O ST Synchronous serial clock input/output for SPI2.
SDI2 5 11 F4 I ST SPI2 data in.
SDO2 6 12 F2 O — SPI2 data out.
SS2 8 14 F3 I/O ST SPI2 slave synchronization or frame pulse I/O.
SCL1 37, 44 57, 66 E11, H10 I/O ST Synchronous serial clock input/output for I2C1.
SDA1 36, 43 56, 67 E8, J11 I/O ST Synchronous serial data input/output for I2C1.
SCL2 32 58 H11 I/O ST Synchronous serial clock input/output for I2C2.
SDA2 31 59 G10 I/O ST Synchronous serial data input/output for I2C2.

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
I = Input
P = Power

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
TMS 23 17 G3 I ST JTAG Test mode select pin.
TCK 27 38 J6 I ST JTAG test clock input pin.
TDI 28 60 G11 I ST JTAG test data input pin.
TDO 24 61 G9 O — JTAG test data output pin.
RTCC 42 68 E9 O — Real-Time Clock Alarm Output.
CVREF- 15 28 L2 I Analog Comparator Voltage Reference (low).
CVREF+ 16 29 K3 I Analog Comparator Voltage Reference (high).
CVREFOUT 23 34 L5 O Analog Comparator Voltage Reference Output.
C1IN- 12 21 H2 I Analog Comparator 1 Negative Input.
C1IN+ 11 20 H1 I Analog Comparator 1 Positive Input.
C1OUT 21 32 K4 O — Comparator 1 Output.
C2IN- 14 23 J2 I Analog Comparator 2 Negative Input.
C2IN+ 13 22 J1 I Analog Comparator 2 Positive Input.
C2OUT 22 33 L4 O — Comparator 2 Output.
PMA0 30 44 L8 I/O TTL/ST Parallel Master Port Address Bit 0 Input (Buffered Slave modes) and Output (Master modes).
PMA1 29 43 K7 I/O TTL/ST Parallel Master Port Address Bit 1 Input (Buffered Slave modes) and Output (Master modes).
PMA2 8 14 F3 O — Parallel Master Port Address (De-multiplexed Master Modes).
PMA3 6 12 F2 O —
PMA4 5 11 F4 O —
PMA5 4 10 E3 O —
PMA6 16 29 K3 O —
PMA7 22 28 L2 O —
PMA8 32 50 L11 O —
PMA9 31 49 L10 O —
PMA10 28 42 L7 O —
PMA11 27 41 J7 O —
PMA12 24 35 J5 O —
PMA13 23 34 L5 O —
PMA14 45 71 C11 O —
PMA15 44 70 D11 O —
PMCS1 45 71 C11 O — Parallel Master Port Chip Select 1 Strobe.
PMCS2 44 70 D11 O — Parallel Master Port Chip Select 2 Strobe.

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
I = Input
P = Power

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
PMD0 60 93 A4 I/O TTL/ST Parallel Master Port Data (De-multiplexed Master mode) or Address/Data (Multiplexed Master modes).
PMD1 61 94 B4 I/O TTL/ST
PMD2 62 98 B3 I/O TTL/ST
PMD3 63 99 A2 I/O TTL/ST
PMD4 64 100 A1 I/O TTL/ST
PMD5 1 3 D3 I/O TTL/ST
PMD6 2 4 C1 I/O TTL/ST
PMD7 3 5 D2 I/O TTL/ST
PMD8 — 90 A5 I/O TTL/ST
PMD9 — 89 E6 I/O TTL/ST
PMD10 — 88 A6 I/O TTL/ST
PMD11 — 87 B6 I/O TTL/ST
PMD12 — 79 A9 I/O TTL/ST
PMD13 — 80 D8 I/O TTL/ST
PMD14 — 83 D7 I/O TTL/ST
PMD15 — 84 C7 I/O TTL/ST
PMRD 53 82 B8 O — Parallel Master Port Read Strobe.
PMWR 52 81 C8 O — Parallel Master Port Write Strobe.
PMALL 30 44 L8 O — Parallel Master Port Address Latch Enable low-byte (Multiplexed Master modes).
PMALH 29 43 K7 O — Parallel Master Port Address Latch Enable high-byte (Multiplexed Master modes).
VBUS 34 54 H8 I Analog USB Bus Power Monitor.
VUSB 35 55 H9 P — USB Internal Transceiver Supply. If the USB module is not used, this pin must be connected to VDD.
VBUSON 11 20 H1 O — USB Host and OTG Bus Power Control Output.
D+ 37 57 H10 I/O Analog USB D+.
D- 36 56 J11 I/O Analog USB D-.
USBID 33 51 K10 I ST USB OTG ID Detect.
ENVREG 57 86 A7 I ST Enable for On-Chip Voltage Regulator.
TRCLK — 91 C5 O — Trace Clock.
TRD0 — 97 A3 O — Trace Data Bits 0-3.
TRD1 — 96 C3 O —
TRD2 — 95 C4 O —
TRD3 — 92 B5 O —
PGED1 16 25 K2 I/O ST Data I/O pin for programming/debugging communication channel 1.
PGEC1 15 24 K1 I ST Clock input pin for programming/debugging communication channel 1.

Legend: CMOS = CMOS compatible input or output
ST = Schmitt Trigger input with CMOS levels
TTL = TTL input buffer
Analog = Analog input
O = Output
P = Power
I = Input

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

DS61143H-page 28 © 2011 Microchip Technology Inc.

TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

Pin Name Pin Number(1) Pin Type Buffer Type Description
64-pin QFN/TQFP 100-pin TQFP 121-pin XBGA
PGED2 18 27 J3 I/O ST Data I/O pin for programming/debugging communication channel 2.
PGEC2 17 26 L1 I ST Clock input pin for programming/debugging communication channel 2.
MCLR 7 13 F1 I/P ST Master Clear (Reset) input. This pin is an active-low Reset to the device.
AVDD 19 30 J4 P P Positive supply for analog modules. This pin must be connected at all times.
AVSS 20 31 L3 P P Ground reference for analog modules.
VDD 10, 26, 38 2, 16, 37, 46, 62 C2, C9, E5, F8, G5, H4, H6, K8 P — Positive supply for peripheral logic and I/O pins.
VCORE/VCAP 56 85 B7 P — Capacitor for Internal Voltage Regulator.
VSS 9, 25, 41 15, 36, 45, 65, 75 A8, B10, D4, D5, E7, F10, F5, G6, G7, H3 P — Ground reference for logic and I/O pins.
VREF+ 16 29 K3 I Analog Analog voltage reference (high) input.
VREF- 15 28 L2 I Analog Analog voltage reference (low) input.

Legend: CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels TTL = TTL input buffer Analog = Analog input O = Output P = Power I = Input

Note 1: Pin numbers are provided for reference only. See the “Pin Diagrams” section for device pin availability.

NOTES:

2.0 GUIDELINES FOR GETTING STARTED WITH 32-BIT MICROCONTROLLERS

Note 1: This data sheet summarizes the features of the PIC32MX3XX/4XX family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to the “PIC32 Family Reference Manual”, which is available from the Microchip web site (www.microchip.com/PIC32).

2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information.

2.1 Basic Connection Requirements

Getting started with the PIC32MX3XX/4XX family of 32-bit Microcontrollers (MCUs) requires attention to a minimal set of device pin connections before proceeding with development. The following is a list of pin names, which must always be connected:

  • All VDD and VSS pins (see Section 2.2 “Decoupling Capacitors”)
  • All AVDD and AVSS pins (regardless if ADC module is not used) (see Section 2.2 “Decoupling Capacitors”)
  • VCAP/VCORE (see Section 2.3 “Capacitor on Internal Voltage Regulator (VCAP/VCORE)”)
  • MCLR pin (see Section 2.4 “Master Clear (MCLR) Pin”)
  • PGECx/PGEDx pins used for In-Circuit Serial Programming™ (ICSP™) and debugging purposes (see Section 2.5 “ICSP Pins”)
  • OSC1 and OSC2 pins when external oscillator source is used (see Section 2.8 “External Oscillator Pins”)

Additionally, the following pins may be required:

  • VREF+/VREF- pins used when external voltage reference for ADC module is implemented

Note: The AVDD and AVSS pins must be connected independent of ADC use and ADC voltage reference source.

2.2 Decoupling Capacitors

The use of decoupling capacitors on every pair of power supply pins, such as VDD, VSS, AVDD and AVSS is required. See Figure 2-1.

Consider the following criteria when using decoupling capacitors:

  • Value and type of capacitor: Recommendation of 0.1 µF (100 nF), 10-20V. This capacitor should be a low-ESR and have resonance frequency in the range of 20 MHz and higher. It is recommended that ceramic capacitors be used.
  • Placement on the printed circuit board: The decoupling capacitors should be placed as close to the pins as possible. It is recommended to place the capacitors on the same side of the board as the device. If space is constricted, the capacitor can be placed on another layer on the PCB using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length.
  • Handling high frequency noise: If the board is experiencing high frequency noise, upward of tens of MHz, add a second ceramic-type capacitor in parallel to the above described decoupling capacitor. The value of the second capacitor can be in the range of 0.01 µF to 0.001 µF. Place this second capacitor next to the primary decoupling capacitor. In high-speed circuit designs, consider implementing a decade pair of capacitances as close to the power and ground pins as possible. For example, 0.1 µF in parallel with 0.001 µF.
  • Maximizing performance: On the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. This ensures that the decoupling capacitors are first in the power chain. Equally important is to keep the trace length between the capacitor and the power pins to a minimum thereby reducing PCB track inductance.

FIGURE 2-1: RECOMMENDED MINIMUM CONNECTION

Figure from the manual

2.2.1 BULK CAPACITORS

The use of a bulk capacitor is recommended to improve power supply stability. Typical values range from 4.7 µF to 47 µF. This capacitor should be located as close to the device as possible.

2.3 Capacitor on Internal Voltage Regulator (VCAP/VCORE)

2.3.1 INTERNAL REGULATOR MODE

A low-ESR (< 1 Ohm) capacitor is required on the VCAP/VCORE pin, which is used to stabilize the internal voltage regulator output. The VCAP/VCORE pin must not be connected to VDD, and must have a CEFC capacitor, with at least a 6V rating, connected to ground. The type can be ceramic or tantalum. Refer to Section 29.0 "Electrical Characteristics" for additional information on CEFC specifications. This mode is enabled by connecting the ENVREG pin to VDD.

2.3.2 EXTERNAL REGULATOR MODE

In this mode the core voltage is supplied externally through the VCORE/VCAP pin. A low-ESR capacitor of 10 µF is recommended on the VCAP/VCORE pin. This mode is enabled by grounding the ENVREG pin.

The placement of this capacitor should be close to the VCAP/VCORE. It is recommended that the trace length not exceed one-quarter inch (6 mm). Refer to Section 26.3 "On-Chip Voltage Regulator" for details.

2.4 Master Clear (MCLR) Pin

The MCLR pin provides for two specific device functions:

  • Device Reset
  • Device Programming and Debugging

Pulling The MCLR pin low generates a device reset. Figure 2-2 illustrates a typical MCLR circuit. During device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. Device programmers and debuggers drive the MCLR pin. Consequently, specific voltage levels (VIH and VIL) and fast signal transitions must not be adversely affected. Therefore, specific values of R and C will need to be adjusted based on the application and PCB requirements.

For example, as illustrated in Figure 2-2, it is recommended that the capacitor C, be isolated from the MCLR pin during programming and debugging operations.

Place the components shown in Figure 2-2 within one-quarter inch (6 mm) from the MCLR pin.

FIGURE 2-2: EXAMPLE OF MCLR PIN CONNECTIONS

Figure from the manual

Note 1: R ≤10 kΩ is recommended. A suggested starting value is 10 kΩ. Ensure that the MCLR pin VIH and VIL specifications are met.

2: R1 ≤ 470Ω will limit any current flowing into MCLR from the external capacitor C, in the event of MCLR pin breakdown, due to Electrostatic Discharge (ESD) or Electrical Overstress (EOS). Ensure that the MCLR pin VIH and VIL specifications are met.

3: The capacitor can be sized to prevent unintentional resets from brief glitches or to extend the device reset period during POR.

DS61143H-page 32 © 2011 Microchip Technology Inc.

2.5 ICSP Pins

The PGECx and PGEDx pins are used for In-Circuit Serial Programming™ (ICSP™) and debugging purposes. It is recommended to keep the trace length between the ICSP connector and the ICSP pins on the device as short as possible. If the ICSP connector is expected to experience an ESD event, a series resistor is recommended, with the value in the range of a few tens of Ohms, not to exceed 100 Ohms.

Pull-up resistors, series diodes and capacitors on the PGECx and PGEDx pins are not recommended as they will interfere with the programmer/debugger communications to the device. If such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. Alternately, refer to the AC/DC characteristics and timing requirements information in the respective device Flash programming specification for information on capacitive loading limits and pin input voltage high ($V_{IH}$) and input low ($V_{IL}$) requirements.

Ensure that the “Communication Channel Select” (i.e., PGECx/PGEDx pins) programmed into the device matches the physical connections for the ICSP to MPLAB® ICD 2, MPLAB ICD 3 or MPLAB REAL ICE™.

For more information on ICD 2, ICD 3 and REAL ICE connection requirements, refer to the following documents that are available on the Microchip web site.

  • “MPLAB® ICD 2 In-Circuit Debugger User’s Guide” DS51331
  • “Using MPLAB® ICD 2” (poster) DS51265
  • “MPLAB® ICD 2 Design Advisory” DS51566
  • “Using MPLAB® ICD 3” (poster) DS51765
  • “MPLAB® ICD 3 Design Advisory” DS51764
  • “MPLAB® REAL ICE™ In-Circuit Debugger User’s Guide” DS51616
  • “Using MPLAB® REAL ICE™” (poster) DS51749

2.6 JTAG

The TMS, TDO, TDI and TCK pins are used for testing and debugging according to the Joint Test Action Group (JTAG) standard. It is recommended to keep the trace length between the JTAG connector and the JTAG pins on the device as short as possible. If the JTAG connector is expected to experience an ESD event, a series resistor is recommended, with the value in the range of a few tens of Ohms, not to exceed 100 Ohms.

Pull-up resistors, series diodes and capacitors on the TMS, TDO, TDI and TCK pins are not recommended as they will interfere with the programmer/debugger communications to the device. If such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. Alternately, refer to the AC/DC characteristics and timing requirements information in the respective device Flash programming specification for information on capacitive loading limits and pin input voltage high ($V_{IH}$) and input low ($V_{IL}$) requirements.

2.7 Trace

The trace pins can be connected to a hardware-trace-enabled programmer to provide a compress real time instruction trace. When used for trace the TRD3, TRD2, TRD1, TRD0 and TRCLK pins should be dedicated for this use. The trace hardware requires a 22 Ohm series resistor between the trace pins and the trace connector.

2.8 External Oscillator Pins

Many MCUs have options for at least two oscillators: a high-frequency primary oscillator and a low-frequency secondary oscillator (refer to Section 8.0 “Oscillator Configuration” for details).

The oscillator circuit should be placed on the same side of the board as the device. Also, place the oscillator circuit close to the respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. The load capacitors should be placed next to the oscillator itself, on the same side of the board. Use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. The grounded copper pour should be routed directly to the MCU ground. Do not run any signal traces or power traces inside the ground pour. Also, if using a two-sided board, avoid any traces on the other side of the board where the crystal is placed. A suggested layout is illustrated in Figure 2-3.

FIGURE 2-3: SUGGESTED PLACEMENT OF THE OSCILLATOR CIRCUIT

Figure from the manual

2.9 Configuration of Analog and Digital Pins During ICSP Operations

If MPLAB ICD 2, ICD 3 or REAL ICE is selected as a debugger, it automatically initializes all of the Analog-to-Digital input pins (ANx) as "digital" pins by setting all bits in the ADPCFG register.

The bits in this register that correspond to the Analog-to-Digital pins that are initialized by MPLAB ICD 2, ICD 3 or REAL ICE, must not be cleared by the user application firmware; otherwise, communication errors will result between the debugger and the device.

If your application needs to use certain Analog-to-Digital pins as analog input pins during the debug session, the user application must clear the corresponding bits in the ADPCFG register during initialization of the ADC module.

When MPLAB ICD 2, ICD 3 or REAL ICE is used as a programmer, the user application firmware must correctly configure the ADPCFG register. Automatic initialization of this register is only done during debugger operation. Failure to correctly configure the register(s) will result in all Analog-to-Digital pins being recognized as analog input pins, resulting in the port value being read as a logic '0', which may affect user application functionality.

2.10 Unused I/Os

Unused I/O pins should not be allowed to float as inputs. They can be configured as outputs and driven to a logic-low state.

Alternately, inputs can be reserved by connecting the pin to VSS through a 1k to 10k resistor and configuring the pin as an input.

2.11 Referenced Sources

This device data sheet is based on the following individual chapters of the “PIC32 Family Reference Manual”. These documents should be considered as the general reference for the operation of a particular module or device feature.

Note 1: To access the documents listed below, browse to the documentation section of the PIC32MX460F512L product page on the Microchip web site (www.microchip.com) or select a family reference manual section from the following list.

In addition to parameters, features, and other documentation, the resulting page provides links to the related family reference manual sections.

  • Section 1. “Introduction” (DS61127)
  • Section 2. “CPU” (DS61113)
  • Section 3. “Memory Organization” (DS61115)
  • Section 4. “Prefetch Cache” (DS61119)
  • Section 5. “Flash Program Memory” (DS61121)
  • Section 6. “Oscillator Configuration” (DS61112)
  • Section 7. “Resets” (DS61118)
  • Section 8. “Interrupt Controller” (DS61108)
  • Section 9. “Watchdog Timer and Power-up Timer” (DS61114)
  • Section 10. “Power-Saving Features” (DS61130)
  • Section 12. “I/O Ports” (DS61120)
  • Section 13. “Parallel Master Port (PMP)” (DS61128)
  • Section 14. “Timers” (DS61105)
  • Section 15. “Input Capture” (DS61122)
  • Section 16. “Output Compare” (DS61111)
  • Section 17. “10-bit Analog-to-Digital Converter (ADC)” (DS61104)
  • Section 19. “Comparator” (DS61110)
  • Section 20. “Comparator Voltage Reference (CVREF)” (DS61109)
  • Section 21. “Universal Asynchronous Receiver Transmitter (UART)” (DS61107)
  • Section 23. “Serial Peripheral Interface (SPI)” (DS61106)
  • Section 24. “Inter-Integrated Circuit™ (I²C™)” (DS61116)
  • Section 27. “USB On-The-Go (OTG)” (DS61126)
  • Section 29. “Real-Time Clock and Calendar (RTCC)” (DS61125)
  • Section 31. “Direct Memory Access (DMA) Controller” (DS61117)
  • Section 32. “Configuration” (DS61124)
  • Section 33. “Programming and Diagnostics” (DS61129)

NOTES:

3.0 CPU

Note 1: This data sheet summarizes the features of the PIC32MX3XX/4XX family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to Section 2. “CPU” (DS61113) of the “PIC32 Family Reference Manual”, which is available from the Microchip web site (www.microchip.com/PIC32). Resources for the MIPS32® M4K® Processor Core are available at: www.mips.com/products/cores/32-64-bit-cores/mips32-m4k/.

2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information.

The MIPS32® M4K® Processor Core is the heart of the PIC32MX3XX/4XX family processor. The CPU fetches instructions, decodes each instruction, fetches source operands, executes each instruction and writes the results of instruction execution to the proper destinations.

3.1 Features

  • 5-stage pipeline
  • 32-bit Address and Data Paths
  • MIPS32 Enhanced Architecture (Release 2)
    • Multiply-Accumulate and Multiply-Subtract Instructions
    • Targeted Multiply Instruction
    • Zero/One Detect Instructions
    • WAIT Instruction
    • Conditional Move Instructions (MOVN, MOVZ)
    • Vectored interrupts
    • Programmable exception vector base
  • Atomic interrupt enable/disable
  • GPR shadow registers to minimize latency for interrupt handlers
  • Bit field manipulation instructions
  • MIPS16e® Code Compression
    • 16-bit encoding of 32-bit instructions to improve code density
    • Special PC-relative instructions for efficient loading of addresses and constants
    • SAVE & RESTORE macro instructions for setting up and tearing down stack frames within subroutines
    • Improved support for handling 8 and 16-bit data types
  • Simple Fixed Mapping Translation (FMT) mechanism
  • Simple Dual Bus Interface
    • Independent 32-bit address and data busses
    • Transactions can be aborted to improve interrupt latency
  • Autonomous Multiply/Divide Unit
    • Maximum issue rate of one 32x16 multiply per clock
    • Maximum issue rate of one 32x32 multiply every other clock
    • Early-in iterative divide. Minimum 11 and maximum 34 clock latency (dividend (rs) sign extension-dependent)
  • Power Control
    • Minimum frequency: 0 MHz
    • Low-Power mode (triggered by WAIT instruction)
    • Extensive use of local gated clocks
  • EJTAG Debug and Instruction Trace
    • Support for single stepping
    • Virtual instruction and data address/value breakpoints
    • PC tracing with trace compression

FIGURE 3-1: MIPS® M4K® BLOCK DIAGRAM

Figure from the manual

3.2 Architecture Overview

The MIPS32® M4K® Processor Core contains several logic blocks working together in parallel, providing an efficient high performance computing engine. The following blocks are included with the core:

  • Execution Unit
  • Multiply/Divide Unit (MDU)
  • System Control Coprocessor (CP0)
  • Fixed Mapping Translation (FMT)
  • Dual Internal Bus interfaces
  • Power Management
  • MIPS16e Support
  • Enhanced JTAG (EJTAG) Controller

3.2.1 EXECUTION UNIT

The MIPS32® M4K® Processor Core execution unit implements a load/store architecture with single-cycle ALU operations (logical, shift, add, subtract) and an autonomous multiply/divide unit. The core contains thirty-two 32-bit general purpose registers used for integer operations and address calculation. One additional register file shadow set (containing thirty-two registers) is added to minimize context switching overhead during interrupt/exception processing. The register file consists of two read ports and one write port and is fully bypassed to minimize operation latency in the pipeline.

The execution unit includes:

  • 32-bit adder used for calculating the data address
  • Address unit for calculating the next instruction address
  • Logic for branch determination and branch target address calculation
  • Load aligner
  • Bypass multiplexers used to avoid stalls when executing instructions streams where data producing instructions are followed closely by consumers of their results
  • Leading Zero/One detect unit for implementing the CLZ and CLO instructions
  • Arithmetic Logic Unit (ALU) for performing bitwise logical operations
  • Shifter and Store Aligner

3.2.2 MULTIPLY/DIVIDE UNIT (MDU)

The MIPS32® M4K® Processor Core includes a multiply/divide unit (MDU) that contains a separate pipeline for multiply and divide operations. This pipeline operates in parallel with the integer unit (IU) pipeline and does not stall when the IU pipeline stalls. This allows MDU operations to be partially masked by system stalls and/or other integer unit instructions.

The high-performance MDU consists of a 32x16 booth recoded multiplier, result/accumulation registers (HI and LO), a divide state machine, and the necessary multiplexers and control logic. The first number shown (‘32’ of 32x16) represents the rs operand. The second number (‘16’ of 32x16) represents the rt operand. The PIC32MX core only checks the value of the latter (rt) operand to determine how many times the operation must pass through the multiplier. The 16x16 and 32x16 operations pass through the multiplier once. A 32x32 operation passes through the multiplier twice.

The MDU supports execution of one 16x16 or 32x16 multiply operation every clock cycle; 32x32 multiply operations can be issued every other clock cycle. Appropriate interlocks are implemented to stall the issuance of back-to-back 32x32 multiply operations. The multiply operand size is automatically determined by logic built into the MDU.

Divide operations are implemented with a simple 1 bit per clock iterative algorithm. An early-in detection checks the sign extension of the dividend (rs) operand. If rs is 8 bits wide, 23 iterations are skipped. For a 16-bit-wide rs, 15 iterations are skipped, and for a 24-bit-wide rs, 7 iterations are skipped. Any attempt to issue a subsequent MDU instruction while a divide is still active causes an IU pipeline stall until the divide operation is completed.

Table 3-1 lists the repeat rate (peak issue rate of cycles until the operation can be reissued) and latency (number of cycles until a result is available) for the PIC32MX core multiply and divide instructions. The approximate latency and repeat rates are listed in terms of pipeline clocks.

TABLE 3-1: MIPS® M4K® PROCESSOR CORE HIGH-PERFORMANCE INTEGER MULTIPLY/DIVIDE UNIT LATENCIES AND REPEAT RATES

Opcode Operand Size (mul rt) (div rs) Latency Repeat Rate
MULT/MULTU, MADD/MADDU, MSUB/MSUBU 16 bits 1 1
32 bits 2 2
MUL 16 bits 2 1
32 bits 3 2
DIV/DIVU 8 bits 12 11
16 bits 19 18
24 bits 26 25
32 bits 33 32

The MIPS architecture defines that the result of a multiply or divide operation be placed in the HI and LO registers. Using the Move-From-HI (MFHI) and Move-From-LO (MFLO) instructions, these values can be transferred to the general purpose register file.

In addition to the HI/LO targeted operations, the MIPS32 architecture also defines a multiply instruction, MUL, which places the least significant results in the primary register file instead of the HI/LO register pair. By avoiding the explicit MFLO instruction, required when using the LO register, and by supporting multiple destination registers, the throughput of multiply-intensive operations is increased.

Two other instructions, multiply-add (MADD) and multiply-subtract (MSUB), are used to perform the multiply-accumulate and multiply-subtract operations. The MADD instruction multiplies two numbers and then adds the product to the current contents of the HI and LO registers. Similarly, the MSUB instruction multiplies two operands and then subtracts the product from the HI and LO registers. The MADD and MSUB operations are commonly used in DSP algorithms.

3.2.3 SYSTEM CONTROL COPROCESSOR (CP0)

In the MIPS architecture, CP0 is responsible for the virtual-to-physical address translation, the exception control system, the processor’s diagnostics capability, the operating modes (kernel, user and debug), and whether interrupts are enabled or disabled. Configuration information, such as presence of options like MIPS16e, is also available by accessing the CP0 registers, listed in Table 3-2.

TABLE 3-2: COPROCESSOR 0 REGISTERS

Register Number Register Name Function
0-6 Reserved Reserved
7 HWREna Enables access via the RDHWR instruction to selected hardware registers
8 BadVAddr(1) Reports the address for the most recent address-related exception
9 Count(1) Processor cycle count
10 Reserved Reserved
11 Compare(1) Timer interrupt control
12 Status(1) Processor status and control
12 IntCtl(1) Interrupt system status and control
12 SRSCtl(1) Shadow register set status and control
12 SRSMap(1) Provides mapping from vectored interrupt to a shadow set
13 Cause(1) Cause of last general exception
14 EPC(1) Program counter at last exception
15 PRId Processor identification and revision
15 EBASE Exception vector base register
16 Config Configuration register
16 Config1 Configuration register 1
16 Config2 Configuration register 2
16 Config3 Configuration register 3

TABLE 3-2: COPROCESSOR 0 REGISTERS (CONTINUED)

Register Number Register Name Function
17-22 Reserved Reserved
23 Debug⁽²⁾ Debug control and exception status
24 DEPC⁽²⁾ Program counter at last debug exception
25-29 Reserved Reserved
30 ErrorEPC⁽¹⁾ Program counter at last error
31 DESAVE⁽²⁾ Debug handler scratchpad register

Note 1: Registers used in exception processing.
2: Registers used during debug.

Coprocessor 0 also contains the logic for identifying and managing exceptions. Exceptions can be caused by a variety of sources, including alignment errors in data, external events or program errors. Table 3-3 shows the exception types in order of priority.

TABLE 3-3: PIC32MX3XX/4XX FAMILY CORE EXCEPTION TYPES

Exception Description
Reset Assertion MCLR or a Power-on Reset (POR)
DSS EJTAG Debug Single Step
DINT EJTAG Debug Interrupt. Caused by the assertion of the external EJ_DINT input, or by setting the EjtagBrk bit in the ECR register
NMI Assertion of NMI signal
Interrupt Assertion of unmasked hardware or software interrupt signal
DIB EJTAG debug hardware instruction break matched
AdEL Fetch address alignment errorFetch reference to protected address
IBE Instruction fetch bus error
DBp EJTAG Breakpoint (execution of SDBBP instruction)
Sys Execution of SYSCALL instruction
Bp Execution of BREAK instruction
RI Execution of a Reserved Instruction
CpU Execution of a coprocessor instruction for a coprocessor that is not enabled
CEU Execution of a CorExtend instruction when CorExtend is not enabled
Ov Execution of an arithmetic instruction that overflowed
Tr Execution of a trap (when trap condition is true)
DDBL/DDBS EJTAG Data Address Break (address only) or EJTAG Data Value Break on Store (address + value)
AdEL Load address alignment errorLoad reference to protected address
AdES Store address alignment errorStore to protected address
DBE Load or store bus error
DDBL EJTAG data hardware breakpoint matched in load data compare

DS61143H-page 40 © 2011 Microchip Technology Inc.

3.3 Power Management

The MIPS32® M4K® Processor Core offers a number of power management features, including low-power design, active power management and power-down modes of operation. The core is a static design that supports slowing or halting the clocks, which reduces system power consumption during idle periods.

3.3.1 INSTRUCTION-CONTROLLED POWER MANAGEMENT

The mechanism for invoking power-down mode is through execution of the WAIT instruction. For more information on power management, see Section 25.0 “Power-Saving Features”.

3.3.2 LOCAL CLOCK GATING

The majority of the power consumed by the PIC32MX3XX/4XX family core is in the clock tree and clocking registers. The PIC32MX family uses extensive use of local gated-clocks to reduce this dynamic power consumption.

3.4 EJTAG Debug Support

The MIPS32® M4K® Processor Core provides for an Enhanced JTAG (EJTAG) interface for use in the software debug of application and kernel code. In addition to standard user mode and kernel modes of operation, the core provides a Debug mode that is entered after a debug exception (derived from a hardware breakpoint, single-step exception, etc.) is taken and continues until a debug exception return (DERET) instruction is executed. During this time, the processor executes the debug exception handler routine.

The EJTAG interface operates through the Test Access Port (TAP), a serial communication port used for transferring test data in and out of the core. In addition to the standard JTAG instructions, special instructions defined in the EJTAG specification define what registers are selected and how they are used.

NOTES:

DS61143H-page 42 © 2011 Microchip Technology Inc.

Text converted from the manufacturer's document. A □ marks a character that could not be read in the original. Back to the Microchip PIC32 discussions