English
Language : 

PIC24FJ128GC010 Datasheet, PDF (168/472 Pages) Microchip Technology – 16-Bit Flash Microcontrollers with 12-Bit Pipeline A/D, Sigma-Delta A/D, USB On-The-Go and XLP Technology
PIC24FJ128GC010 FAMILY
9.6.1
CONSIDERATIONS FOR USB
OPERATION
When using the USB On-The-Go module in
PIC24FJ128GC010 family devices, users must always
observe these rules in configuring the system clock:
• The oscillator modes listed in Table 9-3 are the
only oscillator configurations that permit USB oper-
ation. There is no provision to provide a separate
external clock source to the USB module.
• For USB operation, the selected clock source
(EC, HS or XT) must meet the USB clock
tolerance requirements.
• When the FRCPLL Oscillator mode is used for
USB applications, the FRC self-tune system
should be used as well. While the FRC is accu-
rate, the only two ways to ensure the level of
accuracy required by the “USB 2.0 Specification”,
throughout the application’s operating range, are
either the self-tune system or manually changing
the TUN<5:0> bits.
• The user must always ensure that the FRC
source is configured to provide a frequency of
4 MHz or 8 MHz (RCDIV<2:0> = 001 or 000) and
that the USB PLL prescaler is configured
appropriately.
• All other oscillator modes are available; however,
USB operation is not possible when these modes
are selected. They may still be useful in cases
where other power levels of operation are
desirable and the USB module is not needed (e.g.,
the application is Sleeping and waiting for a bus
attachment).
9.7 Reference Clock Output
In addition to the CLKO output (FOSC/2) available in
certain oscillator modes, the device clock in the
PIC24FJ128GC010 family devices can also be config-
ured to provide a reference clock output signal to a port
pin. This feature is available in all oscillator configura-
tions and allows the user to select a greater range of
clock submultiples to drive external devices in the
application.
This reference clock output is controlled by the
REFOCON register (Register 9-4). Setting the ROEN bit
(REFOCON<15>) makes the clock signal available on
the REFO pin. The RODIV<3:0> bits (REFOCON<11:8>)
enable the selection of 16 different clock divider options.
The ROSSLP and ROSEL bits (REFOCON<13:12>)
control the availability of the reference output during
Sleep mode. The ROSEL bit determines if the oscillator
on OSC1 and OSC2, or the current system clock
source, is used for the reference clock output. The
ROSSLP bit determines if the reference source is
available on REFO when the device is in Sleep mode.
To use the reference clock output in Sleep mode, both
the ROSSLP and ROSEL bits must be set. The device
clock must also be configured for one of the primary
modes (EC, HS or XT); otherwise, if the POSCEN bit is
not also set, the oscillator on OSC1 and OSC2 will be
powered down when the device enters Sleep mode.
Clearing the ROSEL bit allows the reference output
frequency to change as the system clock changes
during any clock switches.
9.8 Secondary Oscillator
9.8.1 BASIC SOSC OPERATION
PIC24FJ128GC010 family devices do not have to set
the SOSCEN bit to use the Secondary Oscillator. Any
module requiring the SOSC (such as RTCC, Timer1 or
DSWDT) will automatically turn on the SOSC when the
clock signal is needed. The SOSC, however, has a long
start-up time (as long as 1 second).To avoid delays for
peripheral start-up, the SOSC can be manually started
using the SOSCEN bit.
To use the Secondary Oscillator, the SOSCSEL bit
(CW3<8>) must be set to ‘1’. Programming the
SOSCSEL bit to ‘0’ configures the SOSC pins for Digital
mode, enabling digital I/O functionality on the pins.
9.8.2 CRYSTAL SELECTION
The 32.768 kHz crystal used for the SOSC must have
the following specifications in order to properly start up
and run at the correct frequency:
• 12.5 pF loading capacitance
• 1.0 pF shunt capacitance
• A typical ESR of 50K; 70K maximum
In addition, the two external crystal loading capacitors
should be in the range of 22-27 pF, which will be based
on the PC board layout. The capacitors should be C0G,
5% tolerance and rated 25V or greater.
The accuracy and duty cycle of the SOSC can be
measured on the REFO pin and is recommended to be
in the range of 40-60% and accurate to ±0.65Hz.
Note:
Do not enable the LCD segment pin,
SEG17, on RD0 when using the 64-pin
package if the SOSC is used for
time-sensitive applications. Avoid
high-frequency traces adjacent to the
SOSCO and SOSCI pins as this can
cause errors in the SOSC frequency
and/or duty cycle.
DS30009312B-page 168
 2012-2013 Microchip Technology Inc.