Datasheet
2012 Microchip Technology Inc. DS30684A-page 49
PIC18(L)F2X/45K50
3.14 Oscillator Settings for USB
When the PIC18(L)F2X/45K50 family devices are used
for USB connectivity, a 6 MHz or 48 MHz clock must be
provided to the USB module for operation in either
Low-Speed or Full-Speed modes, respectively. This
may require some forethought in selecting an oscillator
frequency and programming the device.
The full range of possible oscillator configurations
compatible with USB operation is shown in Table 3-7.
3.14.1 LOW-SPEED OPERATION
The USB clock for Low-Speed mode is derived from the
primary oscillator or from the PLL. In order to operate
the USB module in Low-Speed mode, a 6 MHz clock
must be provided to the USB module.
See Table 3-6 and Tab le 3-7 for possible combinations
which can be used for low-speed USB operation.
TABLE 3-6: CLOCK FOR LOW-SPEED USB
System Clock CPUDIV<1:0> Microcontroller Clock LS48MHZ USB Clock
48 11 48 MHz 1 48/8 = 6 MHz
48 10 48/2 = 24 MHz 1 48/8 = 6 MHz
48 01 48/3 = 16 MHz 1 48/8 = 6 MHz
48 00 48/6 = 8 MHz 1 48/8 = 6 MHz
24 11 24 MHz 0 24/4 = 6 MHz
24 10 24/2 = 12 MHz 0 24/4 = 6 MHz
24 01 24/3 = 8 MHz 0 24/4 = 6 MHz
24 00 24/6 = 4 MHz 0 24/4 = 6 MHz
TABLE 3-7: OSCILLATOR CONFIGURATION OPTIONS FOR USB OPERATION
Input Oscillator Frequency
Clock Mode
(FOSC<3:0>)
MCU Clock Division
(CPUDIV<1:0>)
Microcontroller
Clock Frequency
48 MHz EC
None (11)
48 MHz
2 (10)24MHz
3 (01)16MHz
6 (00)8MHz
16 MHz EC, HS or INTOSC with 3xPLL
None (11)48MHz
2 (10)24MHz
3 (01)16MHz
6 (00)8MHz
12 MHz EC or HS with 4xPLL
None (11)48MHz
2 (10)24MHz
3 (01)16MHz
6 (00)8MHz
24 MHz EC or HS
(1)
None (11)24MHz
2 (10)12MHz
3 (01)8MHz
6 (00)4MHz
Note 1: The 24 MHz mode (without PLL) is only compatible with low-speed USB. Full-speed USB requires a 48 MHz system
clock.