📄 csy.lst
字号:
510 2 cha[3]=inttochar(da2);
511 2 cha[4]='.';
512 2 cha[5]=inttochar(w1);
513 2 cha[6]='\0';
514 2 printf("%s\n",cha);
515 2 //fa2=atof(cha);
516 2
517 2 for(j=1;j<=5;j++)
518 2 {
519 3 for(i=1;i<=200;i++)
520 3 Delay_Count(255);
521 3 }
522 2
523 2
524 2 // s=1;
525 2 // WRCommand(0x01); //清除显示DDRAM
526 2 ShowQQChar(0x9B,cha,3);
527 2 ShowQQChar(0x9E,chinese11,lengthCF11);
528 2 if (enter==0)
529 2 break;
530 2 }
531 1 }
*** WARNING C280 IN LINE 477 OF CSY.C: 'fa1': unreferenced local variable
*** WARNING C280 IN LINE 477 OF CSY.C: 'fa2': unreferenced local variable
*** WARNING C280 IN LINE 477 OF CSY.C: 'fa3': unreferenced local variable
532 //温度显示结束
533
534 void firstscreen(void)
535
536 {
537 1 //一屏
538 1 s=1;
539 1 WRCommand(0x01); //清除显示DDRAM
540 1 ShowQQChar(0x80,chinese1,lengthCF1);
541 1 ShowQQChar(0x90,chinese2,lengthCF2);
542 1 ShowQQChar(0x88,chinese3,lengthCF3);
543 1 ShowQQChar(0x98,chinese4,lengthCF4);
544 1 temp();
545 1 WaitNms(250); //等待时间
546 1 WaitNms(250);
547 1 //等待时间
548 1
C51 COMPILER V7.06 CSY 11/07/2007 17:19:43 PAGE 10
549 1 }
550
551 void pHsecondscreen(void)
552 {
553 1 //二屏
554 1 s=2;
555 1 LCDInit();
556 1 RDBF();
557 1 WRCommand(0x01); //清除显示DDRAM
558 1 ShowQQChar(0x80,chinese5,lengthCF5);
559 1 ShowQQChar(0x87,chinese1,lengthCF1);
560 1 ShowQQChar(0x90,chinese6,lengthCF6);
561 1 ShowQQChar(0x88,chinese7,lengthCF7);
562 1 ShowQQChar(0x98,chinese8,lengthCF8);
563 1 WaitNms(250); //等待时间
564 1 WaitNms(250); //等待时间
565 1
566 1 }
567
568 void DOsecondscreen(void)
569 {
570 1 //二屏
571 1 s=3;
572 1 LCDInit();
573 1 RDBF();
574 1 WRCommand(0x01); //清除显示DDRAM
575 1 //ShowQQChar(0x80,chinese5,lengthCF5);
576 1 ShowQQChar(0x87,chinese2,lengthCF2);
577 1 ShowQQChar(0x90,chinese5,lengthCF5);
578 1 ShowQQChar(0x88,chinese9,lengthCF9);
579 1 ShowQQChar(0x98,chinese8,lengthCF8);
580 1 WaitNms(250); //等待时间
581 1 WaitNms(250); //等待时间
582 1
583 1 }
584
585 void Fsecondscreen(void)
586 {
587 1 //二屏
588 1 s=4;
589 1 LCDInit();
590 1 RDBF();
591 1 WRCommand(0x01); //清除显示DDRAM
592 1 //ShowQQChar(0x80,chinese5,lengthCF5);
593 1 ShowQQChar(0x87,chinese3,lengthCF3);
594 1 ShowQQChar(0x90,chinese5,lengthCF5);
595 1 ShowQQChar(0x88,chinese9,lengthCF9);
596 1 ShowQQChar(0x98,chinese8,lengthCF8);
597 1 WaitNms(250); //等待时间
598 1 WaitNms(250); //等待时间
599 1
600 1 }
601
602 void Tsecondscreen(void)
603 {
604 1 //二屏
605 1 s=5;
606 1 LCDInit();
607 1 RDBF();
608 1 WRCommand(0x01); //清除显示DDRAM
609 1 //ShowQQChar(0x80,chinese5,lengthCF5);
610 1 ShowQQChar(0x87,chinese4,lengthCF4);
C51 COMPILER V7.06 CSY 11/07/2007 17:19:43 PAGE 11
611 1 ShowQQChar(0x88,chinese10,lengthCF10);
612 1 temp();
613 1 //ShowQQChar(0x88,chinese9,lengthCF9);
614 1 ShowQQChar(0x98,chinese8,lengthCF8);
615 1 WaitNms(250); //等待时间
616 1 WaitNms(250); //等待时间
617 1
618 1 }
619
620
621 //主函数
622 void main(void)
623 {
624 1 unsigned char cha[4];
625 1 //ph=12.45;
626 1 //sprintf(sph,"%5.2f",ph);
627 1 autobaud();
628 1 //printf("OK");
629 1 //printf("%s",sph);
630 1 LCDInit();
631 1 RDBF();
632 1 // printf("已调用完判忙函数\r\n");
633 1
634 1
635 1 WRCommand(0x01); //清除显示DDRAM
636 1 // ShowQQChar(0x80,sph,3);
637 1 printf("已调用完判忙函数\r\n");
638 1
639 1 firstscreen();
640 1
641 1
642 1 b=4;
643 1 while(1)
644 1 {
645 2 if(up==0 && b==4)
646 2 { WaitNms(250);
647 3 WaitNms(250);
648 3 WaitNms(250);
649 3
650 3 WRCommand(0x88);
651 3 b=3;
652 3 }
653 2 if(down==0&& b==4)
654 2 {WaitNms(250);
655 3 WaitNms(250);
656 3 WaitNms(250);
657 3
658 3 WRCommand(0x80);
659 3 b=1;
660 3 }
661 2
662 2 if(up==0 && b==3)
663 2 {WaitNms(250);
664 3 WaitNms(250);
665 3 WaitNms(250);
666 3
667 3 WRCommand(0x90);
668 3 b=2;
669 3 }
670 2 if(down==0 && b==3)
671 2 {WaitNms(250);
672 3 WaitNms(250);
C51 COMPILER V7.06 CSY 11/07/2007 17:19:43 PAGE 12
673 3 WaitNms(250);
674 3
675 3 WRCommand(0x98);
676 3 b=4;
677 3 }
678 2 if(up==0 && b==2)
679 2 {WaitNms(250);
680 3 WaitNms(250);
681 3 WaitNms(250);
682 3
683 3 WRCommand(0x80);
684 3
685 3 b=1;
686 3 }
687 2 if(down==0 && b==2)
688 2 {WaitNms(250);
689 3 WaitNms(250);
690 3 WaitNms(250);
691 3
692 3 WRCommand(0x88);
693 3 b=3;
694 3 }
695 2 if(up==0 && b==1)
696 2 {WaitNms(250);
697 3 WaitNms(250);
698 3 WaitNms(250);
699 3
700 3 WRCommand(0x98);
701 3
702 3 b=4;
703 3 }
704 2 if(down==0 && b==1)
705 2 { WaitNms(250);
706 3 WaitNms(250);
707 3 WaitNms(250);
708 3 WRCommand(0x90);
709 3 b=2;
710 3 }
711 2
712 2 if(enter==0 && b==1 && s==1)
713 2 { WaitNms(250);
714 3 pHsecondscreen();
715 3 b=4;}
716 2 if(enter==0 && b==2 && s==1)
717 2 { WaitNms(250);
718 3 DOsecondscreen();
719 3 b=4;}
720 2
721 2 if(enter==0 && b==3 && s==1)
722 2 { WaitNms(250);
723 3 Fsecondscreen();
724 3 b=4;}
725 2
726 2
727 2 if(enter==0 && b==4 && s<6 && s>1)
728 2 { WaitNms(250);
729 3 firstscreen();
730 3 b=4;}
731 2 // if(enter==0 && b==2 && s==5)//开始温度测量
732 2 // { WaitNms(250);
733 2 // LCDInit();
734 2 // }
C51 COMPILER V7.06 CSY 11/07/2007 17:19:43 PAGE 13
735 2 }
736 1
737 1 }
*** WARNING C280 IN LINE 624 OF CSY.C: 'cha': unreferenced local variable
738
739
740
741
742 //P1=0;
743 /* if(start==0)
744 {
745 loop2: secondscreen();
746 if(run==0)
747 {
748 loop3: thirdscreen();
749 if(display==0)
750 {
751 loop4: fourthscreen();
752 WaitNms(250); //等待时间
753 WaitNms(250); //等待时间
754 WaitNms(250); //等待时间
755 WaitNms(250); //等待时间
756 WaitNms(250); //等待时间
757
758 fifthscreen();
759 WaitNms(250); //等待时间
760 WaitNms(250); //等待时间
761 WaitNms(250); //等待时间
762 WaitNms(250); //等待时间
763 WaitNms(250); //等待时间
764 if(close==0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -