English
Language : 

PIC24FJ256GB210 Datasheet, PDF (237/386 Pages) Microchip Technology – 64/100-Pin, 16-Bit Flash Microcontrollers with USB On-The-Go (OTG)
PIC24FJ256GB210 FAMILY
FIGURE 18-7:
OTG INTERFACE EXAMPLE
Micro A/B
Connector
4.7 µF
VBUS
D+
D-
ID
GND
1 µF
MCP1253
GND
C+
VIN
SELECT
C-
VOUT
SHND
PGOOD
40 k
VDD
PIC® MCU
10 µF
I/O
I/O
VBUS
D+
D-
ID
VSS
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.
PIC24FJ256GB210 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.
PIC24FJ256GB210 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.
 2010 Microchip Technology Inc.
DS39975A-page 237