Searching \ for 'novice oscillator questions' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/timers.htm?key=oscillator
Search entire site for: 'novice oscillator questions'.

Truncated match.
PICList Thread
'novice oscillator questions'
1996\04\03@172057 by Tom Sgouros

flavicon
face
Hello all:

I have been messing about with a PICDEM demonstration board and a 16C74,
getting ready to put together an RS232 device, and I have some questions
about the oscillators and their use.

The board comes with an R oscillator built on it, and you can disable it
with a jumper and install a crystal. The documentation for the board says
the R and C are chosen to give about a 2 MHz oscillator.

Anyway here are the questions:

  1. I measured the actual rate of the RC oscillator, and found it to be
909091 Hz. If I put the scope probe on pin OSC1, I see a sawtooth wave. If
I look on OSC2, I see a more-or-less square wave with the same period as
the sawtooth. If I read my spec sheet, it says the frequency on OSC2
should be 1/4 times what I see on OSC1. What am I doing wrong here?

  2. I bought a 4 MHz crystal and some 22pF capacitors. When I insert
these into the holes provided for their use on the board, I can only find
a (very weak--fractions of a volt peak-to-peak) signal that gives me
around 200 KHz. The signal is much weaker than it was for the RC
oscillator, and doesn't look to me like a very healthy one either. It sort
of has regular spikes, but I wouldn't call it a triangle wave or a
sawtooth. (What shape does an oscillating crystal make?) I gather from
some recent discussion on the subject that not all crystals are created
alike, but shouldn't I at least be able to get close?

Many thanks for your help.

Incidentally, the OSC pins and crystal and caps on the board are arranged
sort of like this:

OSC1=----------------o-------------||-------GND
                    |             C1
                    |
                  crystal
                    |
                    |             C2
OSC2=----------------o-------------||-------GND

This looks pretty normal to me. (But then if I knew what I was talking
about, I wouldn't be posting this query.)

---------------------------------------------------------------------
spam_OUTtomssTakeThisOuTspamids.net - 401-861-2831 - 42 Forge Road, Potowomut, RI 02818 USA

1996\04\04@012143 by Andrew Warren

face
flavicon
face
Tom Sgouros <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> 1. I measured the actual rate of the RC oscillator, and found it to
> be 909091 Hz. If I put the scope probe on pin OSC1, I see a
> sawtooth wave. If I look on OSC2, I see a more-or-less square wave
> with the same period as the sawtooth. If I read my spec sheet, it
> says the frequency on OSC2 should be 1/4 times what I see on OSC1.
> What am I doing wrong here?

   Tom:

   You're probably loading down the oscillator with your scope
   probe; the only pin that's safe to look at with any old probe is
   OSC2.

{Quote hidden}

   Yes, but only if you've remembered to program the PIC's
   configuration bits for "XT Oscillator" mode.

   -Andy

Andrew Warren - fastfwdspamKILLspamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\04\04@012733 by John Payson

flavicon
face
>    1. I measured the actual rate of the RC oscillator, and found it to be
> 909091 Hz. If I put the scope probe on pin OSC1, I see a sawtooth wave. If
> I look on OSC2, I see a more-or-less square wave with the same period as
> the sawtooth. If I read my spec sheet, it says the frequency on OSC2
> should be 1/4 times what I see on OSC1. What am I doing wrong here?

The act of putting the probe on the active part of the oscillator will
add some capacitive loading and, in the case of an RC oscillator, slow
it down.  While it would seem strange that the OSC2 would be running at
about 1MHz for an RC spec'ed at about 2MHz, it could be that the part is
simply not very accurate or that you didn't measure the OSC2 output freq.
very well (did you measure it, or just eyeball it as being similar to OSC1)?

>    2. I bought a 4 MHz crystal and some 22pF capacitors. When I insert
> these into the holes provided for their use on the board, I can only find
> a (very weak--fractions of a volt peak-to-peak) signal that gives me
> around 200 KHz. The signal is much weaker than it was for the RC
> oscillator, and doesn't look to me like a very healthy one either. It sort
> of has regular spikes, but I wouldn't call it a triangle wave or a
> sawtooth. (What shape does an oscillating crystal make?) I gather from
> some recent discussion on the subject that not all crystals are created
> alike, but shouldn't I at least be able to get close?

Putting the probe on a crystal oscillator, especially on OSC1, will cause
it to run poorly.  Note as well, you must reprogram the PIC's oscillator
configuration fuse when you change oscillator types.  I'd suggest checking
the oscillator type fuse, and also checking oscillator frequency without
loading the crystal [best way to do that is to write a loop to wiggle a port
pin and see how fast the pin wiggles.]

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...