{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 13: Integrated circuit Timers" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.1 Page No 371" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "#From fig 13.7 (a)\n", "Ra=6.8 #kohm, resistance\n", "Rb=3.3 #Kohm\n", "C=0.1 #microF, capacitance\n", "\n", "#Calculation\n", "thigh=0.695*(Ra+Rb)*C\n", "tlow=0.695*Rb*C\n", "f=1.44/((Ra+2*Rb)*C)\n", "\n", "#Result\n", "print\"The value of high time is\",round(thigh,1),\"ms\"\n", "print\"The value of low time is\",round(tlow,2),\"ms\"\n", "print\"The value of frequency is\",round(f,2),\"khz\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of high time is 0.7 ms\n", "The value of low time is 0.23 ms\n", "The value of frequency is 1.07 ms\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.2 Page No 373" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "#From fig 13.7 (a)\n", "Ra=6.8 #kohm, resistance\n", "Rb=3.3 #Kohm\n", "\n", "#Calculation\n", "D=Rb/(Ra+2*Rb)\n", "\n", "#Result\n", "print\"The Duty Cycle is\",round(D,2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The Duty Cycle is 0.25\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.3 Page No 377" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#GIven\n", "V=5 #V, Voltage\n", "E1=0 #V\n", "E2=1\n", "Re=3 #Kohm, resistance (fig 13-10)\n", "C=1 #microF\n", "\n", "#Calculation\n", "I=(V-E1)/(3.0) #Current\n", "fc=3/(Re*C)\n", "df=0.2*fc*E2\n", "fout=fc+df\n", "E3=-1 #V\n", "df_=0.2*fc*E3\n", "fout_=fc+df_\n", "Elower=-4\n", "Eupper=4\n", "\n", "#Result\n", "print\"(a)The charge current is\",round(I,2),\"mA\"\n", "print\"(b)The current frequency is\",fc,\"KHz\"\n", "print\"(c)df=\",df*1000,\"Hz\",\"\\nand The frequency shift is\",(df-df_)*1000,\"Hz\"\n", "print\"fout was initially\",fout*1000,\"Hz . then changes to\",fout_*1000,\"Hz\"\n", "print\"(d)The positive nd negative limits are\",Eupper,\"V and\",Elower,\"V\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)The charge current is 1.67 mA\n", "(b)The current frequency is 1 KHz\n", "(c)df= 200.0 Hz \n", "and The frequency shift is 400.0 Hz\n", "fout was initially 1200.0 Hz . then changes to 800.0 Hz\n", "(d)The positive nd negative limits are 4 V and -4 V\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.4 Page No 380" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#GIven\n", "Ra=9.1 #Kohm\n", "thigh=1 #ms\n", "\n", "#Calculation\n", "C=thigh*10**-3/(1.1*Ra)\n", "\n", "#Result\n", "print\"The value of C is\",round(C*10**3,1),\"microF\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of C is 0.1 microF\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.5 Page No 381" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Ra=10 #Kohm\n", "C=0.2 #microF\n", "Ci=0.001 #microF\n", "\n", "#calculation\n", "thigh=1.1*(Ra*10**3*C*10**-6)\n", "t=Ra*10**3*Ci\n", "\n", "#Result\n", "print\"(a)The value of high time is\",thigh*1000,\"ms\"\n", "print\"(b)Time constant is\",t/1000,\"ms\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)The value of high time is 2.2 ms\n", "(b)Time constant is 0.01 ms\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.6 Page No 383" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Ra=10 #Kohm\n", "C=0.1 #microF\n", "f=1 #kHz\n", "\n", "#Calculation\n", "thigh=1.1*(Ra*10**3*C*10**-6)\n", "#thigh should exceed two periods and be less than 3 periods.\n", "thigh_=2.2 #ms, chose a value\n", "Ra=thigh_/(1.1*C*10**-6)\n", "\n", "#Result\n", "print\"(a) The time interval is\",thigh*1000,\"ms\"\n", "print\"Ra is\",Ra/10**6,\"Kohm\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) The time interval is 1.1 ms\n", "Ra is 20.0 Kohm\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.7 Page No 387" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "R=100 #Kohm\n", "C=0.01 #microF\n", "p1=3 #pin\n", "p2=4\n", "p3=7\n", "p4=8\n", "\n", "\n", "#Calculation\n", "T=R*10**3*C*10**-6\n", "tlow1=4*T #Using Table 13-2, pin=3 , time= 4*T\n", "tlow2=8*T\n", "tlow3=64*T\n", "tlow4=128*T\n", "\n", "#Result\n", "print\"(a)The required time is\",tlow1*1000,\"ms\"\n", "print\"(b)The required time is\",tlow2*1000,\"ms\"\n", "print\"(c)The required time is\",tlow3*1000,\"ms\"\n", "print\"(d)The required time is\",tlow4*1000,\"ms\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)The required time is 4.0 ms\n", "(b)The required time is 8.0 ms\n", "(c)The required time is 64.0 ms\n", "(d)The required time is 128.0 ms\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.8 Page No 389" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "T=1 #s\n", "\n", "#Calculation\n", "#Pins 3,6,7 are jumpered\n", "Tsum1=8*T+16*T\n", "Tsum2=4*T+32*T+64*T\n", "\n", "\n", "#Result\n", "print\"(a)The timing cycle is\",Tsum1,\"s\"\n", "print\"(b)The timing cycle is\",Tsum2,\"s\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)The timing cycle is 24 s\n", "(b)The timing cycle is 100 s\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.9 Page No 389" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "C=1 #microF\n", "R=5 #Mohm\n", "T=5 #s\n", "\n", "#Calculation\n", "Tsum1=4*T+8*T\n", "t=1*T\n", "Tsum2=T+2*T+4*T+8*T+16*T+32*T+64*T+128*T\n", "\n", "#Result\n", "print\"(a)The timing cycle is\",Tsum1/60,\"min\"\n", "print\"(b)Minimum programmeble timing cycle is\",t,\"s\"\n", "print\"(c)maximum programmable timing cycle is\",round(Tsum2,2),\"s or 21 min 15 s\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)The timing cycle is 1 min\n", "(b)Minimum programmeble timing cycle is 5 s\n", "(c)maximum programmable timing cycle is 1275.0 s or 21 min 15 s\n" ] } ], "prompt_number": 34 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.10 Page No 391" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "T=2.5 #ms\n", "\n", "#pin from fig 13-19\n", "p1=1\n", "p2=2\n", "p3=3\n", "p4=4\n", "\n", "#Calculation\n", "#Time base rating\n", "t1=T\n", "t2=2*T\n", "t3=4*T\n", "t4=8*T\n", "\n", "#Period\n", "P1=2*T\n", "P2=4*T\n", "P3=8*T\n", "P4=16*T\n", "\n", "#Frequency\n", "f1=1/(P1)\n", "f2=1/(P2)\n", "f3=1/(P3)\n", "f4=1/(P4)\n", "\n", "#Result\n", "print\"The frequencies are\",f1*1000,\"Hz,\",f2*1000,\"Hz,\",f3*1000,\"Hz,\",f4*1000,\"Hz\"\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The frequencies are 200.0 Hz, 100.0 Hz, 50.0 Hz, 25.0 Hz\n" ] } ], "prompt_number": 36 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 13.11 Page No 393" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "#From fig 13.11 (a)\n", "T=1 #ms\n", "\n", "#Calculation\n", "Tsum=T+4*T\n", "period=Tsum+T\n", "f=1/(period*10**-3)\n", "\n", "#Result\n", "print\"The frequency is\",round(f,1),\"Hz\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The frequency is 166.7 Hz\n" ] } ], "prompt_number": 38 } ], "metadata": {} } ] }