您当前的位置:五五电子网电子知识电子知识资料工具实用电子秤5(第五部分:附录 源程序) 正文
实用电子秤5(第五部分:附录 源程序)

实用电子秤5(第五部分:附录 源程序)

点击数:7999 次   录入时间:03-04 12:00:56   整理:http://www.55dianzi.com   工具

EA=1;EX0=1;

ad_zhi=ad_zhi>>1;

xz=ad_zhi-50;

xz=xz/100;

ad_zhi=ad_zhi+xiuzheng[xz];

return(ad_zhi);

void d_change(long X)

{char qian,bai,shi,ge,shifen,baifen;

long int yu;

if(X>999999) error1();

qian=X/100000; yu=X%100000;

bai=yu/10000; yu=yu%10000;

shi=yu/1000; yu=yu%1000;

ge=yu/100; yu=yu%100;

shifen=yu/10;

baifen=yu%10;

qian=qian+0x30;

bai=bai+0x30;

shi=shi+0x30;

ge=ge+0x30;

shifen=shifen+0x30;

baifen=baifen+0x30;

if(qian==0x30)

{qian=0x20;

if(bai==0x30)

{bai=0x20;

if(shi==0x30) shi=0x20;

}

}

shuju[0]=qian;

shuju[1]=bai;

shuju[2]=shi;

shuju[3]=ge;

shuju[4]='.';

shuju[5]=shifen;

shuju[6]=baifen;

}

void baojing()

{short i;

for(i=0;i<50;i++)

{baoj=0;

for(dealy=0;dealy<10;dealy++);

baoj=1;

for(dealy=0;dealy<10;dealy++);

}

}

参考书目:

《电子电路设计与实践》 山东科学技术出版社 姚福安著

《新型集成电路》 西安电子科技大学出版社 杨振江著

《 8051 单片机实践与应用》 清华大学出版社 吴金戎著

《积分式 A/D 转换器其他专用集成电路分册》

科学技术文献出版社 梁廷贵著

Abstract

T he design is based on the mICrocontroller AT89S52 system, has reliably actualized the meterage of weigh from 10g to 10Kg , and has the part of sampling circuit composed of ICL7135 、 a differential measuring amplifier .Our system CAN accurately measure weigh, and calculate the price .The data collected are processed by the microcontroller and then displayed in the LCD. In addition, to make the display more visual and convenient, our system can eaSILy display the bill of every buyers.

Subject terms:

microcontroller, meterage, sampling circuit, differential measuring amplifier LCD, weight , bill



上一页  [1] [2] [3] 


本文关键字:源程序  电子秤  工具电子知识资料 - 工具