PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide
DS51806A-page 11
©
2009 Microchip Technology Inc.
In order to meet this USB suspend current requirement, a USB peripheral should be
designed so that it does not place large quiescent loads directly on the +5V V
BUS
supply line from the USB port. If large loads will be supplied from the USB port, it is
suggested that they be connected in a way that they can be turned off when the USB
port is placed in the low-power suspend state.
The PIC18F46J50 Full-Speed USB Demonstration Board has been designed with
these and other power management considerations in mind.
2.2
LEDs
Two high-efficiency, red LEDs have been included on the PIC18F46J50 Full-Speed
USB Demonstration Board. The LEDs are connected to I/O pins, RE0 and RE1, and
can be used for general purpose indication. The LEDs are connected so that they
illuminate when the I/O pin controlling them is driven high.
2.3
PUSH BUTTONS
The board has two miniature push buttons. Push button, S4, connects to Master Clear
Reset (MCLR) which resets the microcontroller.
Push button, S2, provides a simple user interface for interacting with demonstration
firmware projects. Default factory firmware is installed on the board and other USB
firmware projects are available in the MCHPFSUSB Framework. (See
The push button is connected to pin RB2 on the PIC18F46J50 microcontroller which is
pulled up to V
DD
through a 15-k
Ω
resistor. Pressing the button pulls the RB2 line to
ground.
2.4
JUMPERS
2.4.1
JP2 Jumper
JP2 is a three-pin header with the labels, “I”, “R” and “U”.
• “I” – Abbreviation referring to the ICE female header pin for the RC2 signal
• “R” – Abbreviation referring to microcontroller pin, RC2
• “U” – Abbreviation for the
USB_ATTACH
signal (see the schematics in
Appendix B. “Board Schematics”
.)
When the jumper is in the “R” to “I” position, the RC2 pin connects only to the ICE
female header pin, just like most of the other general purpose I/O pins. When the
jumper is in the “R” to “U” position, RC2 can be used to sense when the USB cable has
been attached to the host and when the host is actively providing power to the +5V
V
BUS
line.
According to the USB 2.0 specifications, no device should ever pull the D+ or D- lines
high (such as with the D+ or D- pull-up resistor) until the host actively powers the +5V
V
BUS
line. This is intended to prevent self-powered peripherals from ever sourcing
even small amounts of power to the host when the host is not powered. Small amounts
of current could potentially prevent the host (and possibly other USB peripherals
connected to that host) from fully becoming depowered, which could cause problems
during power-up and initialization.
Self-powered peripherals should periodically monitor the +5V V
BUS
line and detect
when it is driven high. Only when it is powered should user firmware enable the USB
module and turn on the D+ (for full speed) or D- (for low speed) pull-up resistor,
signaling the device attach to the host.