English
Language : 

PIC24FJ256DA210 Datasheet, PDF (243/408 Pages) Microchip Technology – 64/100-Pin, 16-Bit Flash Microcontrollers with Graphics Controller and USB On-The-Go (OTG)
PIC24FJ256DA210 FAMILY
18.1.2.3 VBUS Voltage Generation with
External Devices
When operating as a USB host, either as an A-device
in an OTG configuration or as an embedded host, VBUS
must be supplied to the attached device.
PIC24FJ256DA210 family devices have an internal
VBUS boost assist to help generate the required 5V
VBUS from the available voltages on the board. This is
comprised of a simple PWM output to control a Switch
mode power supply, and built-in comparators to
monitor output voltage and limit current.
To enable voltage generation:
1. Verify that the USB module is powered
(U1PWRC<0> = 1) and that the VBUS discharge
is disabled (U1OTGCON<0> = 0).
2. Set the PWM period (U1PWMRRS<7:0>) and
duty cycle (U1PWMRRS<15:8>) as required.
3. Select the required polarity of the output signal
based on the configuration of the external circuit
with the PWMPOL bit (U1PWMCON<9>).
4. Select the desired target voltage using the
VBUSCHG bit (U1OTGCON<1>).
5. Enable the PWM counter by setting the CNTEN
bit to ‘1’ (U1PWMCON<8>).
6. Enable the PWM module by setting the PWMEN
bit (U1PWMCON<15>) to ‘1’.
7. Enable the VBUS generation circuit
(U1OTGCON<3> = 1).
Note:
This section describes the general
process for VBUS voltage generation and
control. Please refer to the “PIC24F
Family Reference Manual” for additional
examples.
18.1.3 USING AN EXTERNAL INTERFACE
Some applications may require the USB interface to be
isolated from the rest of the system.
PIC24FJ256DA210 family devices include a complete
interface to communicate with and control an external
USB transceiver, including the control of data line
pull-ups and pull-downs. The VBUS voltage generation
control circuit can also be configured for different VBUS
generation topologies.
Refer to the “PIC24F Family Reference Manual”,
Section 27. “USB On-The-Go (OTG)” for information
on using the external interface.
18.1.4
CALCULATING TRANSCEIVER
POWER REQUIREMENTS
The USB transceiver consumes a variable amount of
current depending on the characteristic impedance of
the USB cable, the length of the cable, the VUSB supply
voltage and the actual data patterns moving across the
USB cable. Longer cables have larger capacitances
and consume more total energy when switching output
states. The total transceiver current consumption will
be application-specific. Equation 18-1 can help
estimate how much current actually may be required in
full-speed applications.
Refer to the “PIC24F Family Reference Manual”,
Section 27. “USB On-The-Go (OTG)” for a complete
discussion on transceiver power consumption.
EQUATION 18-1: ESTIMATING USB TRANSCEIVER CURRENT CONSUMPTION
IXCVR =
40 mA • VUSB • PZERO • PIN • LCABLE
3.3V • 5m
+ IPULLUP
Legend: VUSB – Voltage applied to the VUSB pin in volts (3.0V to 3.6V).
PZERO – Percentage (in decimal) of the IN traffic bits sent by the PIC® microcontroller that are a value
of ‘0’.
PIN – Percentage (in decimal) of total bus bandwidth that is used for IN traffic.
LCABLE – Length (in meters) of the USB cable. The USB 2.0 Specification requires that full-speed
applications use cables no longer than 5m.
IPULLUP – Current which the nominal, 1.5 k pull-up resistor (when enabled) must supply to the USB
cable.
 2010 Microchip Technology Inc.
DS39969B-page 243