Académique Documents
Professionnel Documents
Culture Documents
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main ()
float w=0.125,l=0.375,vtp=-0.63025,vtn=0.622490,tox=225.00e-10,Eox=8.85e-14,Ein=4,un=650,up=240;
float vgs,vds,ids,b1,b2,k1,k2;
int choice;
b1=k1* (w/l);
b2=k2 * (w/l);
clrscr();
scanf("%f,%f",&vgs,&vds);
scanf("%d",&choice);
switch (choice)
case 0:
if(vgs<vtn)
{
ids=0;
ids=( b1/2)*((vgs-vtn)*(vgs-vtn));
break;
case 1:
if(vgs<vtp)
ids=0;
if( vds>(vgs-vtp))
printf(" the mosfet is in saturation and the value of ids is %f", ids);