1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 6: Digitally Controlled Frequency Synthesizers : PLLs"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"example 6.1, Page No. 247"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# PLL circuit parameters(refere fig. 6.13)\n",
"\n",
"import math\n",
"#Variable declaration\n",
"Ct = 0.005 *10**-6 # external capacitor for VCO\n",
"Rt = 10*10**3 # external resistance for VCO\n",
"V = 20.0 # supply voltage(V_positive - V_negative) \n",
"C = 10*10**-6 # capacitance\n",
"\n",
"#Calculations\n",
"#(i)\n",
"fout = 0.25/(Rt*Ct)\n",
"\n",
"#(ii)\n",
"fL = 8*fout/V\n",
"\n",
"#(iii)\n",
"fC = fL/(2*math.pi*3.6*10**3*C)\n",
"fC = math.sqrt(fC)\n",
"\n",
"#in kHz\n",
"fout = fout/10**3\n",
"fL = fL/10**3\n",
"\n",
"#Result\n",
"print(\"(i)free running frequency, fout = %.0fkHz\\n(ii)Lock range, fL = +/-%.0f kHz\\n(iii)Calpture range, fC = +/-%d Hz\"%(fout,fL,fC))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(i)free running frequency, fout = 5kHz\n",
"(ii)Lock range, fL = +/-2 kHz\n",
"(iii)Calpture range, fC = +/-94 kHz\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"example 6.2, Page No. 254"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Digital frequency synthesizer\n",
"\n",
"import math\n",
"#Variable declaration\n",
"R = 4 # resolution of digital frequency synthesizer\n",
"Fm = 200*10**3 # maximum frequency output\n",
"\n",
"#Calculations\n",
"fclk = Fm*2.2\n",
"k = fclk/R\n",
"n = math.log(k)/math.log(2)\n",
"\n",
"#Result\n",
"print(\"frequency of reference oscillator = %.0f kHz\\nno of bits required = %.0f\"%(fclk/1000,math.ceil(n)))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"frequency of reference oscillator = 440 kHz\n",
"no of bits required = 17\n"
]
}
],
"prompt_number": 13
}
],
"metadata": {}
}
]
}
|