summaryrefslogtreecommitdiff
path: root/3682/CH5/EX5.2/Ex5_2.sce
blob: 71777492ebc62c223477483b516ce1af014205dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Exa 5.2

clc;
clear;

// Given data

// Circuit of Schmitt trigger

R2=100; // Ohms
R1=50*10^3; // Ohms
Vref=0; //Volts
Vi=1; // peak to peak(Volts)
Vsat=14;// sSaturation voltage (Volts)

// Solution

printf('Using Equations (5.1) and (5.2), we get calculated values as follows -\n ' );
Vut=(R2*Vsat)/(R1+R2);
printf(' Upper threshold voltage (VUT) = %d mV. \n ',round(Vut*1000));
Vlt=(R2*-Vsat)/(R1+R2);
printf(' Lower threshold voltage (VLT) = %d mV. \n ',round(Vlt*1000));