12.4.3 Primary Oscillator (POSC)

The dsPIC33A devices contain one instance of the Primary Oscillator (POSC). The POSC is available on the OSCI and OSCO pins of the dsPIC33A 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 (XT Mode)
    • The XT 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 (from 0 MHz to up to 64 MHz) and input on the OSCI pin.

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

Table 12-6. Primary Oscillator Clock Source Options
POSCMD[1:0]
ValuePrimary Oscillator Source and Mode
11Off (Enables GPIO on CLKI pin)
10High Frequency Mode (HS 10-32 MHz) (HS)
01Medium Frequency Mode (XT 0-10 MHz) (MS)
00External Clock Mode (EC)

Figure 12-4 is a recommended crystal oscillator circuit diagram for the dsPIC33A 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 12-3.

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

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

Equation 12-4. External Capacitor for Crystal

For more information on crystal oscillators and their operation, refer to related Application Notes that are available at the Microchip website (www.microchip.com).