for (i=0;i<12;i++);
}
*******************************************************************/
void savec (void)//保存检测计算的电容值,保存到12887中
{
{
do{ temp=REG_A;} //读积存器A
while(temp&0x80);//为1时间更新很快将要发生。既为1时一直读并判断
}
{
C_ROMLL=c.a.a4;//保存小数位,32位,现在只需要保存24位
C_ROML=c.a.a3;
C_ROMH=c.a.a2;
}
}
void savev (void)//保存检测计算的电电压值
{
{
do{ temp=REG_A;} //读积存器A
while(temp&0x80);//为1时间更新很快将要发生。既为1时一直读并判断
}
{
temp=printv%10;
printv1=temp;//0
temp=printv/1000;
printv4=temp;//3
printv=printv/10;
temp=printv%10;
printv2=temp;//1
printv=printv/10;
temp=printv%10;
printv3=temp;//2
}
}
void readc (void)//读保存检测计算的电容值为打印
{
{
do{ temp=REG_A;} //读积存器A
while(temp&0x80);//为1时间更新很快将要发生。既为1时一直读并判断
}
{
c.a.a4=C_ROMLL;//保存小数位
c.a.a3=C_ROML;
c.a.a2=C_ROMH;
c.a.a1=0;
}
}
void printcap (void)//打印检测计算的电容值
{
{
do{ temp=REG_A;} //读积存器A
while(temp&0x80);//为1时间更新很快将要发生。既为1时一直读并判断
}
{
prc=c.printc;
c1=prc%10;//最底位
prc=prc/10;
c2=prc%10;
prc=prc/10;
c3=prc%10;
prc=prc/10;
=prc%10;
prc=prc/10;
c5=prc%10;
prc=prc/10;
c6=prc%10;
/*最高位为0就不打印0***********/
c6=c6|0x30;
if (c6==0x30)
c6=0;
Print_Byte(c6);
c5=c5|0x30;
if (c5==0x30)
c5=0;
Print_Byte(c5);
Print_Byte(|0x30);
Print_Byte(c3|0x30);
Print_Byte(0x2E);//打印小数点
Print_Byte(c2|0x30);
Print_Byte(c1|0x30);
Print_String("微法");
}
}
void prv (void)//打印检测计算的电电压值
{
{
do{ temp=REG_A;} //读积存器A
while(temp&0x80);//为1时间更新很快将要发生。既为1时一直读并判断
}
{
temp=printv4;
Print_Byte(temp|0x30);
temp=printv3;
Print_Byte(temp|0x30);
temp=printv2;
Print_Byte(temp|0x30);
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-39167-39.html
该不会是冥钞吧
推翻我的推测