📄 lcm16864zk.lst
字号:
1027 2 WritCommand(0x95);
1028 2 Delay_ms(10);
1029 2 }
1030 1
1031 1 }
1032
1033 void AnlSet(void) //逻辑关系
1034 {
1035 1 bit i=1;
1036 1 WritCommand(0x01);
1037 1 ShowPart12(); //逻辑关系: A
1038 1 ShowPart4();
1039 1 while(1)
1040 1 {
1041 2 if(LKEY==0)
1042 2 {
1043 3 Delay_ms(10);
1044 3 if(LKEY==0)
1045 3 {
1046 4 pdx++;
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 18
1047 4 *pdx=i;
1048 4 while(1)
1049 4 {
1050 5 if(LKEY==1) break;
1051 5 }
1052 4 break;
1053 4 }
1054 3 }
1055 2
1056 2 if(RKEY==0)
1057 2 {
1058 3 Delay_ms(10); //延时去抖动
1059 3 if(RKEY==0)
1060 3 {
1061 4 WritCommand(0x95);
1062 4 i=~i;
1063 4 if(i==1)
1064 4 {
1065 5 WritCommand(0x95);
1066 5 WritData(0xa6);WritData(0xa1);
1067 5 WritCommand(0x10);
1068 5 }
1069 4 else
1070 4 {
1071 5 WritCommand(0x95);
1072 5 WritData(0xa6);WritData(0xa2);
1073 5 WritCommand(0x10);
1074 5 }
1075 4
1076 4 }
1077 3 }
1078 2 ShowTime();
1079 2 WritCommand(0x95);
1080 2 Delay_ms(10);
1081 2 }
1082 1 }
1083
1084 void AnlTime(void) //与等待时间
1085 {
1086 1 uchar j=0,k=0;
1087 1 uchar CodeN[3]={0,0,0};
1088 1 WritCommand(0x01);
1089 1 ShowPart13(); //与等时间:000S
1090 1 ShowPart1();
1091 1 WritCommand(0x94);
1092 1 while(k<3)
1093 1 {
1094 2 if(LKEY==0)
1095 2 {
1096 3 Delay_ms(10);
1097 3 if(LKEY==0)
1098 3 {
1099 4
1100 4 CodeN[k]=j;
1101 4 while(1)
1102 4 {
1103 5 if(LKEY==1) break;
1104 5 }
1105 4 break;
1106 4 }
1107 3 }
1108 2 if(MKEY==0)
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 19
1109 2 {
1110 3 Delay_ms(5);
1111 3 if(MKEY==0)
1112 3 {
1113 4 j++;
1114 4 if(j>9) j=0;
1115 4 WritData(0xa3);
1116 4 WritData(0xb0+j); //显示下个数
1117 4 WritCommand(0x10);
1118 4 while(1)
1119 4 {
1120 5 if(MKEY==1) break;
1121 5 }
1122 4 }
1123 3 }
1124 2 if(RKEY==0)
1125 2 {
1126 3 Delay_ms(10); //延时去抖动
1127 3 if(RKEY==0)
1128 3 {
1129 4 CodeN[k]=j;
1130 4 WritCommand(0x14);
1131 4 k++;
1132 4 if(k>=3)
1133 4 {k=0;WritCommand(0x94);}
1134 4 WritData(0xa3);
1135 4 WritData(0xb0);
1136 4 WritCommand(0x10);
1137 4 j=0;
1138 4 while(1)
1139 4 {
1140 5 if(RKEY==1) break;
1141 5 }
1142 4
1143 4 }
1144 3 }
1145 2 ShowTime();
1146 2 WritCommand(0x94+k);
1147 2 Delay_ms(10);
1148 2 }
1149 1 k=CodeN[0]*100+CodeN[1]*10+CodeN[2];
1150 1 pdx++;
1151 1 *pdx=k;
1152 1 }
1153
1154 void RobSet1(void) //填写 不填 继续
1155 {
1156 1 uchar i;
1157 1 WritCommand(0x0c);
1158 1 ShowPart14();
1159 1 while(1)
1160 1 {
1161 2 if(LKEY==0)
1162 2 {
1163 3 Delay_ms(10);
1164 3 if(LKEY==0)
1165 3 {
1166 4 while(1)
1167 4 {
1168 5 if(LKEY==1) break;
1169 5 }
1170 4 pdx=0x0100;
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 20
1171 4 i=*pdx;
1172 4 *pdx=i+1;
1173 4 break;
1174 4 }
1175 3 }
1176 2 if(MKEY==0)
1177 2 {
1178 3 Delay_ms(10);
1179 3 if(MKEY==0)
1180 3 {
1181 4
1182 4 RobSetNext();
1183 4
1184 4 while(1)
1185 4 {
1186 5 if(LKEY==1) break;
1187 5 }
1188 4 break;
1189 4 }
1190 3 }
1191 2 if(RKEY==0)
1192 2 {
1193 3 Delay_ms(10); //延时去抖动
1194 3 if(RKEY==0)
1195 3 {
1196 4 pdx=0x0100;
1197 4 i=*pdx;
1198 4 *pdx=i+1;
1199 4 RobSetNext();
1200 4 }
1201 3 }
1202 2 ShowTime();
1203 2
1204 2 Delay_ms(10);
1205 2 }
1206 1 }
1207
1208
1209 ////}////////////////////////////////////////////防盗设置
1210
1211 void StealSet(void)
1212 {
1213 1 uchar j;
1214 1 // uchar CodeN[2];
1215 1 WritCommand(0x01); //清零
1216 1 WritCommand(0x0c);
1217 1 WritCommand(0x92);
1218 1 WritData(0xb7);WritData(0xc0);WritData(0xb5);WritData(0xc1); //防盗设置
1219 1 WritData(0xc9);WritData(0xe8);WritData(0xd6);WritData(0xc3);
1220 1
1221 1 ShowPart5(); //进入 另选
1222 1 while(1)
1223 1 {
1224 2 if(RKEY==0)
1225 2 {
1226 3 while(1){if(RKEY==1) break; }
1227 3
1228 3 break;
1229 3 }
1230 2 if(LKEY==0)
1231 2 {
1232 3 while(1) {if(LKEY==1)break;}
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 21
1233 3 RobData=0x00;
1234 3 TeleAlarm();
1235 3 WhistleAlarm();
1236 3 AlarmRelay();
1237 3 BlankLocal();
1238 3 EjectFog();
1239 3 pdx=0x0201;
1240 3 *pdx=RobData;
1241 3 j=EjectorNum();
1242 3 StealSet1(j);
1243 3 break;
1244 3 }
1245 2 Delay_ms(10);
1246 2 ShowTime();
1247 2 }
1248 1 }
1249
1250 void StealSet1(uchar num)
1251 {
1252 1 uchar i,j;
1253 1 WritCommand(0x0c); //填写 不填 继续
1254 1 ShowPart14();
1255 1 while(1)
1256 1 {
1257 2 if(LKEY==0)
1258 2 {
1259 3 Delay_ms(10);
1260 3 if(LKEY==0)
1261 3 {
1262 4 pdx=0x0200;
1263 4 i=*pdx;
1264 4 *pdx=i+1;
1265 4 pdx=0x0202+i+1;
1266 4 *pdx=num;
1267 4
1268 4 while(1)
1269 4 {
1270 5 if(LKEY==1) break;
1271 5 }
1272 4 break;
1273 4 }
1274 3 }
1275 2 if(MKEY==0)
1276 2 {
1277 3 Delay_ms(10);
1278 3 if(MKEY==0)
1279 3 {
1280 4
1281 4 StealSet();
1282 4
1283 4 while(1)
1284 4 {
1285 5 if(LKEY==1) break;
1286 5 }
1287 4 break;
1288 4 }
1289 3 }
1290 2 if(RKEY==0)
1291 2 {
1292 3 Delay_ms(10); //延时去抖动
1293 3 if(RKEY==0)
1294 3 {
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 22
1295 4 pdx=0x0200;
1296 4 i=*pdx;
1297 4 *pdx=i+1;
1298 4 j=EjectorNum();
1299 4 pdx=0x0202+i;
1300 4 *pdx=j;
1301 4 }
1302 3 }
1303 2 ShowTime();
1304 2 Delay_ms(10);
1305 2 }
1306 1 }
1307
1308
1309 uchar EjectorNum(void)
1310 {
1311 1 uchar k=0,j=0;
1312 1 uchar CodeN[2]={0,0};;
1313 1 WritCommand(0x01);
1314 1 WritCommand(0x0e);
1315 1 ShowPart2(); //发射器编号:00
1316 1 ShowPart1();
1317 1 while(k<2)
1318 1 {
1319 2
1320 2 if(LKEY==0)
1321 2 {
1322 3 Delay_ms(10);
1323 3 if(LKEY==0)
1324 3 {
1325 4 CodeN[k]=j;
1326 4 while(1)
1327 4 {
1328 5 if(LKEY==1) break;
1329 5 }
1330 4 k++;
1331 4 }
1332 3 }
1333 2 if(MKEY==0)
1334 2 {
1335 3 Delay_ms(5);
1336 3 if(MKEY==0)
1337 3 {
1338 4 j++;
1339 4 if(j>9) j=0;
1340 4 WritData(0xa3);
1341 4 WritData(0xb0+j); //显示下个数
1342 4 WritCommand(0x10);
1343 4 while(1)
1344 4 {
1345 5 if(MKEY==1) break;
1346 5 }
1347 4 }
1348 3 }
1349 2 if(RKEY==0)
1350 2 {
1351 3 Delay_ms(10); //延时去抖动
1352 3 if(RKEY==0)
1353 3 {
1354 4 CodeN[k]=j;
1355 4 WritCommand(0x14);
1356 4 k++;
C51 COMPILER V7.06 LCM16864ZK 11/15/2006 18:43:11 PAGE 23
1357 4 if(k>=2)
1358 4 {k=0;WritCommand(0x96);}
1359 4 WritData(0xa3);
1360 4 WritData(0xb0);
1361 4 WritCommand(0x10);
1362 4 j=0;
1363 4 while(1)
1364 4 {
1365 5 if(RKEY==1) break;
1366 5 }
1367 4 }
1368 3 }
1369 2 ShowTime();
1370 2 WritCommand(0x96+k);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -