EasyManua.ls Logo

Microchip Technology dsPIC30F - Design Tips

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
dsPIC30F Family Reference Manual
DS70054C-page 7-26 © 2004 Microchip Technology Inc.
7.18 Design Tips
Question 1: When looking at the OSC2 pin after power-up with an oscilloscope, there is
no clock. What can cause this?
Answer:
1. Entering Sleep mode with no source for wake-up (such as, WDT, MCLR
, or an interrupt).
Verify that the code does not put the device to Sleep without providing for wake-up. If it is
possible, try waking it up with a low pulse on MCLR
. Powering up with MCLR held low will
also give the crystal oscillator more time to start-up, but the Program Counter will not
advance until the MCLR
pin is high.
2. The wrong Clock mode is selected for the desired frequency. For a blank device, the
default oscillator is EC + 16x PLL. Most parts come with the clock selected in the Default
mode, which will not start oscillation with a crystal or resonator. Verify that the Clock mode
has been programmed correctly.
3. The proper power-up sequence has not been followed. If a CMOS part is powered through
an I/O pin prior to power-up, bad things can happen (latchup, improper start-up, etc.). It is
also possible for brown-out conditions, noisy power lines at start-up, and slow V
DD rise
times to cause problems. Try powering up the device with nothing connected to the I/O,
and power-up with a known, good, fast rise, power supply. Refer to the power-up
information in the device data sheet for considerations on brown-out and power-up
sequences.
4. The C1 and C2 capacitors attached to the crystal have not been connected properly or
are not the correct values. Make sure all connections are correct. The device data sheet
values for these components will usually get the oscillator running; however, they just
might not be the optimal values for your design.
Question 2: The device starts, but runs at a frequency much higher than the resonant
frequency of the crystal.
Answer: The gain is too high for this oscillator circuit. Refer to Section 7.6 “Crystal Oscilla-
tors/Ceramic Resonators” to aid in the selection of C2 (may need to be higher), Rs (may be
needed) and Clock mode (wrong mode may be selected). This is especially possible for low
frequency crystals, like the common 32.768 kHz.
Question 3: The design runs fine, but the frequency is slightly off. What can be done to
adjust this?
Answer: Changing the value of C1 has some effect on the oscillator frequency. If a SERIES
resonant crystal is used, it will resonate at a different frequency than a PARALLEL resonant
crystal of the same frequency call-out. Ensure that you are using a PARALLEL resonant crystal.
Question 4: The board works fine, then suddenly quits or loses time.
Answer: Other than the obvious software checks that should be done to investigate losing time,
it is possible that the amplitude of the oscillator output is not high enough to reliably trigger the
oscillator input. Look at the C1 and C2 values and ensure that the device configuration bits are
correct for the desired oscillator mode.
Question 5: If I put an oscilloscope probe on an oscillator pin, I don’t see what I expect.
Why?
Answer: Remember that an oscilloscope probe has capacitance. Connecting the probe to the
oscillator circuitry will modify the oscillator characteristics. Consider using a low capacitance
(active) probe.

Table of Contents

Other manuals for Microchip Technology dsPIC30F