傻大方


首页 > 学习 >

多路温度采集系统|多路温度采集系统毕业实习( 二 )



按关键词阅读: 系统 实习 毕业 采集 温度 毕业实习


void get2_ds18b20(void);
void get3_ds18b20(void);
void get4_ds18b20(void);
void get5_ds18b20(void);
void get6_ds18b20(void);
void get7_ds18b20(void);
void get8_ds18b20(void);
void es_isr (void) ;
uchar i;
/ uchar *ds18b20_rom;


9、char *str1=1:;
char *str2=2:;
char *str3=3:;
char *str4=4:;
char *str5=5:;
char *str6=6:;
char *str7=7:;
char *str8=8:;
void delay(unsigned int time)unsigned int i,j;
for(i=0;
itime;
i+)for(j=0;
j200;
j+);
void main(void) SCON = 0x50;
/串口方式1,允许接收TMOD = 0x20;
/定时器1定时方式2PCON=0x00;
TH1 = 0xFD;
/11.0592MHz 4800波特率TL1。

10、= 0xFD;
ET1=0;
ES=1;
EA=1;
/4800*2=9600波特率TR1 = 1;
/* while(1)SBUF=1;
while(!TI);
TI=0;
delay(1000);
*/serial_set();
Lcd_Init();
ClrScreen();
/GotoXY(0,0);
/dot_dis=1;
/ds18b20_rom=read_rom();
/读序列号/for(i=0;
i8;
i+) /ds18b20_num2i=*ds18b20_rom;
/ds18b20_rom+;
/GotoXY(0,1);
/for(i=0;
i8;
i+) /显示序列号/print_char(ds18b20_ 。

11、num2i/16);
/print_char(ds18b20_num2i%16);
/while(1)get1_ds18b20();
get2_ds18b20();
get3_ds18b20();
get4_ds18b20();
delay(1000);
ClrScreen();
get5_ds18b20();
get6_ds18b20();
get7_ds18b20();
get8_ds18b20();
delay(1000);
ClrScreen();
void get1_ds18b20(void)ds18b20_init();
ds18b20_writecommand(0xcc);
ds18b20_writecomm 。

【多路温度采集系统|多路温度采集系统毕业实习】12、and(0x44);
/转换delay(500);
match_rom(ds18b20_num1);
/匹配第一路ds18b20_writecommand(0xbe);
/读for(i=0;
i2;
i+)tempi=ds18b20_readdata();
my_temp1= (temp1&0x7)*0x10+(temp0&0xf0)/0x10;
temperature_process(temp0,temp1);
Screen_home();
Print(str1);
if(!flag) /正Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
el 。

13、se /负Print(-);
Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
Print( );
void get2_ds18b20(void)ds18b20_init();
ds18b20_writecommand(0xcc);
ds18b20_writecommand(0x44);
/转换delay(500);
match_rom(ds18b20_num2);
/匹配第二路ds18b20_writecommand(0xbe);
/读for(i=0;
i2;
i+)tempi=ds18b20_readdata();
my_temp2= (te 。

14、mp1&0x7)*0x10+(temp0&0xf0)/0x10;
temperature_process(temp0,temp1);
GotoXY(9,0);
Print(str2);
if(!flag) /正Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
else /负Print(-);
Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
Print( );
void get3_ds18b20(void)ds18b20_init();
ds18b20_writecommand(0 。

15、xcc);
ds18b20_writecommand(0x44);
/转换delay(500);
match_rom(ds18b20_num3);
/匹配第三路ds18b20_writecommand(0xbe);
/读for(i=0;
i2;
i+)tempi=ds18b20_readdata();
my_temp3= (temp1&0x7)*0x10+(temp0&0xf0)/0x10;
temperature_process(temp0,temp1);
GotoXY(0,1);
Print(str3);
if(!flag) /正Print(zhen_temp);
if(dot_dis)Print(.);
Pr 。

16、int(xiaoshu_temp);
else /负Print(-);
Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
Print( );
void get4_ds18b20(void)ds18b20_init();
ds18b20_writecommand(0xcc);
ds18b20_writecommand(0x44);
/转换delay(500);
match_rom(ds18b20_num4);
/匹配第四路ds18b20_writecommand(0xbe);
/读for(i=0;
i2;
i+)tempi=ds18b20_read 。

17、data();
my_temp4= (temp1&0x7)*0x10+(temp0&0xf0)/0x10;
temperature_process(temp0,temp1);
GotoXY(9,1);
Print(str4);
if(!flag) /正Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
else /负Print(-);
Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
Print( );
void get5_ds18b20(void)ds18b20_init();
ds 。

18、18b20_writecommand(0xcc);
ds18b20_writecommand(0x44);
/转换delay(500);
match_rom(ds18b20_num5);
/匹配第五路ds18b20_writecommand(0xbe);
/读for(i=0;
i2;
i+)tempi=ds18b20_readdata();
my_temp5= (temp1&0x7)*0x10+(temp0&0xf0)/0x10;
temperature_process(temp0,temp1);
Screen_home();
Print(str5);
if(!flag) /正Print(zhen_temp);


19、if(dot_dis)Print(.);
Print(xiaoshu_temp);
else /负Print(-);
Print(zhen_temp);
if(dot_dis)Print(.);
Print(xiaoshu_temp);
Print( );
void get6_ds18b20(void)ds18b20_init();
ds18b20_writecommand(0xcc);
ds18b20_writecommand(0x44);
/转换delay(500);
match_rom(ds18b20_num6);
/匹配第六路ds18b20_writecommand(0xbe);
/读for(i=0;
i2 。

20、;
i+)tempi=ds18b20_readdata();


稿源:(未知)

【傻大方】网址:/a/2021/0822/0023896874.html

标题:多路温度采集系统|多路温度采集系统毕业实习( 二 )


上一篇:试验|试验七环境空气中烷烃的光催化氧化

下一篇:第4章|第4章 逐步聚合-1