In [5]:

```
#Given
#From fig 13.7 (a)
Ra=6.8 #kohm, resistance
Rb=3.3 #Kohm
C=0.1 #microF, capacitance
#Calculation
thigh=0.695*(Ra+Rb)*C
tlow=0.695*Rb*C
f=1.44/((Ra+2*Rb)*C)
#Result
print"The value of high time is",round(thigh,1),"ms"
print"The value of low time is",round(tlow,2),"ms"
print"The value of frequency is",round(f,2),"khz"
```

In [7]:

```
#Given
#From fig 13.7 (a)
Ra=6.8 #kohm, resistance
Rb=3.3 #Kohm
#Calculation
D=Rb/(Ra+2*Rb)
#Result
print"The Duty Cycle is",round(D,2)
```

In [2]:

```
#GIven
V=5 #V, Voltage
E1=0 #V
E2=1
Re=3 #Kohm, resistance (fig 13-10)
C=1 #microF
#Calculation
I=(V-E1)/(3.0) #Current
fc=3/(Re*C)
df=0.2*fc*E2
fout=fc+df
E3=-1 #V
df_=0.2*fc*E3
fout_=fc+df_
Elower=-4
Eupper=4
#Result
print"(a)The charge current is",round(I,2),"mA"
print"(b)The current frequency is",fc,"KHz"
print"(c)df=",df*1000,"Hz","\nand The frequency shift is",(df-df_)*1000,"Hz"
print"fout was initially",fout*1000,"Hz . then changes to",fout_*1000,"Hz"
print"(d)The positive nd negative limits are",Eupper,"V and",Elower,"V"
```

In [19]:

```
#GIven
Ra=9.1 #Kohm
thigh=1 #ms
#Calculation
C=thigh*10**-3/(1.1*Ra)
#Result
print"The value of C is",round(C*10**3,1),"microF"
```

In [22]:

```
#Given
Ra=10 #Kohm
C=0.2 #microF
Ci=0.001 #microF
#calculation
thigh=1.1*(Ra*10**3*C*10**-6)
t=Ra*10**3*Ci
#Result
print"(a)The value of high time is",thigh*1000,"ms"
print"(b)Time constant is",t/1000,"ms"
```

In [24]:

```
#Given
Ra=10 #Kohm
C=0.1 #microF
f=1 #kHz
#Calculation
thigh=1.1*(Ra*10**3*C*10**-6)
#thigh should exceed two periods and be less than 3 periods.
thigh_=2.2 #ms, chose a value
Ra=thigh_/(1.1*C*10**-6)
#Result
print"(a) The time interval is",thigh*1000,"ms"
print"Ra is",Ra/10**6,"Kohm"
```

In [26]:

```
#Given
R=100 #Kohm
C=0.01 #microF
p1=3 #pin
p2=4
p3=7
p4=8
#Calculation
T=R*10**3*C*10**-6
tlow1=4*T #Using Table 13-2, pin=3 , time= 4*T
tlow2=8*T
tlow3=64*T
tlow4=128*T
#Result
print"(a)The required time is",tlow1*1000,"ms"
print"(b)The required time is",tlow2*1000,"ms"
print"(c)The required time is",tlow3*1000,"ms"
print"(d)The required time is",tlow4*1000,"ms"
```

In [27]:

```
#Given
T=1 #s
#Calculation
#Pins 3,6,7 are jumpered
Tsum1=8*T+16*T
Tsum2=4*T+32*T+64*T
#Result
print"(a)The timing cycle is",Tsum1,"s"
print"(b)The timing cycle is",Tsum2,"s"
```

In [34]:

```
#Given
C=1 #microF
R=5 #Mohm
T=5 #s
#Calculation
Tsum1=4*T+8*T
t=1*T
Tsum2=T+2*T+4*T+8*T+16*T+32*T+64*T+128*T
#Result
print"(a)The timing cycle is",Tsum1/60,"min"
print"(b)Minimum programmeble timing cycle is",t,"s"
print"(c)maximum programmable timing cycle is",round(Tsum2,2),"s or 21 min 15 s"
```

In [36]:

```
#Given
T=2.5 #ms
#pin from fig 13-19
p1=1
p2=2
p3=3
p4=4
#Calculation
#Time base rating
t1=T
t2=2*T
t3=4*T
t4=8*T
#Period
P1=2*T
P2=4*T
P3=8*T
P4=16*T
#Frequency
f1=1/(P1)
f2=1/(P2)
f3=1/(P3)
f4=1/(P4)
#Result
print"The frequencies are",f1*1000,"Hz,",f2*1000,"Hz,",f3*1000,"Hz,",f4*1000,"Hz"
```

In [38]:

```
#Given
#From fig 13.11 (a)
T=1 #ms
#Calculation
Tsum=T+4*T
period=Tsum+T
f=1/(period*10**-3)
#Result
print"The frequency is",round(f,1),"Hz"
```