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
|
{
"metadata": {
"name": "Chapter_18"
},
"nbformat": 2,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"source": [
"<h1>Chapter 18: Programmable Analog Arrays<h1>"
]
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 18.1, Page Number: 588<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"",
"import math",
"#Variable declaration",
"C=1000*10**-12; #Switche capacitor value in farads",
"R=1000; #resistance in ohms",
"",
"#calculation",
"T=R*C; #Time period",
"f=1/T; #Frequency at which switch should operate",
"f=math.ceil(f)",
"#Result",
"print('Frequency at which each switch should operate(in hertz) is \\n %d' %f)",
"print('Duty cycle should be 50%')"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Frequency at which each switch should operate(in hertz) is ",
" 1000000",
"Duty cycle should be 50%"
]
}
],
"prompt_number": 1
}
]
}
]
}
|