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.
POSCMD[1:0] Value | Primary Oscillator Source and Mode |
---|---|
11 | Disabled (GPIO function) |
10 | High-Frequency Mode (HS) |
01 | Medium Frequency Mode (MS) |
00 | External 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.
Assuming C1 = C2, Equation 15-7 gives the capacitor value (C1, C2) for a given load and stray capacitance.
For more information on crystal oscillators and their operation, refer to “Related Application Notes.”