資源簡介
電子設計大賽論文精選。幾年的電子設計大賽獲獎優秀作品的論文選集
代碼片段和文件信息
extern? g_Speechary[];
extern? g_array[];
extern g_speechID;
unsigned?int? g_uiAx;
/*******************電阻計算******************************/
void?R_display(float?Rx)
{???
if(Rx<100)
{???
g_array[3]=5;
g_array[2]=5;
g_array[1]=5;?
g_array[0]=5;
/*******************************/
//電阻小于100歐姆
g_speechID=1;
g_Speechary[0]=20;
}
if((Rx>=100)&&(Rx<=999))
{
g_uiAx=(unsigned?int)Rx;
g_array[3]=g_uiAx/100;
g_array[2]=g_uiAx%100/10;
g_array[1]=(g_uiAx%100)%10;?
g_array[0]=0;
/********************************/
//幾百幾十歐姆
g_Speechary[0]=g_array[3];
g_Speechary[1]=12;
if(g_array[2]==0)//幾百歐姆
{ g_speechID=3;
g_Speechary[2]=16;
}
g_Speechary[2]=g_array[2];
g_Speechary[3]=11;
g_Speechary[4]=16;
g_speechID=5;
}
if((Rx>=1000)&&(Rx<=9999))
{
g_uiAx=(unsigned?int)Rx;
g_array[3]=g_uiAx/1000;
g_array[2]=(g_uiAx%1000)/100;
g_array[1]=((g_uiAx%1000)%100)/10;?
g_array[0]=1;
/********************************/
//幾點幾K歐姆
g_Speechary[0]=g_array[3];
g_Speechary[1]=10;
g_Speechary[2]=g_array[2];
g_Speechary[3]=13;
g_Speechary[4]=16;
g_speechID=5;
}
if((Rx>=10000)&&(Rx<=99999))
{???Rx/=100;
g_uiAx=(unsigned?int)Rx;
g_array[3]=g_uiAx/100;
g_array[2]=(g_uiAx%100)/10;
g_array[1]=(g_uiAx%100)%10;?
g_array[0]=2;
/********************************/
//幾十幾K歐姆
g_Speechary[0]=g_array[3];
g_Speechary[1]=11;
g_Speechary[2]=g_array[2];
g_Speechary[3]=13;
g_Speechary[4]=16;
g_speechID=5;
}
if((Rx>=100000)&&(Rx<=999999))
{???Rx/=1000;
g_uiAx=(unsigned?int)Rx;
g_array[3]=g_uiAx/100;
g_array[2]=(g_uiAx%100)/10;
g_array[1]=(g_uiAx%100)%10;?
g_array[0]=3;
/********************************/
//幾百幾十K歐姆
g_Speechary[0]=g_array[3];
g_Speechary[1]=12;
if(g_array[2]==0)//幾百K歐姆
{ g_Speechary[2]=13;
g_Speechary[3]=16;
g_speechID=4;
}
else
{
g_Speechary[2]=g_array[2];
g_Speechary[3]=11;
g_Speechary[4]=13;
g_Speechary[5]=16;
g_speechID=6;
}
}
if(Rx==1000000)
{
g_array[3]=1;
g_array[2]=0;
g_array[1]=0;?
g_array[0]=4;
/********************************/
//1M歐姆
g_Speechary[0]=1;
g_Speechary[1]=15;
g_Speechary[2]=16;
g_speechID=3;
}
if(Rx>1000000)
{
g_array[3]=0;
g_array[2]=0;
g_array[1]=0;?
g_array[0]=0;
/*******************************/
//電阻大于1M歐姆
g_speechID=1;
g_Speechary[0]=21;
}
}
//*****************電容計算***************************************//
void?C_display(float?Cx)
{??
if(Cx<100)
{
g_array[3]=5;
g_array[2]=5;
g_array[1]=5;?
g_array[0]=5;
//////////////////////////////////////////電容小于100PF
g_speechID=1;
g_Speechary[0]=22;
}
if((Cx>=100)&&(Cx<=999))
{
g_uiAx=(unsigned?int)Cx;
g_array[3]=g_uiAx/100;
g_array[2]=g_uiAx%100/10;
g_array[1]=(g_uiAx%100)%10;?
g_array[0]=0;
/********************************/
//幾百幾十PF
g_Speechary[
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????229376??2006-05-15?15:06??數控直流恒流源.DDB
-----------?---------??----------?-----??----
???????????????229376????????????????????1
- 上一篇:夜間燈光數據
- 下一篇:831數據結構真題(廣工).zip
評論
共有 條評論