from __future__ import division
th=4 #ms
VCC=10 #V
C=0.05 #micro F(choosen between 0.01<=C<=1)
R=th*10**-3/(1.1*C*10**-6)/1000 #kohm
C1=0.01 #micro F(assumed)
C2=0.01 #micro F(choosen between 0.01<=C<=1)
R2=th*10**-3/(10*C2*10**-6)/1000 #kohm
C3=10 #micro F
print "Design values are : "
print "Capacitance C = %0.2f micro F " %C
print "Resistance R = %0.1f kohm " %R
print "Capacitance C1 = %0.2f micro F " %C1
print "Capacitance C2 = %0.2f micro F " %C2
print "Resistance R2 = %0.2f kohm " %R2
print "Capacitance C3 = %0.2f micro F " %C3
#Answer of R2 is wrong in the book.
from __future__ import division
ft=2 #kHz
C=0.01 #micro F
T=1/ft #ms
n=3 #for divide-by-3 circuit
th=(0.2+(n-1))*T #ms
R=th/(1.1*C) #kohm
print "Value of Resistance R = %0.2f kohm " %R
from __future__ import division
fo=2 #kHz
D=70 #%(duty cycle)
T=1/fo #ms
VCC=12 #V
tC=D*T/100 #ms
tD=T-tC #ms
C=0.05 #micro F(choosen between 0.01<=C<=1)
RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm
RA=tC*10**-3/(0.69*C*10**-6)/1000-RB #kohm
print "Design values are : "
print "Capacitance C = %0.2f micro F " %C
print "Resistance RA = %0.1f kohm " %RA
print "Resistance RB = %0.1f kohm " %RB
#Answer is not accurate in the textbook.
from __future__ import division
fo=2 #kHz
D=50 #%(duty cycle)
T=1/fo #ms
VCC=10 #V
tC=D*T/100 #ms
tD=T-tC #ms
C=0.1 #micro F(choosen between 0.01<=C<=1)
RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm
RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm
print "Design values are : "
print "Capacitance C= %0.2f micro F " %C
print "Resistance RA = %0.1f kohm " % RA
print "Resistance RB = %0.1f kohm " %RB
# RA & RB should be equal for 50% duty cycle.
from __future__ import division
fo=2 #kHz
D=40 #%(duty cycle)
T=1/fo #ms
VCC=10 #V
tC=D*T/100 #ms
tD=T-tC #ms
C=0.22 #micro F(choosen between 0.01<=C<=1)
RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm
RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm
print "Design values are : "
print "Capacitance C = %0.2f micro F " %C
print "Resistance RA = %0.1f kohm " %RA
print "Resistance RB = %0.f kohm " %round(RB)
from __future__ import division
fo=700 #Hz
D=50 #%(duty cycle)
T=1/fo*1000 #ms
VCC=10 #V
tC=D*T/100 #ms
tD=T-tC #ms
C=0.05 #micro F(choosen between 0.01<=C<=1)
RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm
RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm
print "Design values are : "
print "Capacitance C = %0.2f micro F " %C
print "Resistance RA = %0.2f kohm " %round(RA)
print "Resistance RB = %0.2f kohm " %round(RB)
from __future__ import division
fo=800 #Hz
D=60 #%(duty cycle)
T=1/fo*1000 #ms
VCC=10 #V
tC=D*T/100 #ms
tD=T-tC #ms
C=0.047 #micro F(choosen between 0.01<=C<=1)
RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm
RA=tC*10**-3*1.45/(C*10**-6)/1000-RB #kohm
print "Design values are : "
print "Capacitance C = %0.3f micro F " %C
print "Resistance RA = %0.2f kohm " %round(RA)
print "Resistance RB = %0.2f kohm " %round(RB)