Chapter 18: Programmable Analog Arrays

Example 18.1, Page Number: 588

In [1]:
import math
#Variable declaration
C=1000*10**-12;    #Switche capacitor value in farads
R=1000;            #resistance in ohms

#calculation
T=R*C;    #Time period
f=1/T;    #Frequency at which switch should operate
f=math.ceil(f)
#Result
print('Frequency at which each switch should operate(in hertz) is \n %d' %f)
print('Duty cycle should be 50%')
Frequency at which each switch should operate(in hertz) is 
 1000000
Duty cycle should be 50%