summaryrefslogtreecommitdiff
path: root/Integrated_Circuits_by_S_Sharma
diff options
context:
space:
mode:
Diffstat (limited to 'Integrated_Circuits_by_S_Sharma')
-rw-r--r--Integrated_Circuits_by_S_Sharma/1-Analog_Integrated_Circuit_Design_An_Overview.ipynb213
-rw-r--r--Integrated_Circuits_by_S_Sharma/10-Nonlinear_Applications_of_IC_Op_Amps.ipynb298
-rw-r--r--Integrated_Circuits_by_S_Sharma/12-Digital_to_Analog_and_Analog_to_Digital_Converters.ipynb403
-rw-r--r--Integrated_Circuits_by_S_Sharma/13-Integrated_Circuit_Timer.ipynb695
-rw-r--r--Integrated_Circuits_by_S_Sharma/14-Phase_Locked_Loops.ipynb99
-rw-r--r--Integrated_Circuits_by_S_Sharma/2-The_741_IC_Op_Amp.ipynb263
-rw-r--r--Integrated_Circuits_by_S_Sharma/3-Op_Amp_With_Negative_Feedback.ipynb416
-rw-r--r--Integrated_Circuits_by_S_Sharma/4-Linear_Applications_of_IC_Op_Amps.ipynb985
-rw-r--r--Integrated_Circuits_by_S_Sharma/5-Filters.ipynb912
-rw-r--r--Integrated_Circuits_by_S_Sharma/6-Sinusoidal_Oscillators.ipynb101
-rw-r--r--Integrated_Circuits_by_S_Sharma/8-CMOS_Realization_Of_Inverters.ipynb192
11 files changed, 4577 insertions, 0 deletions
diff --git a/Integrated_Circuits_by_S_Sharma/1-Analog_Integrated_Circuit_Design_An_Overview.ipynb b/Integrated_Circuits_by_S_Sharma/1-Analog_Integrated_Circuit_Design_An_Overview.ipynb
new file mode 100644
index 0000000..f17085c
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/1-Analog_Integrated_Circuit_Design_An_Overview.ipynb
@@ -0,0 +1,213 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Analog Integrated Circuit Design An Overview"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Constant_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 1.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_EE = 10;// in V\n",
+"R2 = 2.4;// in k ohm\n",
+"R1 = 2.4;// in k ohm\n",
+"R3 = 1;// in k ohm\n",
+"V_BE3 = 0.7;// in V\n",
+"I = (V_EE - ((R2*V_EE)/(R1+R2)) - V_BE3)/R3;// in mA\n",
+"disp(I,'The constant current in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Value_of_RE.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 1.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_CC = 50;// in V\n",
+"V_BE2 = 0.7;// in V\n",
+"R = 50;// in k ohm\n",
+"R = 50 * 10^3;// in ohm\n",
+"I_C1 = 10;// in µA\n",
+"I_C1 =I_C1 * 10^-6;// in A\n",
+"V_T = 26;// in mV\n",
+"V_T = V_T * 10^-3;// in V\n",
+"I_C2 = (V_CC - V_BE2)/R;// in A\n",
+"R_E = (V_T*log(I_C2/I_C1))/I_C1;// in ohm\n",
+"R_E = R_E * 10^-3;// in k ohm\n",
+"disp(R_E,'The value of R_E in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Collector_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 1.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V = 10;// in V\n",
+"V_BE = 0.715;// in V\n",
+"V_R = 0-(V_BE - V);// in V\n",
+"R = 5.6;// in k ohm\n",
+"I_R = V_R/R;// in mA\n",
+"bita = 100;\n",
+"I_C = I_R * (bita/(1+bita));// in mA\n",
+"disp(I_C,'For transistor Q1, the collector current in mA is');\n",
+"I_C2 = I_R;// in mA\n",
+"disp(I_C2,'For transistor Q2, the collector current in mA is');\n",
+"I_C3 = I_R;// in mA\n",
+"disp(I_C3,'For transistor Q3, the collector current in mA is');\n",
+"I_C4 = I_R;// in mA\n",
+"disp(I_C4,'For transistor Q4, the collector current in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Collector_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 1.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V = 10;// in V\n",
+"V_BE = 0.715;// in V\n",
+"R = 5.6;// in k ohm\n",
+"I = (V-V_BE)/(R);// in mA\n",
+"bita = 100;\n",
+"I_C1 = (bita/(4+bita))*I;// in mA\n",
+"disp(I_C1,'For transistor Q1, the collector current in mA is');\n",
+"I_C2 = I_C1;// in mA\n",
+"disp(I_C2,'For transistor Q2, the collector current in mA is');\n",
+"I_C3 = I_C1;// in mA\n",
+"disp(I_C3,'For transistor Q3, the collector current in mA is');\n",
+"I_C4 = I_C1;// in mA\n",
+"disp(I_C4,'For transistor Q4, the collector current in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: Output_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 1.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_D1 = 100;// in µA\n",
+"k_n = 200;// in µA/V^2\n",
+"W = 10;// in µm\n",
+"l = 1;// in µm\n",
+"V_A = 20;// in V\n",
+"V_ov = sqrt((I_D1*2)/(k_n*(W/l)));// in V\n",
+"V_t = 0.7;// in V\n",
+"V_GS = V_t + V_ov;// in V\n",
+"V_GS = round(V_GS);// in V\n",
+"V_DD = 3;// in V\n",
+"I_REF = 100;// in µA\n",
+"I_REF = I_REF * 10^-3;// in mA\n",
+"R = (V_DD - V_GS)/I_REF;// in k ohm\n",
+"disp(R,'The value of R in kΩ is');\n",
+"V_ov_min = V_ov ;// in volt\n",
+"disp(V_ov_min,'The lowest possible value of V_o in V is');\n",
+"r_o2 = V_A/I_D1;// in M ohm\n",
+"disp(r_o2,'The output resistance in MΩ is');\n",
+"V_O = V_GS;// in V\n",
+"del_Io = V_O/r_o2;// in µA\n",
+"disp(del_Io,'The change in output current in µA is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/10-Nonlinear_Applications_of_IC_Op_Amps.ipynb b/Integrated_Circuits_by_S_Sharma/10-Nonlinear_Applications_of_IC_Op_Amps.ipynb
new file mode 100644
index 0000000..70a25b8
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/10-Nonlinear_Applications_of_IC_Op_Amps.ipynb
@@ -0,0 +1,298 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Nonlinear Applications of IC Op Amps"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10: Values_of_VUT_VLT_and_oscillation_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 86;// in k ohm\n",
+"V_sat = 15;// in V\n",
+"R2 = 100;// in k ohm\n",
+"V_UT = (R1/(R1+R2))*V_sat;// in V\n",
+"disp(V_UT,'The value of V_UT in V is ');\n",
+"V_LT = (R1/(R1+R2))*(-V_sat);// in V\n",
+"disp(V_LT,'The value of V_LT in V is');\n",
+"R_F = 100;// in k ohm\n",
+"R_F= R_F*10^3;// in ohm\n",
+"C = 0.1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f_o = 1/(2*R_F*C*log( (V_sat-V_LT)/(V_sat-V_UT) ));// in Hz\n",
+"disp(f_o,'Frequency of oscillation in Hz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12: Change_in_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"del_Vin = 5;// in V\n",
+"FRR = 80;// in dB\n",
+"// Formula FRR= 20*log10(del_Vin/del_Vout)\n",
+"del_Vout=del_Vin/(10^(FRR/20));// in V\n",
+"disp(del_Vout*10^3,'Change in output voltage in mV is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Threshold_voltages.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_CC = 15;// in V\n",
+"V_sat = V_CC;// in V\n",
+"R1 = 120;// in ohm\n",
+"R2 = 51;// in k ohm\n",
+"R2 = R2 * 10^3;// in ohm\n",
+"V_in = 1;// in V\n",
+"V_UT = (V_sat*R1)/(R1+R2);//in V\n",
+"disp(V_UT*10^3,'When supply voltage is +15V then threshold voltage in mV is');\n",
+"V_ULT = ((-V_sat)*R1)/(R1+R2);// in V\n",
+"V_ULT = V_ULT;// in V\n",
+"disp(V_ULT*10^3,'When supply voltage is -15V then threshold voltage in mV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Value_of_R1_and_R2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 10.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_sat = 12;// in V\n",
+"V_H = 6;// in V\n",
+"R1 = 10;// in k ohm\n",
+"R1 = R1 * 10^3;// in ohm\n",
+"// Formula V_H= R1/(R1+R2)*(V_sat-(-V_sat)) and Let\n",
+"V = V_H/(V_sat-(-V_sat));// in V (assumed)\n",
+"R2= (R1-V*R1)/V\n",
+"disp(R1*10^-3,'The value of R1 in kΩ is');\n",
+"disp(R2*10^-3,'The value of R2 in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Time_duratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_P = 5;// in V\n",
+"V_LT = -1.5;// in V\n",
+"V_H = 2;// in V\n",
+"f = 1;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"V_UT = V_H-V_LT;// in V\n",
+"V_m = V_P/2;// in V\n",
+"// Formula V_LT= V_m*sind(theta)\n",
+"theta= asind(-V_LT/V_m);\n",
+"T = 1/f;// in sec\n",
+"theta1 = theta+180;// in degree\n",
+"T1 = (T*theta1)/360;// in sec\n",
+"T2 = T-T1;// in sec\n",
+"disp(T1*10^3,'The value of T1 in ms is : ')\n",
+"disp(T2*10^3,'The value of T2 in ms is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: Value_of_R1_and_R2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_H = 10;// in V\n",
+"V_L = -10;// in V\n",
+"I_max = 100;// in µA\n",
+"I_max = I_max * 10^-6;// in A\n",
+"V_HV = 0.1;// in V\n",
+"V_sat = 10;// in V\n",
+"R2 = 1;// in k ohm\n",
+"R1 = 199;// in k ohm\n",
+"R = (R1*R2)/(R1+R2);// in k ohm\n",
+"disp(R*10^3,'The resistance in Ω is');\n",
+"\n",
+"// Note: The unit of the answer in the book is wrong"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: values_of_VLT_VUT_and_VH.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_sat = 12;// in V\n",
+"R1 = 1;// in k ohm\n",
+"R2 = 3;// in k ohm\n",
+"V_LT = ((-V_sat)*R1)/R2;// in V\n",
+"disp(V_LT,'The value of V_LT in V is');\n",
+"V_UT = (-(-V_sat) * R1)/R2;// in V\n",
+"disp(V_UT,'The value of V_UT in V is');\n",
+"V_H = (R1/R2)*(V_sat - (-V_sat));// in V\n",
+"disp(V_H,'The value of V_H in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7: Threshold_voltages_and_hysteresis_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 10.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 80;// in k ohm\n",
+"R2 = 20;// in k ohm\n",
+"V_sat = 12.5;// in V\n",
+"V_UT = (R2/(R1+R2))*V_sat;// in V\n",
+"disp(V_UT,'Upper threshold voltage in V is');\n",
+"V_LT = (R2/(R1+R2))*(-V_sat);// in V\n",
+"disp(V_LT,'Lower threshold voltage in V is');\n",
+"V_HV = (R2/(R1+R2))*(2*V_sat);// in V\n",
+"disp(V_HV,'The hysteresis voltage in V is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/12-Digital_to_Analog_and_Analog_to_Digital_Converters.ipynb b/Integrated_Circuits_by_S_Sharma/12-Digital_to_Analog_and_Analog_to_Digital_Converters.ipynb
new file mode 100644
index 0000000..d727fa1
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/12-Digital_to_Analog_and_Analog_to_Digital_Converters.ipynb
@@ -0,0 +1,403 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Digital to Analog and Analog to Digital Converters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: Digital_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C_F = 12;//clock frequency in kHz\n",
+"C_F = C_F * 10^3;// in Hz\n",
+"V_i = 100;// in mV\n",
+"V_R = 100;// in mV\n",
+"t1 = 83.33*10^-3;// in sec\n",
+"D = C_F * t1*(V_i/V_R);// in counts\n",
+"disp('The Digital output is : '+string(round(D))+' counts');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.11: Conversion_time.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 8;\n",
+"T_C = 9;//in µsec\n",
+"T_C = T_C * 10^-6;// in sec\n",
+"f_max = 1/(2*%pi*T_C*(2^n));// in Hz\n",
+"disp(f_max,'Maximum frequency in Hz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.12: Maximum_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 8;\n",
+"T_C = 9;//in µsec\n",
+"T_C = T_C * 10^-6;// in sec\n",
+"f_max = 1/(2*%pi*T_C*(2^n));// in Hz\n",
+"disp(f_max,'Maximum frequency in Hz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: Resolutio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 8;\n",
+"Resolution = 2^n;\n",
+"disp(Resolution,'The resolution is');\n",
+"disp('That is, the output voltage can have '+string(Resolution)+' different values including zero')\n",
+"V_OFS = 2.55;// in V\n",
+"Resolution= V_OFS/(2^n - 1)*10^3;\n",
+"disp('Resolution is : '+string(Resolution)+' mV/1LSB')\n",
+"disp('That is, an input change of 1 LSB causes the output to change by '+string(Resolution)+' mV')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: Final_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 4;\n",
+"V_OFS = 15;// in V\n",
+"digital_input = '0110';// in binary\n",
+"D= bin2dec(digital_input);\n",
+"Resolution = V_OFS/((2^n)-1);// in V/LSB\n",
+"V_out = Resolution*D;// in V\n",
+"disp(V_out,'Final output voltage in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: VoFS_and_Vout.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 8;\n",
+"Resolution = 20;// in mV/LSB\n",
+"digital_input= '10000000';// in binary\n",
+"D= bin2dec(digital_input);// in decimal\n",
+"Resolution=Resolution*10^-3;// in V/LSB\n",
+"V_OFS = Resolution * ((2^n)-1);// in V\n",
+"disp(V_OFS,'The value of V_OFS in V is');\n",
+"V_out = Resolution*D;// in V\n",
+"disp(V_out,'The value of V_out in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4: Step_size_and_analog_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n = 4;\n",
+"V_OFS = 5;// in V\n",
+"digital_input= '1000';// in binary\n",
+"D= bin2dec(digital_input);// in decimal\n",
+"Resolution = V_OFS/((2^n)-1);\n",
+"V_out = Resolution * D;// in V\n",
+"disp(V_out,'When input is 1000 then, the output in V is');\n",
+"// When\n",
+"digital_input= '1111';// in binary\n",
+"D= bin2dec(digital_input);// in decimal\n",
+"V_out= Resolution * D;// in V\n",
+"disp(V_out,'When input is 1111 then , the output in V is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5: Full_scale_output_voltage_and_percentage_resolution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n=12;\n",
+"digital_input= '010101101101';// in binary\n",
+"D= bin2dec(digital_input);// in decimal\n",
+"step_size= 8;// in mV\n",
+"step_size=step_size*10^-3;// in V\n",
+"VoFS= step_size*(2^n-1);// in V\n",
+"disp(VoFS,'The full scale output voltage in V is : ')\n",
+"Per_resolution= step_size/VoFS*100;// in %\n",
+"disp(Per_resolution,'Percentage resolution is :')\n",
+"Vout= step_size*D;// in V\n",
+"disp(Vout,'The output voltage in V is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: Values_of_resistors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 12.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_R = 10;// in V\n",
+"n = 4;\n",
+"Resolution = 0.5;// in V\n",
+"R_F = 10;// in k ohm\n",
+"R = (1/2^n)*(V_R/Resolution)*R_F;// in k ohm\n",
+"disp(R,'The value of resistor in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7: Resolution_and_digital_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_i = 5.1;// in V\n",
+"n = 8;\n",
+"Re = 2^n;\n",
+"Resolution = V_i/(2^n-1);// in V/LSB\n",
+"disp(Resolution*10^3,'The Resolution in mV/LSB is');\n",
+"// When\n",
+"V_i = 1.28;// in V\n",
+"D = round(V_i/Resolution);\n",
+"D_in_binary= dec2bin(D);// in binary\n",
+"disp(D_in_binary,'The digital output is :')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8: Quantizing_error.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_i = 4.095;//input voltage in V\n",
+"n = 12;\n",
+"Q_E = V_i/( ((2^n)-1)*2 );// in V\n",
+"Q_E = Q_E * 10^3;// in mV\n",
+"disp(Q_E,'The quantizing error in mV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9: The_value_of_t2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 12.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"disp('Part (i)')\n",
+"V_i = 100;// in mV\n",
+"V_R = 100;// in mV\n",
+"t1 = 83.33;// in ms\n",
+"t2 = (V_i/V_R)*t1;// in ms\n",
+"disp(t2,'The value of t2 in ms is');\n",
+"disp('Part (ii)')\n",
+"Vi = 200;// in mV\n",
+"t_2 = (Vi/V_R)*t1;// in ms\n",
+"disp(t_2,'The value of t_2 in ms is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/13-Integrated_Circuit_Timer.ipynb b/Integrated_Circuits_by_S_Sharma/13-Integrated_Circuit_Timer.ipynb
new file mode 100644
index 0000000..cf614c7
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/13-Integrated_Circuit_Timer.ipynb
@@ -0,0 +1,695 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Integrated Circuit Timer"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.10: Resistor_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 10;// in µF\n",
+"C = C*10^-6;// in F\n",
+"T_ON = 5;// in sec\n",
+"R = T_ON/(1.1*C);// in ohm\n",
+"disp(R,'The resistor value in ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.11: Resistor_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 13.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 10;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"T_off = 1;// in sec\n",
+"//Formula T_off= 0.693*R2*C\n",
+"R2 = T_off/(0.693*C);// in ohm\n",
+"disp(R2,'The value of R2 in Ω is');\n",
+"T_on = 3;// in sec\n",
+"// Formula T_on= 0.693*(R1+R2)*C\n",
+"R1 =T_on/(C*0.693)-R2;// in ohm\n",
+"disp(R1,'The value of R1 in Ω is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.12: Value_of_RLED.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.22;// in µF\n",
+"C=C*10^-6;// in F\n",
+"T_on = 10;// in ms\n",
+"T_on = T_on * 10^-3;// in s\n",
+"V_CC = 15;// in V\n",
+"V_BE = 0.7;// in V\n",
+"V_EC = 0.2;// in V\n",
+"V_LED= 1.4;// in V\n",
+"I_LED= 20*10^-3;// in A\n",
+"R = T_on/(C*1.1);// in ohm\n",
+"R = R *10^-3;// in k ohm\n",
+"disp('Values for first circuit : ')\n",
+"disp(R,'The value of R in kΩ is');\n",
+"V_o = V_CC-(2*V_BE) - V_EC;// in V\n",
+"disp(V_o,'The output voltage in V is');\n",
+"R_LED = (V_o - V_LED)/(I_LED);// in ohm \n",
+"disp(R_LED,'The value of R_LED in Ω is : ')\n",
+"// Part (ii)\n",
+"f= 1*10^3;// in Hz\n",
+"C=0.01*10^-6;// in F\n",
+"D= 95/100;// duty cycle\n",
+"// Formula f= 1.44/((R1+2*R2)*C)\n",
+"// R1+2*R2= 1.44/(f*C) (i)\n",
+"// D= (R1+R2)/(R1+2*R2) or\n",
+"// R2= (1-D)/(2*D-1)*R1 (ii)\n",
+"// From eq (i) and (ii)\n",
+"R1= 1.44/(f*C*(1+2*((1-D)/(2*D-1))));// in ohm\n",
+"R2= (1-D)/(2*D-1)*R1;// in ohm\n",
+"disp('Values for second circuit : ')\n",
+"disp(R1*10^-3,'The value of R1 in kΩ is : ');\n",
+"disp(R2*10^-3,'The value of R2 in kΩ is : ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.13: Resistor_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"T = 5;// in msec\n",
+"T = T * 10^-3;// in sec\n",
+"C = 0.1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = T/(C*1.1);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"disp(R,'The resistor in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.14: A_555_based_square_wave_generator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 1;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"T = 1/f;// in s\n",
+"T = T * 10^3;// in msec\n",
+"T_d = T/2;// in msec\n",
+"T_d = T_d * 10^-3;// in sec\n",
+"C = 0.1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R2 = T_d/(0.69*C);// in ohm\n",
+"R2 = R2 * 10^-3;// in k ohm\n",
+"disp(C*10^6,'The value of C in µF is : ')\n",
+"disp(R2,'The value of R2 in kΩ is');\n",
+"disp('The value of R1 will be 100 Ω +10 kΩ pot');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.15: A_555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 800;// in Hz\n",
+"D = 0.6;\n",
+"C = 0.1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"// Formula f= 1.44/((R_A+2*R_B)*C)\n",
+"// R_A+2*R_B= 1.44/(f*C) (i)\n",
+"// D= (R_A+R_B)/(R_A+2*R_B) or\n",
+"// R_B= (1-D)/(2*D-1)*R_A (ii)\n",
+"// From eq (i) and (ii)\n",
+"R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1))));// in ohm\n",
+"R_B= (1-D)/(2*D-1)*R_A;// in ohm\n",
+"disp(R_A*10^-3,'The value of R_A in kΩ is : ');\n",
+"disp(R_B*10^-3,'The value of R_B in kΩ is : ');\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.16: A_555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 700;// in Hz\n",
+"D = 0.5;\n",
+"C = 0.1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"// Formula f= 1.44/((R_A+2*R_B)*C)\n",
+"// R_A+2*R_B= 1.44/(f*C) (i)\n",
+"// D= (R_A+R_B)/(R_A+2*R_B) or\n",
+"// R_A+R_B=D*1.44/(f*C)\n",
+"// From eq (i) and (ii)\n",
+"R_B=round(1.44/(f*C))*(1-D);\n",
+"R_A= round(D*1.44/(f*C))-R_B;\n",
+"//R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1))));// in ohm\n",
+"//R_B= (1-D)/(2*D-1)*R_A;// in ohm\n",
+"disp(round(R_A),'The value of R_A in Ω is : ');\n",
+"disp((R_B*10^-3),'The value of R_B in kΩ is : ');\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.17: Output_pulse_width.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_A = 20;// in k ohm\n",
+"R_A = R_A * 10^3;// in ohm\n",
+"C = 0.1;// in µF\n",
+"C = C*10^-6;// in F\n",
+"pulse_width = 1.1*R_A*C;// in s\n",
+"disp(pulse_width*10^3,'The output pulse width in ms is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.18: Relationship_between_tp_and_T.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"n=4;\n",
+"// t_p= X*T, where\n",
+"X= [0.2+(n-1)];// (assumed)\n",
+"disp('The relation between t_p and T is :')\n",
+"disp('t_p = '+string(X)+'*T');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.19: Value_of_RA.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.02;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f=2*10^3;//frequency in Hz\n",
+"T = 1/f;// in sec\n",
+"n = 5;\n",
+"t_p = (0.2+(n-1))*T;// in sec\n",
+"R_A = t_p/(1.1*C);// in ohm\n",
+"disp(R_A*10^-3,'The value of R_A in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1: Frequency_and_duty_cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.01;// in µF\n",
+"C = C *10^-6;// in F\n",
+"R_A = 2;// in k ohm\n",
+"R_A = R_A * 10^3;// in ohm\n",
+"R_B = 100;// in k ohm\n",
+"R_B = R_B * 10^3;// in ohm\n",
+"T_HIGH = 0.693*(R_A+R_B)*C;// in s\n",
+"T_HIGH = T_HIGH;// in sec\n",
+"T_LOW = 0.693*R_B*C;// in s\n",
+"T_LOW = T_LOW ;// in sec\n",
+"T = T_HIGH + T_LOW;// in sec\n",
+"f = 1/T;// in Hz\n",
+"disp(f,'Frequency in Hz is');\n",
+"D = (T_HIGH/T)*100;// in %\n",
+"disp(D,'Duty cycle in % is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2: Positive_and_negative_pulse_width.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R_A = 4.7;// in k ohm\n",
+"R_A = R_A * 10^3;// in ohm\n",
+"R_B = 1;// in k ohm\n",
+"R_B = R_B * 10^3;// in ohm\n",
+"T_on = 0.693*(R_A+R_B)*C;// in s\n",
+"T_on = T_on;// in sec\n",
+"disp(T_on * 10^3,'Positive pulse width in ms is');\n",
+"T_off = 0.693*R_B*C;// in s\n",
+"T_off = T_off;// in ms\n",
+"disp(T_off * 10^3,'Negative pulse width in ms is');\n",
+"f = 1.4/((R_A+2*R_B)*C);// in Hz\n",
+"disp(f,'Free running frequency in Hz is');\n",
+"D = ((R_A+R_B)/(R_A+(2*R_B)))*100;// in %\n",
+"disp(D,'The duty cycle in % is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3: Resistor_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f = 1;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"R_A = 1.44/(2*f*C);// in ohm\n",
+"R_A = R_A * 10^-3;// in k ohm\n",
+"R_B= R_A;// in kohm\n",
+"disp(R_A,'The value of both the resistors required in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4: A_555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 700;// in Hz\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"a = 1.44;\n",
+"R_A = a/(2*f*C);// in ohm\n",
+"R_A = R_A * 10^-3;// in k ohm\n",
+"R_B =R_A;// in k ohm\n",
+"disp(C*10^6,'The the value of C in µF is : ')\n",
+"disp(R_A,'The value of both the resistors in kΩ is');\n",
+"disp('(Standard value of resistor is 100 kΩ)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5: Frequency_and_duty_cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.01;// in µF\n",
+"C = C *10^-6;// in F\n",
+"R_A = 2;// in k ohm\n",
+"R_A = R_A * 10^3;// in ohm\n",
+"R_B = 100;// in k ohm\n",
+"R_B = R_B * 10^3;// in ohm\n",
+"T_HIGH = 0.693*(R_A+R_B)*C;// in s\n",
+"T_HIGH = T_HIGH;// in sec\n",
+"T_LOW = 0.693*R_B*C;// in s\n",
+"T_LOW = T_LOW ;// in sec\n",
+"T = T_HIGH + T_LOW;// in sec\n",
+"f = 1/T;// in Hz\n",
+"disp(f,'Frequency in Hz is');\n",
+"D = (T_HIGH/T)*100;// in %\n",
+"disp(D,'Duty cycle in % is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6: Positive_and_negative_pulse_width.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 1;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R_A = 4.7;// in k ohm\n",
+"R_A = R_A * 10^3;// in ohm\n",
+"R_B = 1;// in k ohm\n",
+"R_B = R_B * 10^3;// in ohm\n",
+"T_on = 0.693*(R_A+R_B)*C;// in s\n",
+"T_on = T_on;// in sec\n",
+"disp(T_on * 10^3,'Positive pulse width in ms is');\n",
+"T_off = 0.693*R_B*C;// in s\n",
+"T_off = T_off;// in ms\n",
+"disp(T_off * 10^3,'Negative pulse width in ms is');\n",
+"f = 1.4/((R_A+2*R_B)*C);// in Hz\n",
+"disp(f,'Free running frequency in Hz is');\n",
+"D = ((R_A+R_B)/(R_A+(2*R_B)))*100;// in %\n",
+"disp(D,'The duty cycle in % is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7: Value_of_resistor_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f = 1;// in kHz\n",
+"f = f* 10^3;// in Hz\n",
+"a = 1.44;\n",
+"R_A = a/(2*f*C);// in ohm\n",
+"R_A = R_A * 10^-3;// in k ohm\n",
+"R_B = R_A;// in k ohm\n",
+"disp(R_A,'The value of both the resistors required in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8: A_555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 700;// in Hz\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"a = 1.44;\n",
+"R_A = a/(2*f*C);// in ohm\n",
+"R_A = R_A * 10^-3;// in k ohm\n",
+"R_B =R_A;// in k ohm\n",
+"disp(C*10^6,'The the value of C in µF is : ')\n",
+"disp(R_A,'The value of both the resistors in kΩ is');\n",
+"disp('(Standard value of resistor is 100 kΩ)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.9: A_555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 13.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f = 800;// in Hz\n",
+"C = 0.01;// in µF\n",
+"C =C * 10^-6;// in F\n",
+"R_A = 1.44/(5*f*C);// in ohm\n",
+"R_A = R_A * 10^-3;// in k ohm\n",
+"disp(R_A,'The value of R_A in kΩ is');\n",
+"R_B = 2*R_A;// in k ohm\n",
+"disp(R_B,'The value of R_B in kΩ is ');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/14-Phase_Locked_Loops.ipynb b/Integrated_Circuits_by_S_Sharma/14-Phase_Locked_Loops.ipynb
new file mode 100644
index 0000000..3a852f1
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/14-Phase_Locked_Loops.ipynb
@@ -0,0 +1,99 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Phase Locked Loops"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: Free_running_frequency_and_Lock_range.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 14.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_T = 10;// in k ohm\n",
+"R_T = R_T * 10^3;// in ohm\n",
+"C_T = 0.005;// in µF\n",
+"C_T = C_T * 10^-6;// in F\n",
+"C=10*10^-6;// in F\n",
+"f_out = 0.25/(R_T*C_T);// in Hz\n",
+"disp('Free Running frequency is : '+string(f_out*10^-3)+' kHz');\n",
+"// Part (ii)\n",
+"V=20;// in V\n",
+"f_L= 8*f_out/V;// in Hz\n",
+"disp('Lock range in kHz is : ±'+string(f_L*10^-3)+' kHz')\n",
+"// Part (iii)\n",
+"f_C= sqrt(f_L/(2*%pi*3.6*10^3*C));// in Hz\n",
+"disp('Capture range is : ±'+string(f_C)+' Hz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: Frequency_and_number_of_bits.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 14.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_out_max = 200;// in kHz\n",
+"f_out_min = 4;// in Hz\n",
+"f_CLK = 2.2*f_out_max;// in kHz\n",
+"disp(f_CLK,'Frequency of reference oscillation in kHz is');\n",
+"f_CLK= f_CLK*10^3;// in Hz\n",
+"// Formula f_out_min= f_CLK/2^n\n",
+"n=log(f_CLK/f_out_min)/log(2);\n",
+"disp(round(n),'The number of bits required in the phase accumulator is : ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/2-The_741_IC_Op_Amp.ipynb b/Integrated_Circuits_by_S_Sharma/2-The_741_IC_Op_Amp.ipynb
new file mode 100644
index 0000000..58fea90
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/2-The_741_IC_Op_Amp.ipynb
@@ -0,0 +1,263 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: The 741 IC Op Amp"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17: Lowest_value_of_RL.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V = 10;// in V\n",
+"R1 = 1;// in k ohm\n",
+"R1=R1*10^3;// in ohm\n",
+"R2 = 9;// in k ohm\n",
+"R2= R2*10^3;// in ohm\n",
+"I_out = 20;// in mA\n",
+"I_out=I_out*10^-3;// in A\n",
+"R_L = V/( I_out-(V/(R1+R2)) );// in ohm\n",
+"disp(R_L,'The lowest value of R_L in ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18: Slew_rate_and_maximum_possible_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_CQ = 10;// in µA\n",
+"I_CQ= I_CQ*10^-6;// in A\n",
+"I = I_CQ;// in A\n",
+"C_C = 33;// in pF\n",
+"C_C=C_C*10^-12;// in F\n",
+"C = C_C;// in F\n",
+"S = I/C;// in V/sec\n",
+"disp(S*10^-6,'The slew rate in V/µ-sec is');\n",
+"V_m = 12;// in V\n",
+"f_m = S/(2*%pi*V_m);// in Hz\n",
+"f_m = f_m * 10^-3;// in kHz\n",
+"disp(f_m,'Maximum possible frequency in kHz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: Input_bias_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_b1 = 18;// in µA\n",
+"I_b2 = 22;// in µA\n",
+"I_b = (I_b1+I_b2)/2;// in µA\n",
+"disp(I_b,'Input bias current in µA is ');\n",
+"I_ios = abs(I_b1-I_b2);// in µA\n",
+"disp(I_ios,'Input offset current in µA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Slew_rate_and_maximum_possible_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"I_CQ = 10;// in µA\n",
+"I_CQ= I_CQ*10^-6;// in A\n",
+"I = I_CQ;// in A\n",
+"C_C = 33;// in pF\n",
+"C_C=C_C*10^-12;// in F\n",
+"C = C_C;// in F\n",
+"S = I/C;// in V/sec\n",
+"disp(S*10^-6,'The slew rate in V/µ-sec is');\n",
+"V_m = 12;// in V\n",
+"f_m = S/(2*%pi*V_m);// in Hz\n",
+"f_m = f_m * 10^-3;// in kHz\n",
+"disp(f_m,'Maximum possible frequency in kHz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"CMRR = 100;\n",
+"V1 = 300;// in µV\n",
+"V2 = 240;// in µV\n",
+"V_id = V1-V2;// in µV\n",
+"V_cm = (V1+V2)/2;// in µV\n",
+"A_id = 5000;\n",
+"A_cm = A_id/CMRR;\n",
+"V_out = (A_id*V_id) + (A_cm*V_cm);// in µV\n",
+"V_out = V_out * 10^-3;// in mV\n",
+"disp('Part (i)')\n",
+"disp(V_out,'The output Voltage in mV is');\n",
+"disp('Part (ii)')\n",
+"CMRR = 10^5;\n",
+"A_cm = A_id/CMRR;\n",
+"V_out = (A_id*V_id) + (A_cm*V_cm);// in µV\n",
+"V_out = V_out* 10^-3;// in mV\n",
+"disp(V_out,'The output voltage in mV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6_2: Input_offset_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.6 Again\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"gm1= 1/5.26;// in mA/V\n",
+"gm1= gm1*10^-3;// in A/v\n",
+"I= 9.5;// in µA\n",
+"I=I*10^-6;// in A\n",
+"del_I= 5.5*10^-3*I;// in A\n",
+"V_OS= del_I/gm1;// in V\n",
+"disp(V_OS*10^3,'The offset voltage in mV is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: CMRR.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 2.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 1;// in k ohm\n",
+"R2 = 100;// in k ohm\n",
+"A_id = R2/R1;// in k ohm\n",
+"Epsilon = 1 - (90/R2);\n",
+"A_cm = (R2*Epsilon)/(R1+R2)\n",
+"CMMR = A_id/A_cm;\n",
+"CMRR = 20*log10(CMMR);// in dB\n",
+"disp(CMRR,'The value of CMRR in dB is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/3-Op_Amp_With_Negative_Feedback.ipynb b/Integrated_Circuits_by_S_Sharma/3-Op_Amp_With_Negative_Feedback.ipynb
new file mode 100644
index 0000000..afbcbfe
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/3-Op_Amp_With_Negative_Feedback.ipynb
@@ -0,0 +1,416 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Op Amp With Negative Feedback"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: Inverting_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_F = 1;// in M ohm\n",
+"R_F = R_F * 10^6;// in ohm\n",
+"Av= -30;\n",
+"R1 = R_F/abs(Av);// in ohm\n",
+"R1 = R1 * 10^-3;// in k ohm\n",
+"disp(R_F*10^-6,'The value of R_F in MΩ is : ')\n",
+"disp(R1,'The value of R1 in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: Inverting_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A_v = -8;\n",
+"V_in= -1;// in V\n",
+"I1 = 15;// in µA\n",
+"I1 = I1 * 10^-6;// in A\n",
+"R1 = -(V_in)/I1;// in ohm\n",
+"R1 = R1 * 10^-3;// in k ohm\n",
+"disp(R1,'Minimum value of R1 in kΩ is');\n",
+"R_F = -(A_v)*R1;// in k ohm\n",
+"disp(R_F,'The minimum value of R_F in kΩ is');\n",
+"\n",
+"// Note: There is calculation error in the book to find the value of R_F so the answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Closed_loop_voltage_gai.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A = 2*10^5;\n",
+"R_F = 4.7*10^3;// in ohm\n",
+"R1 = 470;// in ohm\n",
+"K = R_F/(R1+R_F);\n",
+"B = R1/(R1+R_F);\n",
+"A_F = -(A*R_F)/(R1+R_F+(R1*A));\n",
+"disp(A_F,'The closed loop voltage gain is');\n",
+"R_in = 2;// in M ohm\n",
+"R_in = R_in * 10^6;// in ohm\n",
+"R_inf = R1 + ( (R_F*R_in)/(R_F+R_in + (A*R_in)) );// in ohm\n",
+"disp(R_inf,'Input resistance in Ω is');\n",
+"R_o = 75;// in ohm\n",
+"R_of = R_o/(1+(A*B));// in ohm\n",
+"R_of = R_of * 10^3;// in mΩ\n",
+"disp(R_of,'Output Resistance in mΩ is');\n",
+"f_o = 5;// Hz\n",
+"f_f = f_o*(1+(A*B));// in Hz\n",
+"f_f = f_f *10^-3;// in kHz\n",
+"disp(f_f,'Band width with feedback in kHz is');\n",
+"\n",
+"// Note: In the book, the unit of output resistant is wrong it will be mΩ (not MΩ)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Inverting_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 3.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A_F = -30;\n",
+"R_F = 1;// in M ohm\n",
+"R1 = -(R_F/A_F);// in Mohm\n",
+"R_i = R1;// in Mohm\n",
+"disp(R_i*10^3,'Input resistance in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Feedback_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A_F = 61;\n",
+"R1 = 1;// in k ohm\n",
+"R1 = R1 * 10^3;// in ohm\n",
+"R_F = (A_F-1)*R1;// in ohm\n",
+"R_F = R_F * 10^-3;// k ohm\n",
+"disp(R_F,'The value of feedback resistance in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Closed_loop_gain_and_input_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A = 2*10^5;\n",
+"R1 = 1;// in k ohm\n",
+"R1 = R1 *10^3;// in ohm\n",
+"R_F = 10;// in k ohm\n",
+"R_F = R_F * 10^3;// in ohm\n",
+"B = R1/(R1+R_F);\n",
+"R_i = 2;// in M ohm\n",
+"R_i = R_i * 10^6;// in ohm\n",
+"R_o = 75;// in ohm\n",
+"A_F = A/(1+(A*B));\n",
+"disp(A_F,'The closed loop gain is');\n",
+"R_if = R_i * (1+(A*B));// in ohm\n",
+"disp(R_if*10^-9,'Input resistance in GΩ is');\n",
+"R_of = R_o/(1+(A*B));// in ohm\n",
+"R_of = R_of * 10^3;// in mΩ\n",
+"disp(R_of,'The output resistance in mΩis');\n",
+"f_o = 5;// in Hz\n",
+"f_f = f_o*(1+(A*B));// in Hz\n",
+"f_f = f_f * 10^-3;// in kHz ... correction....\n",
+"disp(f_f,'Bandwidth with feedback in kHz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Voltage_gain_and_input_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A =2*10^5;\n",
+"R_i = 2;// in M ohm\n",
+"R1 = 1;// in ohm \n",
+"R_o= 75;// in ohm\n",
+"R_F = 1;// in ohm\n",
+"B = R1/(R1+R_F);\n",
+"A_F = -1;\n",
+"disp(A_F,'The voltage gain is ');\n",
+"R_if = 330;// in ohm\n",
+"disp(R_if,'Input resistance in Ω is');\n",
+"R_of = R_o/(A/2);// in ohm\n",
+"disp(R_of,'Output resistance in Ω is');\n",
+"f_o = 5;// in Hz\n",
+"f_F = (A/2)*f_o;// in Hz\n",
+"f_F = f_F * 10^-6;// in MHz\n",
+"disp(f_F,'The bandwidth in MHz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Value_of_Af_Rif_RoF_and_fF.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A = 2*10^5;\n",
+"R_i = 2;//in M ohm\n",
+"R_i = 2*10^6;// in ohm\n",
+"R_o = 75;//in ohm\n",
+"f_o = 5;// in Hz\n",
+"V_CC = 15;// in V\n",
+"V_EE = -15;// in V\n",
+"R1 = 1;// in k ohm\n",
+"R1 = R1 * 10^3;// in ohm\n",
+"R_F = 10;// in k ohm\n",
+"R_F = R_F * 10^3;// in ohm\n",
+"OVS= 13;// output voltage swing in V in ±\n",
+"B = R1/(R1+R_F);\n",
+"A_B = A*B;\n",
+"A_B1 = 1+(A*B);\n",
+"A_F = (1+(R_F/R1));\n",
+"disp('Part (i) For non-inverting amplifier')\n",
+"disp(A_F,'The value of A_F is');\n",
+"R_iF = R_i * (A_B1);// in ohm\n",
+"disp(R_iF*10^-9,'The value of R_iF in GΩis');\n",
+"R_OF = R_o/(A_B1);// in ohm\n",
+"disp(R_OF,'The value of R_OF in ohm is');\n",
+"f_F = f_o*A_B1;// in Hz\n",
+"f_F =f_F * 10^-3;// in kHz\n",
+"disp(f_F,'The value of f_F in kHz is');\n",
+"V_ooT= OVS/(1+A*B);// in V\n",
+"disp('The value of VooT is ±'+string(V_ooT)+' V or ±'+string(V_ooT*10^3)+' mV')\n",
+"\n",
+"disp('Part (ii) For inverting amplifier')\n",
+"R_F = 4.7;// in k ohm\n",
+"R_F = R_F* 10^3;// in ohm\n",
+"R_1 = 470;// in ohm\n",
+"A_F = -(R_F)/R_1;\n",
+"disp(A_F,'The value of A_F is');\n",
+"R_iF = R_1// in ohm\n",
+"disp(R_iF,'The value of R_iF in Ω is');\n",
+"R_OF = R_o/(A_B1);// in ohm\n",
+"disp(R_OF,'The value of R_OF in Ω is');\n",
+"f_F = f_o*A_B1;// in Hz\n",
+"f_F =f_F * 10^-3;// in kHz\n",
+"disp(f_F,'The value of f_F in kHz is');\n",
+"V_ooT = OVS/A_B1;// in mV\n",
+"disp('The value of VooT is ±'+string(V_ooT)+' V or ±'+string(V_ooT*10^3)+' mV')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Voltage_gain_and_input_output_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXA 3.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 5;// in k ohm\n",
+"R_F = 500;// in k ohm\n",
+"V_in = 0.1;// in V\n",
+"A_F = -(R_F/R1);\n",
+"disp(A_F,'Voltage gain is');\n",
+"R_i = R1;// in k ohm\n",
+"disp(R_i,'The Input resistance in kΩ is');\n",
+"R_o = 0;// in ohm\n",
+"disp(R_o,'Output resistance in Ω is');\n",
+"V_out = A_F*V_in;// in V\n",
+"disp(V_out,'Output voltage in V is');\n",
+"I_in = V_in/(R1*10^3);// in A\n",
+"I_in = I_in * 10^3;// in mA\n",
+"disp(I_in,'Input current in mA is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: Input_impedance_voltage_gain_and_power_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 3.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_F = 1;// in M ohm\n",
+"R_in = 1;// in M ohm\n",
+"V_in = 1;// in V (assumed)\n",
+"V_out = -(R_F/R_in)*V_in;\n",
+"A_v = V_out/V_in;\n",
+"disp(A_v,'The value of A_v is');\n",
+"I_in = 1;// in A\n",
+"I_out = I_in;// in A\n",
+"A_in = I_out/I_in;\n",
+"disp(A_in,'The value of A_in is');\n",
+"A_P = abs(A_v*A_in);\n",
+"disp(A_P,'The value of A_P is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/4-Linear_Applications_of_IC_Op_Amps.ipynb b/Integrated_Circuits_by_S_Sharma/4-Linear_Applications_of_IC_Op_Amps.ipynb
new file mode 100644
index 0000000..7caf218
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/4-Linear_Applications_of_IC_Op_Amps.ipynb
@@ -0,0 +1,985 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Linear Applications of IC Op Amps"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Safe_frequency_and_dc_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_F = 1.2;// in M ohm\n",
+"R_F = R_F * 10^6;// in ohm\n",
+"C_F = 10;// in nF\n",
+"C_F = C_F * 10^-9;// in F\n",
+"f_a = 1/(2*%pi*R_F*C_F);// in Hz\n",
+"disp(f_a,'The safe frequency in Hz is');\n",
+"R1 = 120;// in k ohm\n",
+"R1 = R1 * 10^3;// in ohm\n",
+"A = R_F/R1;\n",
+"AindB= 20*log10(A);// in dB\n",
+"disp(AindB,'The d.c gain in dB is');\n",
+"f = 10;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"A = (R_F/R1)/(sqrt( 1+ ((f/f_a)^2) ));\n",
+"V_in_peak = 5;// in V\n",
+"V_out_peak = V_in_peak*A;// in V\n",
+"disp(V_out_peak*10^3,'The peak of output voltage in mV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Vrms= 10;// in mV\n",
+"f= 2*10^3;// in kHz\n",
+"C= 2*10^-6;// in F\n",
+"R= 50*10^3;// in ohm\n",
+"SF= -1/(C*R);// scale factor\n",
+"//Vout= -1/(R*C)*sqrt(2)*Vrms*integrate('sind(2*%pi*f*t)','t',0,t);// in mV\n",
+"//Vout= 1/(R*C)*sqrt(2)*Vrms/(2*%pi*f)*(cos(4000*t)-1);// in mV\n",
+"V= 1/(R*C)*sqrt(2)*Vrms/(2*%pi*f);// (assumed)\n",
+"disp('Output voltage in mV is : '+string(V)+'*(cos(4000 *t)-1)) mV')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: Closed_loop_time_constant.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Vin=10;// in V\n",
+"R= 2.2;// in kΩ\n",
+"R= R*10^3;// in Ω\n",
+"T= 1;// in ms\n",
+"T= T*10^-3;// in sec\n",
+"C= 1;// in µF\n",
+"C= C*10^-6;// in F\n",
+"gain= 10^5;// differential voltage gain\n",
+"I= Vin/R;// in A\n",
+"V= I*T/C;// in V\n",
+"disp(V,'The capacitor voltage at the end of the pulse in volts is : ')\n",
+"RC_desh= R*C*gain;// in sec\n",
+"disp(RC_desh,'The closed loop time constant in sec is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: Values_of_R1_and_RF.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"omega= 10000;// in rad/sec\n",
+"GaindB= 20;// peak gain in dB\n",
+"Gain= 10^(GaindB/20);\n",
+"C= 0.01;// in µF\n",
+"C= C*10^-6;// in F\n",
+"// Formula omega= 1/(C*RF)\n",
+"RF= 1/(C*omega);// in Ω\n",
+"R1= RF/Gain;// in Ω\n",
+"disp(RF*10^-3,'The value of RF in kΩ is : ')\n",
+"disp(R1*10^-3,'The value of R1 in kΩ is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: Sketch_of_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R= 40*10^3;// in Ω\n",
+"C= 0.2*10^-6;// in F\n",
+"Vin= 5;// in V\n",
+"V1=3;// in V\n",
+"V2= V1;// in V\n",
+"Vout= V2;// in V\n",
+"t= 0:0.1:50;// in ms\n",
+"Vout= -1/(R*C)*integrate('Vin-V1','t',0,t)/10^3+Vout;// in volts\n",
+"plot(t,Vout);\n",
+"xlabel('Time in milliseconds')\n",
+"ylabel('Output voltage in volts')\n",
+"title('Vout Graph')\n",
+"disp('The Vout graph shown in figure')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: Time_duration_for_saturation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 500;// in k ohm\n",
+"R = R * 10^3;// in ohm\n",
+"C = 10;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"V= -0.5;// in V\n",
+"Vout= 12;// in V\n",
+"// Vout= -1/RC*integrate('V*t','t',0,t)= -1/(R*C)*V*t\n",
+"t= Vout/(-1/(R*C)*V);// in sec\n",
+"disp(t,'Time duration required for saturation of output voltage in second is : ')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: Values_of_resistors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C_F = 10;// in µF\n",
+"C_F = C_F * 10^-6;// in F\n",
+"R1 = 1/C_F;// in ohm\n",
+"R1 = R1 * 10^-3;// in k ohm\n",
+"disp(R1,'The value of R1 in kΩ is');\n",
+"R2 = 1/(C_F*2);// in ohm\n",
+"R2 = R2 * 10^-3;// in k ohm\n",
+"disp(R2,'The value of R2 in kΩ is');\n",
+"R3 = 1/(C_F*5);// in ohm\n",
+"R3 = R3 * 10^-3;;// in k ohm\n",
+"disp(R3,'The value of R3 in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: Practical_differentiator_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_max = 150;// in Hz\n",
+"f_a = f_max;// in Hz\n",
+"disp(f_a,'The value of f_a in Hz is : ')\n",
+"C1 = 1;// in µF\n",
+"C1 = C1 * 10^-6;// in F\n",
+"R_F = 1/(2*%pi*f_a*C1);// in ohm\n",
+"disp(R_F*10^-3,'The value of R_F in kΩ is');\n",
+"f_b = 10*f_a;// in Hz\n",
+"R1 = 1/(2*%pi*f_b*C1);// in ohm\n",
+"C_F = (R1*C1)/R_F;// in F\n",
+"disp(C_F*10^6,'The value of C_F in µF is');\n",
+"R_comp = (R1*R_F)/(R1+(R_F));// in ohm\n",
+"disp(R_comp,'The value of R_comp in Ω is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Vmax= 10;// in µV\n",
+"f= 2*10^3;// in kHz\n",
+"//Vin= Vmax*sin(2*%pi*f*t);// in µV\n",
+"disp('The input voltage is '+string(Vmax)+'*sin ('+string(2*f)+'%pi*t) µV')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.19: Values_of_ROM_and_Vout.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Vp= 1.5;// in V\n",
+"f= 200;// in Hz\n",
+"f_a= 1*10^3;// in Hz\n",
+"C= 0.1*10^-6;// in F\n",
+"// Formula f_a= 1/(2*%pi*f_a*C)\n",
+"R= 1/(2*%pi*f_a*C);// in ohm\n",
+"R= 1.5;// in kΩ (standard value)\n",
+"f_b= 20*f_a;// in Hz\n",
+"// Formula f_b= 1/(2*%pi*R_desh*C)\n",
+"R_desh= 1/(2*%pi*f_b*C);// in ohm\n",
+"R_desh= 82;// in ohm (standard value)\n",
+"R_OM= R;// in kohm\n",
+"disp(R_OM,'The value of R_OM in kΩ is : ')\n",
+"omega= 2*%pi*f;// in radian\n",
+"// Vin= Vp*sin(omega*t) and Vout= -R*C*dv_in/dt\n",
+"// Vout= -R*C*Vp*omega*cos(400*%pi*t)\n",
+"V= -R*10^3*C*Vp*omega;// (assumed)\n",
+"//Vout= V*cos(400*%pi*t)\n",
+"disp('Output voltage is '+string(V)+' *cos(400*%pi*t) volts')\n",
+"disp('Output voltage waveforms shown in figure')\n",
+"x= -%pi/2:0.1:2*%pi;\n",
+"plot(x,V*cos(x));\n",
+"title('Output Voltage waveforms')\n",
+"xlabel('Time')\n",
+"ylabel('Vout')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1= 1;// in kΩ\n",
+"R2= 1;// in kΩ\n",
+"R3= 1;// in kΩ\n",
+"RF= 1;// in kΩ\n",
+"Vin1= 2;// in volt\n",
+"Vin2= 1;// in volt\n",
+"Vin3= 4;// in volt\n",
+"Vout= -(RF/R1*Vin1+RF/R2*Vin2+RF/R3*Vin3)\n",
+"disp(Vout,'The output voltage in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20: Range_of_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.20\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R2 = 100;// in ohm\n",
+"R1 = 200;// in ohm\n",
+"R_F = 100;// in k ohm\n",
+"R_F = R_F * 10^3;// in ohm\n",
+"R_G = 100;// in ohm\n",
+"Gain_max = ( 1+((2*R_F)/R_G) ) * (R2/R1);\n",
+"R = 100;// in k ohm\n",
+"R_G1 = 0.01+R;// in k ohm\n",
+"R_G1 = R_G1 * 10^3;// in ohm\n",
+"Gain_min = ( 1+((2*R_F)/R_G1) ) * (R2/R1);\n",
+"disp('The gain can be varied from '+string(Gain_min)+' to '+string(Gain_max))"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21: Value_of_RG.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 4.21\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 100;// in k ohm\n",
+"R2 = 100;// in k ohm\n",
+"R_F = 470;// in k ohm\n",
+"Gain = 100;\n",
+"R_G = (2*R_F)/(Gain-1);// in ohm\n",
+"disp(R_G,'The value of R_G in ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22: Transconductance_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.22\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 100;// in ohm\n",
+"T = 25;// in degree C\n",
+"alpha = 0.00392;\n",
+"R1 = R*(1+(alpha*T));// in ohm\n",
+"expression= 'R_T= Ro*[1+alpha*T]';\n",
+"disp(expression,'The expression for the resistance at T°C is : ')\n",
+"disp(R1,'The transducer resistance at 25°C in Ω is');\n",
+"T = 100;// in degree C\n",
+"R2 = R*(1+(alpha*T));// in ohm\n",
+"disp(R2,'The transducer resistance at 100°C in Ω is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.23: Instrumentation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.23\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R3 = 1;// in k ohm\n",
+"R4 = 1;// in k ohm\n",
+"R_min = R4/R3;\n",
+"R_4 = 50;// in k ohm\n",
+"R_max = (R_4+R4)/R3;\n",
+"R2 = 10;// in k ohm\n",
+"A_F = 5;\n",
+"R1 = (((A_F/R_min)-1)*R2)/2;// in k ohm\n",
+"disp(R1,'The value of R1 in kΩ is');\n",
+"disp(R2,'The value of R2 in kΩ is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.24: Expression_for_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.24\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1= 100;// in kΩ\n",
+"R2=200;// in kΩ\n",
+"R3= 20;// in kΩ\n",
+"R4=40;// in kΩ\n",
+"//Vout= [1+R2/R1]*[R4/(R3+R4)]*Vin1-R2/R1*Vin2\n",
+"A=[1+R2/R1]*[R4/(R3+R4)];// (assumed)\n",
+"disp('Output voltage is '+string(A)+'*(Vin1-Vin2)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.25: Gain_of_instrumentation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.25\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_F = 5;// in k ohm\n",
+"R_G = 1;// in k ohm\n",
+"R1 = 10;// in k ohm\n",
+"R2 = 20;// in k ohm\n",
+"A = (1 + ((2*R_F)/R_G))*(R2/R1);\n",
+"disp(A,'The gain of instrumentaion amplifier is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.27: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 4.27\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R_F = 10;// in k ohm\n",
+"R_G = 5;// in k ohm\n",
+"R1 = 1;// in k ohm\n",
+"R2 = 2;// in k ohm\n",
+"A = (1+ ((2*R_F)/R_G))*(R2/R1);\n",
+"V_in2 = 2;// in mV\n",
+"V_in1 = 1;// in mV\n",
+"V_out = A*(V_in2-V_in1);// in mV\n",
+"disp(V_out,'The output voltage in mV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.28: Value_of_RG.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 4.28\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V_out = 3;// in V\n",
+"V_in2 = 5;// in mV\n",
+"V_in1 = 2;// in mV\n",
+"V1 = V_in2-V_in1;// in mV\n",
+"V1 = V1 * 10^-3;// in V\n",
+"A = V_out/V1;\n",
+"R_F = 15;// in k ohm\n",
+"R1 = 1;// in k ohm\n",
+"R2 = 2;// in k ohm\n",
+"R = R2/R1;// in k ohm\n",
+"R_G = (2*R_F)/((A/R)-1);//in k ohm\n",
+"R_G = R_G * 10^3;// in ohm\n",
+"disp(R_G,'The value of R_G in Ω is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Design_an_adder_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"RF= 100;// in kΩ\n",
+"Vout= '-(V1+10*V2+100*V3)';// given expression\n",
+"// Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n",
+"// Comparing the Vout with the given expression\n",
+"R1= RF;// in kΩ\n",
+"R2= RF/10;// in kΩ\n",
+"R3= RF/100;// in kΩ\n",
+"disp(R1,'The value of R1 in kΩ is : ');\n",
+"disp(R2,'The value of R2 in kΩ is : ');\n",
+"disp(R3,'The value of R3 in kΩ is : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.31: Three_op_amp_instrumentation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.31\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"A=10000;\n",
+"R1= 100;// in kΩ\n",
+"A2= 1/5;// (assumed value)\n",
+"R2= R1/A2;// in kΩ\n",
+"// A= A1*A2 and A1= 1+2*RF/R_GB\n",
+"RFbyR_GB= (A/A2-1)/2;\n",
+"// [1+2*RF/RG]*A2= 1 and RG= RGB+100 kΩ\n",
+"R_G= (1-1/A2)/2*100/[(1/A2-1)/2-RFbyR_GB];// in kΩ\n",
+"R_F= RFbyR_GB*R_G;// in kΩ\n",
+"disp(R_F,'The value of R_F in kΩ is : ')\n",
+"disp(R_G*10^3,'The value of R_G in Ω is : ')\n",
+"disp('This is the base resistance required in series with the pot of 100 kΩ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1= 12;// in kΩ\n",
+"R2= 2;// in kΩ\n",
+"R3= 3;// in kΩ\n",
+"RF= 12;// in kΩ\n",
+"V1= 9;// in volt\n",
+"V2= -3;// in volt\n",
+"V3= -1;// in volt\n",
+"Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n",
+"disp(Vout,'The output voltage in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Summing_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"RF= 6;// in kΩ\n",
+"Vout= '-V1+2*V2-3*V3';// given expression or\n",
+"Vout= '-(V1-2*V2+3*V3)';\n",
+"// Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n",
+"// Comparing the Vout with the given expression\n",
+"R1= RF;// in kΩ\n",
+"R2= RF/2;// in kΩ\n",
+"R3= RF/3;// in kΩ\n",
+"disp(R1,'The value of R1 in kΩ is : ');\n",
+"disp(R2,'The value of R2 in kΩ is : ');\n",
+"disp(R3,'The value of R3 in kΩ is : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Values_of_resistances.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R3= 10;// in kΩ\n",
+"Vout= '-2*V1+3*V2+4*V3';// given expression or\n",
+"Vout= '-(2*V1-3*V2-4*V3)';\n",
+"// Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n",
+"// Comparing the Vout with the given expression, we get\n",
+"RF= 4*R3;// in kΩ\n",
+"R2= RF/3;// in kΩ\n",
+"R1= RF/2;// in kΩ\n",
+"disp(RF,'The value of RF in kΩ is : ');\n",
+"disp(R2,'The value of R2 in kΩ is : ');\n",
+"disp(R1,'The value of R1 in kΩ is : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"V1= 2;// in V\n",
+"V2= -1;// in V\n",
+"R=10;// assuming value in kΩ\n",
+"R1=R;// in kΩ\n",
+"R2= R;// in kΩ\n",
+"R3= R;// in kΩ\n",
+"R4= R;// in kΩ\n",
+"RF= 2*R;// in kΩ\n",
+"Vin1= V1*(R1*R2/(R1+R2))/(R1+(R2*R3/(R2+R3)));// in V\n",
+"Vout1= Vin1*(1+RF/R1);// in V\n",
+"Vin2= V2*(R3*R4/(R3+R4))/(R2+(R3*R4/(R3+R4)));// in V\n",
+"Vout2= Vin2*(1+RF/R2);// in V\n",
+"Vout= Vout1+Vout2;// in V\n",
+"disp(Vout,'The output voltage in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Limiting_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1= 10;// in kΩ\n",
+"CF= 0.1;// in micro F\n",
+"CF= CF*10^-6;// in F\n",
+"RF= 10*R1;// in kΩ\n",
+"RF= RF*10^3;// in Ω\n",
+"fa= 1/(2*%pi*RF*CF);// in Hz\n",
+"disp(fa,'Limiting frequency in Hz is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Practical_integrator_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f=10;// in kHz\n",
+"f=f*10^3;// in Hz\n",
+"dcGain= 10;\n",
+"fa= f/10;// in Hz\n",
+"R1= 10;// in kΩ\n",
+"// Formula dcGain= RF/R1\n",
+"RF= R1*dcGain;// in kΩ\n",
+"RF=RF*10^3;// in Ω\n",
+"R1= R1*10^3;// in Ω\n",
+"// Formula fa= 1/(2*%pi*RF*CF)\n",
+"CF= 1/(2*%pi*RF*fa);// in F\n",
+"CF=CF*10^9;// in nF\n",
+"Rcomp= R1*RF/(R1+RF);// in Ω\n",
+"disp(CF,'The value of CF in nF is : ')\n",
+"disp(Rcomp*10^-3,'The value of Rcomp in kΩ is : ');\n",
+"\n",
+"// Note: There is calculation error in evaluating the value of CF in the book. So The value of CF in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Maximum_change_in_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Exa 4.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Vin=5;// in V\n",
+"R1= 1;// in kΩ\n",
+"R1= R1*10^3;// in Ω\n",
+"CF= 0.1;// in µF\n",
+"CF= CF*10^-6;// in F\n",
+"f= 1;// in kHz\n",
+"f= f *10^3;// in Hz\n",
+"T= 1/f;// in sec\n",
+"delta_Vout= Vin*T/(2*R1*CF);// in V\n",
+"disp(delta_Vout,'The maximum change in output voltage in volts is : ')\n",
+"S= 2*%pi*f*Vin;// in V/sec\n",
+"disp(S*10^-6,'The minimum slew rate required in V/micro-sec is : ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/5-Filters.ipynb b/Integrated_Circuits_by_S_Sharma/5-Filters.ipynb
new file mode 100644
index 0000000..9c0fa92
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/5-Filters.ipynb
@@ -0,0 +1,912 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Filters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: Second_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 10;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"omega_c= 2*%pi*f_c;// in rad/sec\n",
+"C = 0.01;// in µF\n",
+"C= C*10^-6;// in F\n",
+"Ri= 10*10^3;// in Ω\n",
+"n=2;\n",
+"Q= 1/1.414;\n",
+"R= 1/(2*%pi*f_c*C);// in Ω\n",
+"Af= 3-1/Q;\n",
+"Rf= (Af-1)*Ri;// in Ω\n",
+"disp(C*10^6,'The value of C in µF is : ')\n",
+"disp(R*10^-3,'The value of R in kΩ is : ')\n",
+"disp(Rf*10^-3,'The value of Rf in kΩ is : ')\n",
+"disp('Frequency versus gain magnitude shown in following table:')\n",
+"disp(' Frequency in Hz Gain Magnitude in dB |H(s)|')\n",
+"f= 1000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))\n",
+"f= 2000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))\n",
+"f= 5000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))\n",
+"f= 10000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))\n",
+"f= 50000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))\n",
+"f= 100000;// in Hz\n",
+"omega= 2*%pi*f;// in rad/sec\n",
+"HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)^4))\n",
+"disp(' '+string(f)+' '+string(HsdB))"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: Fourth_order_Butterworth_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 1;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C = 0.1;// in µF\n",
+"disp(C,'The value of C in µF is');\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f_c*C);// in ohm\n",
+"disp(R*10^-3,'The value of R in kΩ is');\n",
+"Q1 = 1/0.765;\n",
+"alpha1 = 1/Q1;\n",
+"Q2 = 1/1.848;\n",
+"alpha2 = 1/Q2;\n",
+"A_F1 = 3-alpha1;\n",
+"A_F2 = 3-alpha2;\n",
+"R_i =10*10^3;// in ohm\n",
+"R_F = (A_F1-1)*R_i;// in ohm\n",
+"disp(R_F*10^-3,'For first stage the value of R_F in kΩ is');\n",
+"R_i = 100*10^3;// ohm\n",
+"R_F = (A_F2-1)*R_i;// in ohm\n",
+"disp(R_F*10^-3,'For second stage the value of R_F in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: Value_of_Resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 10;// in kHz\n",
+"f_c = f_c *10^3;// in Hz\n",
+"C = 0.0047;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f_c*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"disp(R,'The value of R in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: Passband_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 15;// in k ohm\n",
+"R = R *10^3;// in ohm\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f_c = 1/(2*%pi*R*C);// in Hz\n",
+"f_c= round(f_c);\n",
+"disp(f_c,'Cut off frequency in Hz is');\n",
+"Omega_c = 2*%pi*f_c;// in rad/sec\n",
+"disp(Omega_c*10^-3,'The value of omega_c in k rad/sec is');\n",
+"\n",
+"// Note: There is calculation error to find the value of omega_c. So the answer in the book is wrong"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: Cut_off_frequency_and_passband_voltage_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.16 printed as 5.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 27;// in k ohm\n",
+"R1 = R1 * 10^3;// in ohm\n",
+"R2 = R1;// in ohm\n",
+"R3 = R2 ;// in ohm\n",
+"R = R1;// in ohm\n",
+"R_L = 10;// in k ohm\n",
+"R_F = 16;// in k ohm\n",
+"C2 = 0.005;// in µF\n",
+"C2 = C2 * 10^-6;// in F\n",
+"C3 = C2;// in F\n",
+"C = C3;// in F\n",
+"f_c = 1/(2*%pi*R*C);// in Hz\n",
+"f_c = f_c * 10^-3;// in kHz\n",
+"R1= R1*10^-3;// in kohm\n",
+"disp(f_c,'Cut off frequency in kHz is');\n",
+"A_F = 1+(R_F/R1);\n",
+"disp(A_F,'Voltage gain is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: Second_order_Bessel_Filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha = 1.732;\n",
+"k_f = 1.274;\n",
+"C1 = 1;// in F\n",
+"C2 = C1;// in F\n",
+"R1 = alpha/2;// in ohm\n",
+"R2 = 2/alpha;// in ohm\n",
+"R_F = R2;// in ohm\n",
+"f_3dB = 2;// in kHz\n",
+"f_3dB = f_3dB * 10^3;// in Hz\n",
+"f_c = f_3dB/k_f;// in Hz\n",
+"Omega_c = 2*%pi*f_c;// in rad/sec\n",
+"R1 = R1/Omega_c;// in ohm\n",
+"R1 = R1 * 10^8;// in ohm\n",
+"R2 = R2/Omega_c;// in ohm\n",
+"R2 = R2 * 10^8;// in ohm\n",
+"R_F = R2;// in ohm\n",
+"C1 = C1/10^8;// in F\n",
+"disp(R1*10^-3,'The value of R1 in kΩ is : ')\n",
+"disp(R2*10^-3,'The value of R2 and R_F in kΩ is : ')\n",
+"disp(C1*10^9,'The value of C1 and C2 in nF is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: Wide_band_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.18 printed as 5.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"Cdesh = 0.01;// in µF\n",
+"Cdesh= Cdesh* 10^-6;// in F\n",
+"f_H = 1;// in kHz\n",
+"f_H = f_H * 10^3;// in Hz\n",
+"Rdesh= 1/(2*%pi*f_H*Cdesh);// in ohm\n",
+"A_F2 = 2;\n",
+"R1desh = 10*10^3;// in ohm\n",
+"Rdesh_F= R1desh;// in ohm\n",
+"disp('(i) Low-pass Filter Components : ')\n",
+"disp(R1desh*10^-3,'The value of R1desh in kΩ is');\n",
+"disp(Rdesh*10^-3,'The value of Rdesh in kΩ is : ');\n",
+"disp(Rdesh_F*10^-3,'The value of Rdesh_F in kΩ is : ');\n",
+"disp(Cdesh*10^6,'The value of C in µF is ');\n",
+"C = 0.05;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f_L = 100;// in Hz\n",
+"R = 1/(2*%pi*f_L*C);// in ohm\n",
+"A_F1 = 2;\n",
+"R1 = 10*10^3;// in ohm\n",
+"R_F = R1;// in ohm\n",
+"disp('(ii) High pass Filter Components')\n",
+"disp(R1*10^-3,'The value of R1 in kΩ is');\n",
+"disp(R*10^-3,'The value of R in kΩ is');\n",
+"disp(R_F*10^-3,'The value of R_F in kΩ is');\n",
+"disp(C*10^6,'The value of C in µF is ');\n",
+"Q = sqrt(f_H*f_L)/(f_H-f_L);\n",
+"disp(Q,'The quality factor is');\n",
+"\n",
+"// Note : In High pass filter components, the value of R is calculated 31.83 kΩ but at last it is writter as 3.183 kΩ so the answer of R in High pass filter components is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: Narror_band_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 2;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"A_F = 10;\n",
+"Q = 4;\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R1 = Q/(2*%pi*f_c*C*A_F);// in ohm \n",
+"R1 = R1 * 10^-3;// in k ohm\n",
+"disp('The value of R1 is '+string(R1)+' kΩ (standard value 3.3 kΩ)');\n",
+"R2 = Q/(2*%pi*f_c*C*(2*Q^2-A_F));// in ohm\n",
+"R2 = R2 * 10^-3;// in k ohm\n",
+"disp('The value of R2 is '+string(R2)+' kΩ (standard value 1.5 kΩ)');\n",
+"R3 = Q/(%pi*f_c*C);// in ohm\n",
+"R3 = R3 * 10^-3;// in k ohm\n",
+"disp('The value of R3 is '+string(R3)+' kΩ (standard value 63 kΩ)');\n",
+"f_c1 = 1;// in kHz\n",
+"Rdesh2 = R2*(((f_c*10^-3)/f_c1)^2);// in k ohm\n",
+"disp('The value of Rdesh_2 is '+string(Rdesh2)+' kΩ (standard value 5.8 kΩ)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Cut_off_frequency_and_passband_voltage_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 10;// in k ohm\n",
+"R = R * 10^3;// in ohm\n",
+"C = 0.001;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f_c = 1/(2*%pi*R*C);// Hz\n",
+"f_c = f_c * 10^-3;// in kHz\n",
+"disp(f_c,'Cutoff frequency in kHz is');\n",
+"R_F = 100;// in k ohm\n",
+"R1 = 10;// in k ohm\n",
+"A_F = 1+(R_F/R1);\n",
+"disp(A_F,'The passband voltage gain is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: Wide_band_reject_Filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.20 Printed as 5.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_H = 100;// in Hz\n",
+"f_L = 2;// in kHz\n",
+"f_L = f_L * 10^3;// in Hz\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f_L*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"A_F = 2;\n",
+"R1 = 10;// in k ohm\n",
+"// A_F= 1+R_F/R1 or\n",
+"R_F= (A_F-1)*R1;// in k ohm\n",
+"disp('(i) High-pass Section Components : ')\n",
+"disp(C*10^6,'The value of C in µF is : ')\n",
+"disp(R,'The value of R in kΩ is');\n",
+"disp(R_F,'The value of R_F and R1 in kΩ is');\n",
+"Cdesh = 0.1;// in µF\n",
+"Cdesh= Cdesh* 10^-6;// in F\n",
+"Rdesh = 1/(2*%pi*f_H*Cdesh);// in ohm\n",
+"Rdesh= Rdesh * 10^-3;// in k ohm\n",
+"Rdesh1 = 10;// in k ohm\n",
+"Rdesh_F= Rdesh1;// in k ohm\n",
+"disp('(ii) Low-pass Section components : ')\n",
+"disp(Cdesh*10^6,'The value of Cdesh in µF is : ')\n",
+"disp(Rdesh,'The value of Rdesh in kΩ is');\n",
+"disp(Rdesh_F,'The value of Rdesh_F and Rdesh1 in kΩ is');\n",
+"R2 = 10;// in k ohm\n",
+"R3 = R2;// in k ohm\n",
+"R4 = R2;// in k ohm\n",
+"R_OM = (R2*R3*R4)/(R2*R3+R3*R4+R4*R2);// in k ohm\n",
+"disp('(iii) Summing Amplifier component')\n",
+"disp(R_OM,'The value of R_OM in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: Active_notch_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.21\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_N = 50;// in Hz\n",
+"C = 0.47;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f_N*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"disp(R,'Resistance in k ohm is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.22: Phase_shift_between_input_and_output_voltages.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// EXa 5.22\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R = 10;// in k ohm\n",
+"R = R * 10^3;// in ohm\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f = 2;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"Phi = -2*atand(2*%pi*R*C*f);// in degree\n",
+"disp(Phi,'The phase shift in degree is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.23: Center_frequency_and_quality_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.23\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_L = 200;// in Hz\n",
+"f_H = 1;// in kHz\n",
+"f_H = f_H * 10^3;// in Hz\n",
+"f_c = sqrt(f_H*f_L);// in Hz\n",
+"disp(f_c,'The center frequency in Hz is');\n",
+"Q = f_c/(f_H-f_L);\n",
+"disp(Q,'Quality factor is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.24: Wide_bandpass_Filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.24\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f1 = 5;// in kHz\n",
+"f1 = f1 * 10^3;// in Hz\n",
+"f2 = 15;// in kHz\n",
+"f2 = f2 * 10^3;// in Hz\n",
+"Cdesh = 0.01;// in µF\n",
+"Cdesh= Cdesh * 10^-6;// in F\n",
+"Rdesh = 1/(2*%pi*f2*Cdesh);// in ohm\n",
+"A_F1 = 1.414;\n",
+"A_F2 = A_F1;\n",
+"Rdesh1 = 10;// in k ohm\n",
+"Rdesh_F = (A_F1-1)*Rdesh1;// in k ohm\n",
+"disp('(i) Low pass Filter components : ')\n",
+"disp(Rdesh1,'The value of Rdesh1 in kΩ is : ')\n",
+"disp(Rdesh*10^-3,'The value of Rdesh in kΩ is : ')\n",
+"disp(Rdesh_F,'The value of Rdesh_F in kΩ is : ')\n",
+"disp(Cdesh*10^6,'The value of Cdesh in µF is');\n",
+"C = 0.05;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f1*C);//in ohm\n",
+"R1 = 10;// in k ohm\n",
+"R_F = (A_F1-1)*R1;// in k ohm\n",
+"disp('(ii) High pass Filter components : ')\n",
+"disp(R1,'The value of R1 in kΩ is : ');\n",
+"disp(R,'The value of R in Ω is : ');\n",
+"disp(R_F,'The value of R_F in kΩ is : ');\n",
+"disp(C*10^6,'The value of C in µF is : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: First_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 10;// in k ohm\n",
+"R_F = R1;// in k ohm\n",
+"disp(R_F,'The value of R_F in kΩ is');\n",
+"C = 0.001;// in µF\n",
+"C = C *10^-6;// in F\n",
+"f_c = 10;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"R = 1/(2*%pi*f_c*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"disp(R,'The value of R in kΩ is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 2;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C = 0.01;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"R = 1/(2*%pi*f_c*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"R = 8.2;// in k ohm(Practical value)\n",
+"A_F = 2.5;\n",
+"R1 = (A_F*R)/1.5;// in k ohm\n",
+"R_F = 1.5*R1;// in k ohm\n",
+"disp(R1,'The value of R1 in kΩ is : ')\n",
+"disp(R_F,'The value of R_F in kΩ is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Second_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 1;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C = 0.005*10^-6;// in F\n",
+"R3 = 1/(2*%pi*f_c*C);// in ohm\n",
+"R3 = R3 * 10^-3;// in k ohm\n",
+"R2 = R3;// in k ohm\n",
+"R1 = 33;// in k ohm (standard value)\n",
+"R_F = 0.586*R1;// in k ohm\n",
+"disp(R1,'The value of R1 in kΩ is : ')\n",
+"disp(R3,'The value of R2 and R3 in kΩ is');\n",
+"disp(R_F,'The value of R_F in kΩ is : ')\n",
+"disp(C*10^6,'The value of C2 and C3 in µF is :')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Second_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R1 = 12;// in k ohm\n",
+"R_F = 7;// in k ohm\n",
+"R2 = 33;// in k ohm\n",
+"R3 = R2;// in k ohm\n",
+"R = R2;// in k ohm\n",
+"R = R * 10^3;// in ohm\n",
+"C1 = 0.002;// in µF\n",
+"C1 = C1 * 10^-6;// in F\n",
+"C2 = C1;// in F\n",
+"C = C1;// in F\n",
+"f_c = 1/(2*%pi*R*C);// in Hz\n",
+"f_c = f_c * 10^-3;// in kHz\n",
+"disp(f_c,'Cut off frequency in kHz is');\n",
+"A_F = 1+(R_F/R1);\n",
+"disp(A_F,'Pass band voltage gain is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Second_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 2;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C2 = 0.033;// in µF\n",
+"C2 = C2 * 10^-6;// in F\n",
+"C3 = C2;// in F\n",
+"C = C2;// in F\n",
+"R2 = 1/(2*%pi*f_c*C);// in ohm\n",
+"R2 = R2 * 10^-3;// in k ohm\n",
+"R3=R2;// in kohm\n",
+"disp(R2,'The value of R2 and R3 in kΩ is : ');\n",
+"//R_F= 0.586*R1\n",
+"R1= 2*R2*(1+0.586)/0.586;// in k ohm\n",
+"disp(R1,'The value of R1 in kΩ is : ')\n",
+"R1= 15;// in k ohm\n",
+"R_F = 0.586 * R1;// in k ohm\n",
+"disp(R_F,'The value of R_F in kΩ is : ');\n",
+"disp('R_F may be taken as a pot of 10 kΩ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Second_order_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 1;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C2 = 0.0047;// in µF\n",
+"C2 = C2 * 10^-6;// in F\n",
+"C3 = C2;// in F\n",
+"C = C2;// in F\n",
+"R2 = 1/(2*%pi*f_c*C);// in ohm\n",
+"R2 = R2 * 10^-3;// in k ohm\n",
+"R3= R2;// in kohm\n",
+"// Let\n",
+"R1=30;// in kohm\n",
+"R_F= R1*0.586;// in kohm\n",
+"disp(floor(R2),'The value of R2 and R3 in kΩ is : ')\n",
+"disp(R1,'The value of R1 in kΩ is : ')\n",
+"disp(R_F,'The value of R_F in kΩ is : ')\n",
+"disp('The standard value of R_F is 20 kΩ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Second_order_Butterworth_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"f_c = 1.5;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"alpha = sqrt(2);\n",
+"R_F = (2-alpha);// in ohm\n",
+"disp(R_F,'The value of R_F in Ω is : ');\n",
+"R_i = 1;// in ohm\n",
+"A_F = 1+(R_F/R_i);\n",
+"disp(A_F,'The pass band gain is');\n",
+"Omega_c = 2*%pi*f_c;// in rad/sec\n",
+"C = 1;// in F\n",
+"R = 1/Omega_c;// in ohm\n",
+"R = R * 10^7;// in ohm\n",
+"R=R*10^-3;// in kohm\n",
+"R1 = R;// in k ohm\n",
+"R2=R1;// in kohm\n",
+"disp(R1,'The value of R1 and R2 in kΩ is');\n",
+"C = C/10^7;// in µF\n",
+"C = C * 10^9;// in nF\n",
+"C1=C;// in nF\n",
+"C2= C1;// in nF\n",
+"disp(C1,'The value of C1 and C2 in nF is');\n",
+"\n",
+"//Note: The unit of R1 and R2 is wrong in the book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: Second_order_Butterworth_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 5.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"alpha = 1.414;\n",
+"f_c = 1.5;// in kHz\n",
+"f_c = f_c * 10^3;// in Hz\n",
+"C1 = 2/alpha;// in F\n",
+"C2 = alpha/2;// in F\n",
+"R1 = 1;// in ohm\n",
+"R2 = R1;// in ohm \n",
+"R_F = 2;// in ohm\n",
+"Omega_c = 2*%pi*f_c;// in rad/sec\n",
+"R = 1/Omega_c;// in ohm\n",
+"R = R * 10^7;// in ohm\n",
+"R1 = R;// in ohm\n",
+"R2= R1;// in ohm\n",
+"R_F = 2*R;// in ohm\n",
+"C1 = C1/10^7;// in F\n",
+"C2 = C2/10^7;// in F\n",
+"disp(R1*10^-3,'The value of R1 and R2 in k ohm');\n",
+"disp(C1*10^9,'The value of C1 in nF is');\n",
+"disp(C2*10^9,'The value of C2 in nF is');\n",
+"disp(R_F*10^-3,'The value of R_F in k ohm');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/6-Sinusoidal_Oscillators.ipynb b/Integrated_Circuits_by_S_Sharma/6-Sinusoidal_Oscillators.ipynb
new file mode 100644
index 0000000..c9c30a7
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/6-Sinusoidal_Oscillators.ipynb
@@ -0,0 +1,101 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Sinusoidal Oscillators"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Frequency_of_oscillaitor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"R3 = 6;// in k ohm\n",
+"R4 = 2;// in k ohm\n",
+"A = 1+(R3/R4);\n",
+"if A>3 then\n",
+" disp('The circuit will work as the oscillator')\n",
+"end\n",
+"R = 5.1;// in k ohm\n",
+"R = R * 10^3;// in ohm\n",
+"C = 0.001;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f = 1/(2*%pi*R*C);// in Hz\n",
+"f = f * 10^-3;// in kHz\n",
+"disp(f,'The frequency of oscillations in kHz is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Wien_Bridge_Oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 6.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"C = 0.05;// in µF\n",
+"C = C * 10^-6;// in F\n",
+"f = 1;// in kHz\n",
+"f = f * 10^3;// in Hz\n",
+"R = 1/(2*%pi*f*C);// in ohm\n",
+"R = R * 10^-3;// in k ohm\n",
+"disp(R,'The value of R1 and R2 in kΩ is');\n",
+"R4 = 10;// in k ohm\n",
+"disp(R4,'The value of R3 in kΩ is');\n",
+"R3 = 2*R4;// in k ohm\n",
+"disp(R3,'The value of R4 in kΩ is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Integrated_Circuits_by_S_Sharma/8-CMOS_Realization_Of_Inverters.ipynb b/Integrated_Circuits_by_S_Sharma/8-CMOS_Realization_Of_Inverters.ipynb
new file mode 100644
index 0000000..657dcfa
--- /dev/null
+++ b/Integrated_Circuits_by_S_Sharma/8-CMOS_Realization_Of_Inverters.ipynb
@@ -0,0 +1,192 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: CMOS Realization Of Inverters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Value_of_RL_ans_WbyL.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 8.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"NMH= 1;// in V\n",
+"VIH= 2;// in V\n",
+"VTon= 0.5;// in V\n",
+"VOL= 0.2;// in V\n",
+"VDD= 3;// in V\n",
+"KP= 30*10^-6;// in A/V^2\n",
+"PD= 100*10^-6;// power dissipation in W\n",
+"// Formula VIH= VTon +2*sqrt(2*VDD/(3*kn*RL))-1/(kn*RL) (i)\n",
+"// Let x= 1/(kn*RL), putting the values in (i), we get\n",
+"// x^2-5*x+2.25=0\n",
+"x= [1 -5 2.25];\n",
+"x= roots(x);\n",
+"x=x(2);\n",
+"// Formula PD= VDD*(VDD-VOL)/(2*RL)\n",
+"RL= VDD*(VDD-VOL)/(2*PD);// in Ω\n",
+"disp(RL,'The value of RL in Ω is : ')\n",
+"kn= 1/(x*RL);// in A/V^2\n",
+"// Formula kn= KP*(W/L)\n",
+"WbyL= kn/KP;\n",
+"disp(WbyL,'The value of (W/L)n is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4: CMOS_Inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 8.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"unCox= 40;// in µA/V^2\n",
+"upCox= 20;// in µA/V^2\n",
+"Ln= 0.5;// in µm\n",
+"Lp= 0.5;// in µm\n",
+"Wn= 2.0;// in µm\n",
+"Wp= unCox*Wn/upCox;// in µm\n",
+"disp(Wp,'The value of Wp in µm is : ')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5: Value_of_VOH_VOL_and_Vth.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 8.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"VTO= 0.43;// in V\n",
+"VDD= 2.5;// in V\n",
+"g=0.4; // value of gamma\n",
+"W1= 0.375;\n",
+"L1=0.25;\n",
+"W2= 0.75;\n",
+"L2=0.25;\n",
+"//VDD-VOUT-VT= VDD-VOUT-(VTO+g*(sqrt(0.6+VOUT)-sqrt(0.6)))=0\n",
+"//VOUT^2+VOUT*(2*A-g^2)+(A-0.6*g^2)=0, where\n",
+"A=VTO-VDD-g*sqrt(0.6);// assumed\n",
+"B= (2*A-g^2);// assumed\n",
+"C=(A^2-0.6*g^2);//assumed\n",
+"VOUT= [1 B C];\n",
+"VOUT= roots(VOUT);// in V\n",
+"VOUT= VOUT(2);// in V\n",
+"VOH= VOUT;// in V\n",
+"disp(VOH,'The value of VOH in volts is : ')\n",
+"Vout=(W1+3*L2)-(VDD-VTO)*(W2*L1/(W1*L2)-1)+ (VDD)/(VDD-VTO)\n",
+"VOL= Vout;// in V\n",
+"disp(VOL,'The value of VOL in volts is : ')\n",
+"Vth= (VDD+VTO-L1)/(VDD*VTO)*(1-W1*L2/(W2*L1))+(L1*L2/VDD)\n",
+"disp(Vth,'The value of Vth for circuit A in volts is : ')\n",
+"W4= 0.365;\n",
+"L4=0.25;\n",
+"W3= 0.75;\n",
+"L3=0.15;\n",
+"Vth=(L3*L4/VDD)+(VDD/(W3*L4*VDD))-(VDD)/(1-W4*L3/(W3*L4))-2*W4\n",
+"disp(Vth,'The value of Vth for circuit B in volts is : ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6: Value_of_Vx.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Exa 8.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"// Given data\n",
+"VTO= 0.43;// in V\n",
+"VDD= 2.5;// in V\n",
+"g=0.5; // value of gamma\n",
+"//VDD-Vx-VT= VDD-Vx-(VTO+g*(sqrt(0.6+Vx)-sqrt(0.6)))=0\n",
+"//Vx^2+Vx*(2*A-g^2)+(A-0.6*g^2)=0, where\n",
+"A=VTO-VDD-g*sqrt(0.6);// assumed\n",
+"B= (2*A-g^2);// assumed\n",
+"C=(A^2-0.6*g^2);//assumed\n",
+"Vx= [1 B C];\n",
+"Vx= roots(Vx);// in V\n",
+"Vx= Vx(2);// in V\n",
+"disp(Vx,'The value of Vx in volts is : ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}