📄 lcm16864zk.lst
字号:
681 5 }
682 4 }
683 3 }
684 2 WritCommand(0x95);
685 2 }
686 1 }
687
688 void WhistleAlarm(void)
689 {
690 1 bit i=1;
691 1 WritCommand(0x01);
692 1 ShowPart6(); ////鸣警笛 :Y
693 1 ShowPart4();
694 1 while(1)
695 1 {
696 2 if(LKEY==0)
697 2 {
698 3 Delay_ms(10);
699 3 if(LKEY==0)
700 3 {
701 4 while(1)
702 4 {if(LKEY==1) break;}
703 4 if(i==1)
704 4 {
705 5 RobData=RobData|0x02;
706 5 }
707 4 else
708 4 {
709 5 RobData=RobData&0xfd;
710 5 }
711 4
712 4 }
713 3 break;
714 3 }
715 2 if(RKEY==0)
716 2 {
717 3 Delay_ms(10);
718 3 if(RKEY==0)
719 3 {
720 4 while(1)
721 4 {if(RKEY==1) break;}
722 4 WritCommand(0x95);
723 4 i=~i;
724 4 if(i==1)
725 4 {
726 5 WritCommand(0x95);
727 5 WritData(0xa3);WritData(0xd9);
728 5 WritCommand(0x10);
729 5 }
730 4 else
731 4 {
732 5 WritCommand(0x95);
733 5 WritData(0xa3);WritData(0xce);
734 5 WritCommand(0x10);
735 5 }
736 4 }
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 13
737 3 }
738 2 WritCommand(0x95);
739 2 }
740 1 }
741
742 void AlarmRelay(void)
743 {
744 1 bit i=1;
745 1 WritCommand(0x01);
746 1 ShowPart7(); //接力报警:Y
747 1 ShowPart4();
748 1 while(1)
749 1 {
750 2 if(LKEY==0)
751 2 {
752 3 Delay_ms(10);
753 3 if(LKEY==0)
754 3 {
755 4 while(1)
756 4 {if(LKEY==1) break;}
757 4 if(i==1)
758 4 {
759 5 RobData=RobData|0x04;
760 5 }
761 4 else
762 4 {
763 5 RobData=RobData&0xfb;
764 5 }
765 4
766 4 }
767 3 break;
768 3 }
769 2 if(RKEY==0)
770 2 {
771 3 Delay_ms(10);
772 3 if(RKEY==0)
773 3 {
774 4 while(1)
775 4 {if(RKEY==1) break;}
776 4 WritCommand(0x95);
777 4 i=~i;
778 4 if(i==1)
779 4 {
780 5 WritCommand(0x95);
781 5 WritData(0xa3);WritData(0xd9);
782 5 WritCommand(0x10);
783 5 }
784 4 else
785 4 {
786 5 WritCommand(0x95);
787 5 WritData(0xa3);WritData(0xce);
788 5 WritCommand(0x10);
789 5 }
790 4 }
791 3 }
792 2 WritCommand(0x95);
793 2 }
794 1
795 1 }
796
797
798 void BlankLocal(void)
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 14
799 {
800 1 bit i=1;
801 1 WritCommand(0x01);
802 1 ShowPart8(); //封锁现场:Y
803 1 ShowPart4();
804 1 while(1)
805 1 {
806 2 if(LKEY==0)
807 2 {
808 3 Delay_ms(10);
809 3 if(LKEY==0)
810 3 {
811 4 while(1)
812 4 {if(LKEY==1) break;}
813 4 if(i==1)
814 4 {
815 5 RobData=RobData|0x08;
816 5 }
817 4 else
818 4 {
819 5 RobData=RobData&0xf7;
820 5 }
821 4
822 4 }
823 3 break;
824 3 }
825 2 if(RKEY==0)
826 2 {
827 3 Delay_ms(10);
828 3 if(RKEY==0)
829 3 {
830 4 while(1)
831 4 {if(RKEY==1) break;}
832 4 WritCommand(0x95);
833 4 i=~i;
834 4 if(i==1)
835 4 {
836 5 WritCommand(0x95);
837 5 WritData(0xa3);WritData(0xd9);
838 5 WritCommand(0x10);
839 5 }
840 4 else
841 4 {
842 5 WritCommand(0x95);
843 5 WritData(0xa3);WritData(0xce);
844 5 WritCommand(0x10);
845 5 }
846 4 }
847 3 WritCommand(0x95);
848 3 }
849 2 }
850 1
851 1 }
852 void EjectFog(void)
853 {
854 1 bit i=1;
855 1 WritCommand(0x01);
856 1 ShowPart9(); //喷射眠雾:Y
857 1 ShowPart4();
858 1 while(1)
859 1 {
860 2 if(LKEY==0)
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 15
861 2 {
862 3 Delay_ms(10);
863 3 if(LKEY==0)
864 3 {
865 4 while(1)
866 4 {if(LKEY==1) break;}
867 4 if(i==1)
868 4 {
869 5 RobData=RobData|0x10;
870 5 }
871 4 else
872 4 {
873 5 RobData=RobData&0xef;
874 5 }
875 4
876 4 }
877 3 break;
878 3 }
879 2 if(RKEY==0)
880 2 {
881 3 Delay_ms(10);
882 3 if(RKEY==0)
883 3 {
884 4 while(1)
885 4 {if(RKEY==1) break;}
886 4 WritCommand(0x95);
887 4 i=~i;
888 4 if(i==1)
889 4 {
890 5 WritCommand(0x95);
891 5 WritData(0xa3);WritData(0xd9);
892 5 WritCommand(0x10);
893 5 }
894 4 else
895 4 {
896 5 WritCommand(0x95);
897 5 WritData(0xa3);WritData(0xce);
898 5 WritCommand(0x10);
899 5 }
900 4 }
901 3 }
902 2 WritCommand(0x95);
903 2 }
904 1
905 1 }
906
907
908 void EmployeeNum(void)
909 {
910 1 uchar k=0,j;
911 1 uchar CodeN[4]={0,0,0,0};
912 1 WritCommand(0x01);
913 1 ShowPart10(); //员工编号 0
914 1 ShowPart1();
915 1 while(k<4)
916 1 {
917 2 if(LKEY==0)
918 2 {
919 3 Delay_ms(10);
920 3 if(LKEY==0)
921 3 {
922 4 CodeN[k]=j;
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 16
923 4 while(1)
924 4 {
925 5 if(LKEY==1) break;
926 5 }
927 4 break;
928 4 }
929 3 }
930 2 if(MKEY==0)
931 2 {
932 3 Delay_ms(5);
933 3 if(MKEY==0)
934 3 {
935 4 j++;
936 4 if(j>9) j=0;
937 4 WritData(0xa3);
938 4 WritData(0xb0+j); //显示下个数
939 4 WritCommand(0x10);
940 4 while(1)
941 4 {
942 5 if(MKEY==1) break;
943 5 }
944 4 }
945 3 }
946 2 if(RKEY==0)
947 2 {
948 3 Delay_ms(10); //延时去抖动
949 3 if(RKEY==0)
950 3 {
951 4 CodeN[k]=j;
952 4 WritCommand(0x14);
953 4 k++;
954 4 if(k>=4)
955 4 {k=0;WritCommand(0x94);}
956 4 WritData(0xa3);
957 4 WritData(0xb0);
958 4 WritCommand(0x10);
959 4 j=0;
960 4 while(1)
961 4 {
962 5 if(RKEY==1) break;
963 5 }
964 4 }
965 3 }
966 2 ShowTime();
967 2 WritCommand(0x94+k);
968 2 Delay_ms(10);
969 2 }
970 1 k=(CodeN[0]<<4)+CodeN[1];
971 1 pdx++;
972 1 *pdx=k;
973 1 pdx++;
974 1 k=(CodeN[2]<<4)+CodeN[3];
975 1 *pdx=k;
976 1 }
977 void AnlNum(void) //最少与数
978 {
979 1 uchar k=0,j;
980 1 WritCommand(0x01);
981 1 ShowPart11(); //最少与数 0
982 1 ShowPart1();
983 1 while(k<2)
984 1 {
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 17
985 2 if(LKEY==0)
986 2 {
987 3 Delay_ms(10);
988 3 if(LKEY==0)
989 3 {
990 4 pdx++;
991 4 *pdx=j;
992 4 while(1)
993 4 {
994 5 if(LKEY==1) break;
995 5 }
996 4 break;
997 4 }
998 3 }
999 2 if(MKEY==0)
1000 2 {
1001 3 Delay_ms(5);
1002 3 if(MKEY==0)
1003 3 {
1004 4 j++;
1005 4 if(j>9) j=0;
1006 4 WritData(0xa3);
1007 4 WritData(0xb0+j); //显示下个数
1008 4 WritCommand(0x10);
1009 4 while(1)
1010 4 {
1011 5 if(MKEY==1) break;
1012 5 }
1013 4 }
1014 3 }
1015 2 if(RKEY==0)
1016 2 {
1017 3 Delay_ms(10); //延时去抖动
1018 3 if(RKEY==0)
1019 3 {
1020 4 WritCommand(0x96);
1021 4 WritData(0xa3);
1022 4 WritData(0xb0);
1023 4 WritCommand(0x10);
1024 4 }
1025 3 }
1026 2 ShowTime();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -