summaryrefslogtreecommitdiff
path: root/929/CH12/EX12.5/Example12_5.sce
blob: 96b2d682717ccaf2083f8b1f12f0ac1a65793596 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//Example 12.5

clear;

clc;

Vclamp=5;

n=12;

f0step=1;

Vz5=3.6;

R1=20*10^3;

R2=R1;

R3=6.2*10^3;

f0FSR=(2^n)*f0step;

iO=100*10^(-6);

C=(iO*(R2/R1))/(4*Vclamp*f0FSR);

printf("Designed Digitally Programmable triangular or square wave oscillator");

printf("\nR1=%.f kohms",R1*10^(-3));

printf("\nR2=%.f kohms",R2*10^(-3));

printf("\nR3=%.1f kohms",R3*10^(-3));

printf("\nC=%.2f nF",C*10^9);

printf("\nUse 1.0 nF, which is more easily available, and raise R1 to 24.3 kohms,1 percent");