{ "metadata": { "name": "", "signature": "sha256:f64bf7a670dc36e359e5aa56e0bfa29f09c70f7a0babc95be4c64434f164d9d6" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter10 - Comparators" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 10.1 - page : 334" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from math import pi, sin\n", "t=range(0,5) #sec(Assumed)\n", "Vin=5*sin(2*pi*t[0]) #V\n", "VCC=15 #V\n", "R2=1 #kohm\n", "R1=6.8 #kohm\n", "VEE=-15 #V\n", "Vsat=13 #V\n", "Vref=R2*VCC/(R1+R2) #V\n", "print \"Reference Voltage = %0.2f V \" %Vref\n", "print \"If Vin>Vref , Vout = %0.2f V \" %Vsat \n", "print \"If VinVref , Vout = 13.00 V \n", "If Vin