summaryrefslogtreecommitdiff
path: root/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-08-28 16:53:23 +0530
committerThomas Stephen Lee2015-08-28 16:53:23 +0530
commitdb0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch)
treeb95975d958cba9af36cb1680e3f77205354f6512 /Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb
parent5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff)
downloadPython-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip
add books
Diffstat (limited to 'Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb')
-rw-r--r--Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb107
1 files changed, 107 insertions, 0 deletions
diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb
new file mode 100644
index 00000000..9e3c7e2e
--- /dev/null
+++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb
@@ -0,0 +1,107 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:35cefa1a4ef186a1d32cec5eab7cbcc5a59aadb0b75b7fb4053796fe08e1ae51"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter -6 Digitally Controlled Frequency Synthesizers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 - Page 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "import math\n",
+ "from fractions import Fraction \n",
+ "# Given data\n",
+ "R1= 15*10**3 # in \u03a9\n",
+ "C1= 0.01*10**-6 # in F\n",
+ "C2= 10*10**-6 # in F\n",
+ "R2= 3.6*10**3 # in \u03a9\n",
+ "Vpos= 12 # in V\n",
+ "Vneg= -12 # in V\n",
+ "f_out= 1.2/(4*R1*C1) # free running frequency in Hz\n",
+ "f_out= f_out*10**-3 # in kHz\n",
+ "print \"The free running frequency = %0.f kHz\" %f_out \n",
+ "f_L= 8*f_out/(Vpos-(Vneg)) #Lock-range in kHz\n",
+ "print \"Lock-range of the circuit = \u00b1 \", Fraction(f_L).limit_denominator(100), \"kHz\" \n",
+ "f_L= f_L*10**3 # in Hz\n",
+ "f_C= math.sqrt(f_L/(2*pi*R2*C2)) # Hz\n",
+ "print \"Capture-range of the circuit = \u00b1 %0.2f Hz\" %f_C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free running frequency = 2 kHz\n",
+ "Lock-range of the circuit = \u00b1 2/3 kHz\n",
+ "Capture-range of the circuit = \u00b1 54.29 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 - Page 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "f_out_max= 200 # in kHz\n",
+ "f_lowest= 1 # in Hz\n",
+ "# Frequency of reference oscillator,\n",
+ "f_ref_os= 2.2*f_out_max # in kHz\n",
+ "print \"The frequency of reference oscillator = %0.f kHz\" %f_ref_os\n",
+ "# Formula used : f_lowest= f_ref_os/2**n\n",
+ "n= round(math.log(f_ref_os*10**3/f_lowest, 10)/math.log(2,10))\n",
+ "print a\n",
+ "print \"The number of bits required = %0.f\" %n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of reference oscillator = 440 kHz\n",
+ "19.0\n",
+ "The number of bits required = 19\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file