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.
POSCMD[1:0] Value | Primary Oscillator Source and Mode |
---|---|
11 | Off (Enables GPIO on CLKI pin) |
10 | High Frequency Mode (HS 10-32 MHz) (HS) |
01 | Medium Frequency Mode (XT 0-10 MHz) (MS) |
00 | External 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.
Assuming C1 = C2, Equation 12-4 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 that are available at the Microchip website (www.microchip.com).