基于AT89C51单片机的测温系统 - 百度文库

ʱ : 基于AT89C51单片机的测温系统 - 百度文库ϿʼĶ

.

if(!display[5]) {

display[5]=0x0a; flag2=0; }

}//λΪ0ʱʾ } // //

/******************************/ main()

{ double templ ; ser_init();

Disdata=0xff; //ʼ˿ discan=0xff;

for(h=0;h<4;h++){display[h]=0;}//ʾ8888 ow_reset(); // תһ write_byte(0xCC); // Skip ROM write_byte(0x4e); write_byte(0x02); write_byte(0x01); write_byte(0x7f);

write_byte(0x44); // ת for(h=0;h<10;h++)

{scan();} //ʾ\ while(1) {

read_temp(); //18B20¶ work_temp(); //¶

templ = (temp_data[1]*256+temp_data[0])*0.0625; fengming(templ);

scan(); //ʾ¶ֵ2 } }

..

ϵͬͷxxxxx#qq.com(#滻Ϊ@)