blob: 5d9189a9a9fbfddd0eacfd137f5c32b2ea585eeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
clear//
//Variables
L = 0.33 //Inductance (in Henry)
C1 = 0.065 * 10**-12 //Capacitance (in Farad)
C2 = 1.0 * 10**-12 //Capacitance (in Farad)
R = 5.5 * 10**3 //Resistance (in ohm)
//Calculation
fs = 1/(2*%pi*(L*C1)**0.5) //Series Resonant frequency (in Hertz)
Qfactor = 2*%pi*fs*L/R //Q-factor
//Result
printf("\n Series resonant frequency is %0.2f MHz.\nQ-factor of the crystal is %0.1f .",fs*10**-6,Qfactor)
|