{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 10: Comparators" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.1: Output_Voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 10.1\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "t=0:0.01:5;//sec(Assumed)\n", "Vin=5*sin(2*%pi*t);//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", "disp(Vref,'Reference Voltage(V)')\n", "disp(Vsat,'If Vin>Vref , Vout (V):');\n", "disp(-Vsat,'If Vin