Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void main() ;
- {
- double B, Re, R1, R2, Vcc, Vb, Ve, Ie,Icq, Vceq, Rc, Isat;
- cout<<"B=" ;
- cin>>B;
- cout<<endl;
- cout<<"Re=" ;
- cin>>Re;
- cout<<endl;
- cout<<"R1=" ;
- cin>>R1;
- cout<<endl;
- cout<<"R2=" ;
- cin>>R2;
- cout<<endl;
- cout<<"Vcc=" ;
- cin>>Vcc;
- cout<<endl;
- if(B*Re>=10*R2)
- {Vb=Vcc*(R2/(R1+R2));
- cout<<"Vb="<<Vb<<endl;
- }
- else
- {double Rr=(B*Re*R2) /(B*Re+R2) ;
- Vb=Vcc*(Rr/(Rr+R1)) ;
- cout<<"Vb=" <<Vb<<endl;
- }
- Ve=Vb-0.7
- cout<<"Ve="<<Ve<<endl;
- Ie=Ve/Re;
- cout<<"Ie=" <<Ie<<endl;
- Icq=Ie;
- cout<<"Icq=" <<Icq<<endl;
- Vceq=Vcc-Icq*(Rc+Re) ;
- cout<<"Vceq=" <<Vceq<<endl;
- Isat=Vcc/(Rc+Re) ;
- cout<<"Isat=" <<Isat<<endl;
- if(Icq>Isat/2)
- {cout<<"Q_point is towards SAT" <<endl;
- if (Icq>(3/4) * Isat)
- cout<<"Q_point is closer to SAT" <<endl;
- else
- cout<<"Q_point is closer to MID" <<endl;
- }
- else if (Icq=Isat/2)
- cout<<"Q_point is MID" <<endl;
- else
- {cout<<"Q_point is towards Cutoff" <<endl;
- if (Icq>(1/4) * Isat)
- cout<<"Q_point is closer to MID" <<endl;
- else
- cout<<"Q_point is closer to cutoff" <<endl;
- }
- system ("pause") ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement