📄 demo.lst
字号:
934 4 LCD_GotoXY(0,0);
935 4 LCD_CmdWrite(0xb0);
936 4 for(k=0;k<9600;k++)
937 4 LCD_DataWrite(gImage_1[k]);
938 4 #endif
939 4 break;
940 4
941 4 case 0x12:
942 4 LCD_CmdWrite(ADSR);
943 4 temp = LCD_DataRead();
944 4 temp &= 0xfe;
945 4 LCD_CmdWrite(ADSR);
946 4 LCD_DataWrite(temp);
947 4 break;
948 4
949 4 case 0x22:
950 4 LCD_CmdWrite(ADSR);
951 4 temp = LCD_DataRead();
952 4 temp ^= cSetb7;
953 4 LCD_CmdWrite(ADSR);
954 4 LCD_DataWrite(temp);
955 4 break;
956 4
957 4 case 0x03:
958 4 LCD_CmdWrite(BTMR);
959 4 temp = LCD_DataRead();
960 4 if(temp > 4)
961 4 temp = temp - 5;
962 4 else
963 4 temp = 0;
964 4
965 4 LCD_CmdWrite(BTMR);
966 4 LCD_DataWrite(temp);
967 4 break;
968 4
969 4 case 0x13:
970 4 LCD_CmdWrite(BTMR);
971 4 temp = LCD_DataRead();
972 4 if(temp < 251)
973 4 temp = temp + 5;
974 4 else
975 4 temp = 255;
976 4
977 4 LCD_CmdWrite(BTMR);
978 4 LCD_DataWrite(temp);
979 4 break;
980 4
981 4 case 0x80:
982 4 Scroll_Disable();
983 4 LCD_CmdWrite(BTMR);
984 4 LCD_DataWrite(0x80);
985 4 Main_Function();
C51 COMPILER V7.50 DEMO 03/13/2008 14:26:40 PAGE 17
986 4 break;
987 4 }
988 3 Clr_KeyScan_INT_Flag();
989 3 }
990 2 #ifdef Auto_Run
991 2 Delay1ms(1);
992 2 Count++;
993 2 if(Count == 25000)
994 2 {
995 3 Count = 0;
996 3 AutoRun_Function();
997 3 }
998 2 #endif
999 2 }
1000 1 }
1001
1002 void Disp_Pic_Function(void)
1003 {
1004 1 uchar temp;
1005 1 int i, Count = 0;
1006 1
1007 1 LCD_Clear();
1008 1
1009 1 Access_Page1();
1010 1 Only_Show_Page1();
1011 1 LCD_Graphic();
1012 1
1013 1 #ifdef Show_Picture
1014 1
1015 1 LCD_GotoXY(0,0);
1016 1 LCD_CmdWrite(0xb0);
1017 1 for(i=0;i<9600;i++)
1018 1 LCD_DataWrite(gImage_1[i]);
1019 1 #endif
1020 1
1021 1 while(1)
1022 1 {
1023 2 if(Get_Key())
1024 2 {
1025 3 Clr_KeyScan_INT_Flag();
1026 3 Count = 0;
1027 3 LCD_CmdWrite(KSDR0);
1028 3 Key_Code1 = LCD_DataRead();
1029 3 Delay2us(50);
1030 3
1031 3 switch(Key_Code1)
1032 3 {
1033 4 case 0x01:
1034 4 #ifdef Show_Picture
1035 4 LCD_Clear();
1036 4 LCD_Graphic();
1037 4 Gray_Mode();
1038 4
1039 4 LCD_CmdWrite(ITCR);
1040 4 LCD_DataWrite(0x9f);
1041 4
1042 4 LCD_GotoXY(0,0);
1043 4 LCD_CmdWrite(0xB0);
1044 4 for(i=0;i<19200;i++)
1045 4 {
1046 5 LCD_DataWrite(~gImage_Control16[i]);
1047 5 }
C51 COMPILER V7.50 DEMO 03/13/2008 14:26:40 PAGE 18
1048 4 #endif
1049 4 break;
1050 4
1051 4 case 0x11:
1052 4 #ifdef Show_Picture
1053 4 LCD_Clear();
1054 4 Access_Page1();
1055 4 Only_Show_Page1();
1056 4 LCD_Graphic();
1057 4
1058 4 LCD_CmdWrite(ITCR);
1059 4 LCD_DataWrite(0xff);
1060 4
1061 4 LCD_GotoXY(0,0);
1062 4 LCD_CmdWrite(0xb0);
1063 4 for(i=0;i<9600;i++)
1064 4 LCD_DataWrite(gImage_1[i]);
1065 4 #endif
1066 4 break;
1067 4
1068 4 case 0x21:
1069 4 LCD_CmdWrite(WLCR);
1070 4 temp = LCD_DataRead();
1071 4 temp ^= cSetb0;
1072 4 LCD_CmdWrite(WLCR);
1073 4 LCD_DataWrite(temp);
1074 4 break;
1075 4
1076 4 case 0x31:
1077 4 LCD_CmdWrite(WLCR);
1078 4 temp = LCD_DataRead();
1079 4 temp ^= cSetb1;
1080 4 LCD_CmdWrite(WLCR);
1081 4 LCD_DataWrite(temp);
1082 4 break;
1083 4
1084 4 case 0x03:
1085 4 LCD_CmdWrite(BTMR);
1086 4 temp = LCD_DataRead();
1087 4 if(temp > 4)
1088 4 temp = temp - 5;
1089 4 else
1090 4 temp = 0;
1091 4
1092 4 LCD_CmdWrite(BTMR);
1093 4 LCD_DataWrite(temp);
1094 4 break;
1095 4
1096 4 case 0x13:
1097 4 LCD_CmdWrite(BTMR);
1098 4 temp = LCD_DataRead();
1099 4 if(temp < 251)
1100 4 temp = temp + 5;
1101 4 else
1102 4 temp = 255;
1103 4
1104 4 LCD_CmdWrite(BTMR);
1105 4 LCD_DataWrite(temp);
1106 4 break;
1107 4
1108 4 case 0x80:
1109 4 LCD_CmdWrite(BTMR);
C51 COMPILER V7.50 DEMO 03/13/2008 14:26:40 PAGE 19
1110 4 LCD_DataWrite(0x20);
1111 4 LCD_CmdWrite(ITCR);
1112 4 LCD_DataWrite(0xff);
1113 4
1114 4 LCD_NoGInv();
1115 4 LCD_NoBlk();
1116 4 Access_Page1();
1117 4 Only_Show_Page1();
1118 4 Main_Function();
1119 4 break;
1120 4 }
1121 3
1122 3 }
1123 2 #ifdef Auto_Run
1124 2 Delay1ms(1);
1125 2 Count++;
1126 2 if(Count == 25000)
1127 2 {
1128 3 Count = 0;
1129 3 AutoRun_Function();
1130 3 }
1131 2 #endif
1132 2 }
1133 1 }
1134
1135 void Sleep_Function(void)
1136 {
1137 1 uchar i;
1138 1 uchar Sleep_Flag = 0;
1139 1 int Count = 0;
1140 1 Enable_KeyScan_WakeUp();
1141 1 LCD_Clear();
1142 1
1143 1 LCD_Text();
1144 1 LCD_GotoXY(0,0);
1145 1 LCD_CmdWrite(0xb0);
1146 1 for(i=0;i<159;i++)
1147 1 {
1148 2 LCD_DataWrite(sRAiO1[i]);
1149 2 Delay2us(50);
1150 2 }
1151 1
1152 1 while(1)
1153 1 {
1154 2 if(Get_Key())
1155 2 {
1156 3 Clr_KeyScan_INT_Flag();
1157 3 Count = 0;
1158 3 LCD_CmdWrite(KSDR0);
1159 3 Key_Code1 = LCD_DataRead();
1160 3 Delay2us(50);
1161 3
1162 3 if(Sleep_Flag == 1)
1163 3 {
1164 4 Key_Code1 = 0xFF;
1165 4 Sleep_Flag = 0;
1166 4 Delay100ms(1);
1167 4 }
1168 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -