CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Crystal drive level sanity check....

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

Crystal drive level sanity check....
PostPosted: Wed Feb 28, 2007 5:25 pm     Reply with quote

I've never worried about crystal drive before, but for some reason I started to today. I'm about to start the layout of a new board and I'm wondering if I need a series resistor in the crystal circuit or not. If my calculations are correct, I don't, but I'd like someone to tell me if I made a mistake or not.

Here goes....

Crystal specs: 18.432 MHz AT strip-cut, series resistance at resonance 40 ohms max, max drive level 0.5 milliwatt (500 microwatt).

PIC will be running at 5V, HS oscillator mode.

RMS voltage from OSC2 pin calc is as follows: Worst case (highest V), is that the signal coming from OSC2 pin is a 5V square wave, 50% duty cycle. RMS voltage of a DC offset square wave is

Vrms = square root(Vdc^2 + Vacmax^2) = root(2.5^2 + 2.5^2) = 3.54V

From PIC's data sheet (18F2680 by the way), the maximum leakage current into/out of OSC1 pin is +/- 5uA. Which implies that the input impedance of the OSC1 pin is 1 Mohm.

My reasoning then suggests that a 3.54Vrms voltage source is driving a 40 ohm resistance (the crystal) and a series 1 Mohm resistance (the PIC). Total power dissipation of the entire circuit is then

Ptotal = 3.54V^2/(1,000,040 ohms) = 12.5 microwatts.

The crystal's share of this will be absolutely negligible. Certainly much, much less than its 500 microwatt maximum.

Which brings me to my query: if I did my calculations right (and please correct me if I didn't), why does the datasheet suggest that I may need a series resistor of about 330 ohms in order not to overdrive the crystal when it's not going to happen anyway? I guess that begs another question, are there crystals which have maximum drive levels in the microwatt or less range? [I've looked but haven't been able to find any]
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 28, 2007 5:35 pm     Reply with quote

See page 17:
http://ww1.microchip.com/downloads/en/devicedoc/osilator.pdf

See page 3:
http://ww1.microchip.com/downloads/en/AppNotes/00838a.pdf


This appnote has waveforms of overdriven crystals. This is
the best one yet:
http://ww1.microchip.com/downloads/en/AppNotes/00849a.pdf
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Wed Feb 28, 2007 5:56 pm     Reply with quote

Thanks PCM. Great information.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group