📄 gui.lst
字号:
485 1 if(time_count==100)
486 1 {
487 2 time_count=0;
488 2 timeout=1;
C51 COMPILER V8.08 GUI 07/15/2007 10:32:44 PAGE 9
489 2 }
490 1 else
491 1 time_count++;
492 1 }
493 void channel_display(void)
494 { uchar xdata ds18b20_data[4];
495 1 uchar data i;
496 1 uchar ds18b20_num1[8]={0xfd,0x00,0x00,0x00,0xb8,0xc5,0x45,0x28};
497 1 uchar ds18b20_num2[8]={0x8e,0x00,0x00,0x00,0xb8,0xc5,0x30,0x28};
498 1 uchar ds18b20_num3[8]={0xb9,0x00,0x00,0x00,0xb8,0xc5,0x31,0x28};
499 1 uchar ds18b20_num4[8]={0xe0,0x00,0x00,0x00,0xb8,0xc5,0x32,0x28};
500 1
501 1 uchar code *str1="ds18b20_1 :temperature is:";
502 1 uchar code *str2="ds18b20_2 :temperature is:";
503 1 uchar code *str3="ds18b20_3 :temperature is:";
504 1 uchar code *str4="ds18b20_4 :temperature is:";
505 1 if(timeout)
506 1 {
507 2 timeout=0;
508 2 if(ds18b20_1_dis)
509 2 {
510 3 ds18b20_init();
511 3 ds18b20_writecommand(0xcc);
512 3 ds18b20_writecommand(0x44);
513 3 //ds18b20_init();
514 3 //ds18b20_writecommand(0xcc);
515 3 //ds18b20_writecommand(0xbe);
516 3 delay(500);
517 3 match_rom(ds18b20_num1); //匹配第一路
518 3 ds18b20_writecommand(0xbe); //读
519 3 for(i=0;i<2;i++)
520 3 {
521 4 ds18b20_data[i]=ds18b20_readdata();
522 4 }
523 3 if(ds18b20_data[0]!=ds18b20_data[2]||ds18b20_data[1]!=ds18b20_data[3]) // 是或
524 3 {
525 4
526 4 ds18b20_data[2]=ds18b20_data[0];
527 4 ds18b20_data[3]=ds18b20_data[1];
528 4 temperature_process(ds18b20_data[2],ds18b20_data[3]);
529 4 string_display_code(0,str1,0x00,0x31);
530 4 text_display(' ');
531 4 text_display(' ');
532 4 text_display(' ');
533 4 text_display(' ');
534 4 text_display(' ');
535 4 if(!ds18b20_flag) //正
536 4 {
537 5 string_display(zhen_temp,0x1a,0x31);
538 5 if(dot_dis)
539 5 {
540 6 text_display('.'); // ,0x00,0x00
541 6 string_display(xiaoshu_temp,0x1e,0x31);
542 6 }
543 5
544 5 }
545 4 else //负
546 4 {
547 5 set_point(SET_ADDRESS_POINTER,0x19,0x31);
548 5 text_display('-');
549 5 string_display(zhen_temp,0x1a,0x31);
550 5 if(dot_dis)
C51 COMPILER V8.08 GUI 07/15/2007 10:32:44 PAGE 10
551 5 {
552 6 text_display('.'); // ,0x00,0x00
553 6 string_display(xiaoshu_temp,0x1e,0x31);
554 6 }
555 5
556 5 }
557 4 }
558 3 }
559 2 if(ds18b20_2_dis)
560 2 {
561 3 ds18b20_init();
562 3 ds18b20_writecommand(0xcc);
563 3 ds18b20_writecommand(0x44);
564 3 //ds18b20_init();
565 3 //ds18b20_writecommand(0xcc);
566 3 //ds18b20_writecommand(0xbe);
567 3 delay(500);
568 3 match_rom(ds18b20_num2); //匹配第二路
569 3 ds18b20_writecommand(0xbe); //读
570 3 for(i=0;i<2;i++)
571 3 {
572 4 ds18b20_data[i]=ds18b20_readdata();
573 4 }
574 3 if(ds18b20_data[0]!=ds18b20_data[2]||ds18b20_data[1]!=ds18b20_data[3]) // 是或
575 3 {
576 4 //clrtext();
577 4 ds18b20_data[2]=ds18b20_data[0];
578 4 ds18b20_data[3]=ds18b20_data[1];
579 4 temperature_process(ds18b20_data[2],ds18b20_data[3]);
580 4 string_display_code(0,str2,0x20,0x31);
581 4 text_display(' ');
582 4 text_display(' ');
583 4 text_display(' ');
584 4 text_display(' ');
585 4 text_display(' ');
586 4 if(!ds18b20_flag) //正
587 4 {
588 5 string_display(zhen_temp,0x3a,0x31);
589 5 if(dot_dis)
590 5 {
591 6 text_display('.'); // ,0x00,0x00
592 6 string_display(xiaoshu_temp,0x3e,0x31);
593 6 }
594 5
595 5 }
596 4 else //负
597 4 {
598 5 set_point(SET_ADDRESS_POINTER,0x39,0x31);
599 5 text_display('-');
600 5 string_display(zhen_temp,0x3a,0x31);
601 5 if(dot_dis)
602 5 {
603 6 text_display('.'); // ,0x00,0x00
604 6 string_display(xiaoshu_temp,0x3e,0x31);
605 6 }
606 5
607 5 }
608 4 }
609 3 }
610 2 if(ds18b20_3_dis)
611 2 {
612 3 ds18b20_init();
C51 COMPILER V8.08 GUI 07/15/2007 10:32:44 PAGE 11
613 3 ds18b20_writecommand(0xcc);
614 3 ds18b20_writecommand(0x44);
615 3 //ds18b20_init();
616 3 //ds18b20_writecommand(0xcc);
617 3 //ds18b20_writecommand(0xbe);
618 3 delay(500);
619 3 match_rom(ds18b20_num3); //匹配第三路
620 3 ds18b20_writecommand(0xbe); //读
621 3 for(i=0;i<2;i++)
622 3 {
623 4 ds18b20_data[i]=ds18b20_readdata();
624 4 }
625 3 if(ds18b20_data[0]!=ds18b20_data[2]||ds18b20_data[1]!=ds18b20_data[3]) // 是或
626 3 {
627 4 //clrtext();
628 4 ds18b20_data[2]=ds18b20_data[0];
629 4 ds18b20_data[3]=ds18b20_data[1];
630 4 temperature_process(ds18b20_data[2],ds18b20_data[3]);
631 4 string_display_code(0,str3,0x40,0x31);
632 4 text_display(' ');
633 4 text_display(' ');
634 4 text_display(' ');
635 4 text_display(' ');
636 4 text_display(' ');
637 4 if(!ds18b20_flag) //正
638 4 {
639 5 string_display(zhen_temp,0x5a,0x31);
640 5 if(dot_dis)
641 5 {
642 6 text_display('.'); // ,0x00,0x00
643 6 string_display(xiaoshu_temp,0x5e,0x31);
644 6 }
645 5
646 5 }
647 4 else //负
648 4 {
649 5 set_point(SET_ADDRESS_POINTER,0x59,0x31);
650 5 text_display('-');
651 5 string_display(zhen_temp,0x5a,0x31);
652 5 if(dot_dis)
653 5 {
654 6 text_display('.'); // ,0x00,0x00
655 6 string_display(xiaoshu_temp,0x5e,0x31);
656 6 }
657 5
658 5 }
659 4 }
660 3 }
661 2 if(ds18b20_4_dis)
662 2 {
663 3 ds18b20_init();
664 3 ds18b20_writecommand(0xcc);
665 3 ds18b20_writecommand(0x44);
666 3 //ds18b20_init();
667 3 //ds18b20_writecommand(0xcc);
668 3 //ds18b20_writecommand(0xbe);
669 3 delay(500);
670 3 match_rom(ds18b20_num4); //匹配第四路
671 3 ds18b20_writecommand(0xbe); //读
672 3 for(i=0;i<2;i++)
673 3 {
674 4 ds18b20_data[i]=ds18b20_readdata();
C51 COMPILER V8.08 GUI 07/15/2007 10:32:44 PAGE 12
675 4 }
676 3 if(ds18b20_data[0]!=ds18b20_data[2]||ds18b20_data[1]!=ds18b20_data[3]) // 是或
677 3 {
678 4 //clrtext();
679 4 ds18b20_data[2]=ds18b20_data[0];
680 4 ds18b20_data[3]=ds18b20_data[1];
681 4 temperature_process(ds18b20_data[2],ds18b20_data[3]);
682 4 string_display_code(0,str4,0x60,0x31);
683 4 text_display(' ');
684 4 text_display(' ');
685 4 text_display(' ');
686 4 text_display(' ');
687 4 text_display(' ');
688 4 if(!ds18b20_flag) //正
689 4 {
690 5 string_display(zhen_temp,0x7a,0x31);
691 5 if(dot_dis)
692 5 {
693 6 text_display('.'); // ,0x00,0x00
694 6 string_display(xiaoshu_temp,0x7e,0x31);
695 6 }
696 5
697 5 }
698 4 else //负
699 4 {
700 5 set_point(SET_ADDRESS_POINTER,0x79,0x31);
701 5 text_display('-');
702 5 string_display(zhen_temp,0x7a,0x31);
703 5 if(dot_dis)
704 5 {
705 6 text_display('.'); // ,0x00,0x00
706 6 string_display(xiaoshu_temp,0x7e,0x31);
707 6 }
708 5
709 5 }
710 4 }
711 3 }
712 2 }
713 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2797 ----
CONSTANT SIZE = 2589 ----
XDATA SIZE = 107 112
PDATA SIZE = ---- ----
DATA SIZE = 15 178
IDATA SIZE = ---- ----
BIT SIZE = 1 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -