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

If statement in isr
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 20056

View user's profile Send private message

PostPosted: Sun Dec 29, 2019 4:31 am     Reply with quote

Crystals require two capacitors not one.
33pF, sounds rather large. Depends on the specification for the crystal you
use and the capacitances of your board layout in this area.
A typical 'watch' crystal, will be rated for a load capacitance of perhaps 12pF
to 20pF.
Now the external capacitors need when added to the track and chip
capacitance and treated as being in series across the crystal, to give it's
rated capacitance. The typical chip input gives a capacitance of perhaps 4pF.
Your traces typically if kept short about the same. So the trace and pin
give between perhaps 7 and 10pF. Some watch crystals are designed for
a load capacitance of only about 7 or 8pF, and these are designed for use
without any external capacitances. For a 20pF rated crystal, the capacitors
needed would be:

(20 * 2) - 9 = 31pF (assuming track & pin=9pF)

So this would be the crystal that wants about a 32pF capacitor.

However for the 12pF crystal, the capacitance would want to be:

(12*2) - 9 = 15pF

This would be a much more typical value for a 'watch' crystal. Most of these
are rated for capacitance's like this.
The '*2', is because of the capacitances being treated as being in series.
temtronic



Joined: 01 Jul 2010
Posts: 9632
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Dec 29, 2019 8:24 am     Reply with quote

As Mr. T points out there is some PROPER design of PCB and components that needs to be done to get a 'watch crystal' running correctly.
Be sure to clean the solder joints and PCB. Any residue left can affect timing, especially in humid condiftions.
Providing you're using a real crystal for the main clock, the SW RTC code, should/would be more accurate over the long haul.
Also, if a long term project, you'll need battery backup and SW to keep the clock ticking !
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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