is cherries on the cheesecake.
Figure 1 ties up all of the loose ends as far as what’s
inside the new PIC32MX795F512L. Now we can match
up USB with Ethernet, or CAN with USB, or SPI with USB,
just to point out a few of the possible combinations. (I
think you get the idea.) So, let’s go do what we came here
to do. Let’s build up some PIC32 hardware and teach it to
THE HARDWARE DESIGN
The PIC32MX795F512L hardware design I’m offering
to you is best understood by breaking down the complete
design shown in Schematic 1 into smaller subsystems. So,
let’s walk our way around the beginning with the first
The PIC32 is a 100-pin device with pins spaced at
0.40 mm. Of the 100 pins, 14 are designated as power
entry or ground points. Capacitors C1, C2, C3, C4, C5,
C6, C7, and C11 are 100 nF power supply bypass
components. To keep the power supply bypass capacitors
as close as possible to their power pins, I chose to
populate these capacitors in 0603 packages.
The PIC32MX795F512L can operate with a supply
voltage as low as 2. 3 VDC or as high as 3. 6 VDC. As you
can see in Schematic 1, our design is powered by a 3. 3
VDC supply. Thus, the I/O logic levels will be based on
this as the peripheral I/O subsystem is powered from the
power entry and ground pins. It’s a different story when
we traverse around to pin 84.
The PIC’s CPU core requires 1.8 VDC. To this end,
its designers included an internal 1.8 VDC voltage
regulator which requires the use of a filter capacitor as
shown in the schematic. C10 is a low-ESR 10 µF 6. 3
WV ceramic capacitor in a 0805 SMT package. The
value and voltage rating of C10 is not something that I
pulled out of the air. The PIC32 datasheet states that the
1.8 volt voltage regulator filter capacitor must be a
low-ESR type that is rated at a minimum of 6. 3 working
volts. So, that’s that.
If you’re wondering where the power supply bypass
capacitor is for pin 85, it is tied to 3. 3 VDC for proper
operation. (Pin 85 was the ENVREG pin.) I didn’t find any
bypass capacitor attached to pin 85 in the official
Microchip documentation. So, I took the monkey see,
monkey do stance.
It took a while, but now I’m very comfortable with
Microchip supplying the microcontrollers and the
peripheral devices in my circuits. Those 0603 SMT power
supply bypass capacitors in our PIC32MX795F512L design
are working behind a regulated power supply voltage
under the control of a TC1262 voltage regulator. The
TC1262’s 5.0 volt input voltage is derived from the VBUS
pin of the host USB portal. The TC1262 is a 500 mA LDO
(Low Dropout) voltage regulator that only requires a 1 µF
low-ESR filter capacitor at its input and output pins for
stability. In most cases, up to a point, more is better when
it comes to voltage regulator support capacitors. After
THE DESIGN CYCLE
thorough study, I didn’t find any official designs that used
the minimum TC1262 capacitor configuration. I did find a
reference design that used 4. 7 µF filter/stability capacitors.
So, once again I swung with the monkeys.
The next dedicated connection is found at pin 13
which happens to be the MCLR pin. Note the absence
of all of the normal ICSP resistors and capacitors I
normally place around the MCLR pin. All the PIC MCLR
pin requires is a 4,700 Ω pullup resistor. In the case of
the PIC32MX795F512L, Microchip tells us to avoid
placing the legacy resistor/capacitor reset componentry
on the MCLR pin as the capacitance may interfere with
the programming and debugging processes. If an MCLR
reset capacitor is required, the design should allow the
reset capacitor to be jumpered in and out of the MCLR
The pair of LEDs attached to the RB0 and RB1 I/O
pins are intended to be used as USB state indicators.
However, the programmer can commandeer them for
other purposes as he or she sees fit.
The PIC32MX795F512L pins out two sets of ICSP
clock and data pins: PGEC1-PGED1 and PGEC2-PGED2.
The set of ICSP clock and data pins that become active is
determined by configuration bits, which are set by the
PIC32 programmer. Here’s how PGEC2 and PGED2 were
#pragma config ICESEL = ICS_PGx2
// ICE/ICD Comm Channel Select
Moving forward from ICSP pins 26 and 27, we
encounter the trio of power inputs before landing on pin
50 which is configured as an output I/O pin. If you take a
look at the code, you’ll see that this pin only goes logically
low after the USB connection is validated and activated.
When pin 50 goes logically low, the TPS2041B’s EN pin is
driven low and the TPS2041B switches + 5.0 VDC into the
5.0 volt area of the four-layer printed circuit board’s Power
PIC32MX795F512L TRAINER Hardware Support
EDTP Electronics, Inc.
MPLAB C32 Compiler for PIC32 Microcontrollers
PIC32MX795F512L TRAINER Printed Circuit Board
Kadtronix USB HID API Library
January 2010 63