15.4.3 Primary Oscillator (POSC)

The PIC32A devices contain one instance of the Primary Oscillator (POSC). The POSC is available on the OSCI and OSCO pins of the PIC32A devices. This connection enables an external crystal (or ceramic resonator) to provide the clock to the device. The POSC provides three modes of operation:

  • Medium Speed Oscillator (MS Mode)
    • The MS mode is a Medium Gain, Medium Frequency mode used to work with crystal frequencies of 3.5 MHz to 10 MHz.
  • High-Speed Oscillator (HS Mode)
    • The HS mode is a High Gain, High-Frequency mode used to work with crystal frequencies of 10 MHz to 32 MHz.
  • External Clock Source Operation (EC Mode)
    • If the on-chip oscillator is not used, the EC mode allows the internal oscillator to be bypassed. The device clocks are generated from an external source (see Table 40-24 for constraints) and input on the OSCI pin.

The POSCMD[1:0] bits in the Oscillator Configuration register (OSCCFG) specify the POSC mode. Table 15-32 provides the options selected by specific bit configurations, which are programmed at the time of device programming.

Table 15-32. Primary Oscillator Clock Source Options
POSCMD[1:0]
ValuePrimary Oscillator Source and Mode
11Disabled (GPIO function)
10High-Frequency Mode (HS)
01Medium Frequency Mode (MS)
00External Clock Mode (EC)

Figure 15-5 is a recommended crystal oscillator circuit diagram for the PIC32A devices. Capacitors C1 and C2 form the Load Capacitance (Cl) for the crystal. The optimum Load Capacitance for a given crystal is specified by the crystal manufacturer. Load Capacitance can be calculated as shown in Equation 15-6.

Figure 15-5. Crystal or Ceramic Resonator Operation (XT or HS Oscillator Mode)
Equation 15-6. Crystal Load Capacitance
Note: Where Cs is the stray capacitance.

Assuming C1 = C2, Equation 15-7 gives the capacitor value (C1, C2) for a given load and stray capacitance.

Equation 15-7. External Capacitor for Crystal

For more information on crystal oscillators and their operation, refer to “Related Application Notes.”