📄 eepromcopy.lst
字号:
353 2 TurnOnOff_Light(LIGHT_GREEN);
354 2 Disp_Led(Led_Table[CH_NULL]);
355 2 }
356 1 else
357 1 TurnOnOff_Light(LIGHT_RED);
358 1 wDelayTime=500;
359 1 while (wDelayTime);
360 1 Key_Func=KEY_NO_KEY;
361 1 while (1)
362 1 {
363 2 Chek_key();
364 2 if (Key_Func==KEY_NO_KEY)
365 2 break;
366 2 }
367 1 }
368 void main(void)
369 {
370 1 BYTE Loop_Counter,Loop_Counter1;
371 1 WORD wLoop_Counter;
372 1 InitMcu();
373 1 TurnOnOff_Light(LIGHT_OFF);
374 1 Disp_Led(Led_Table[CH_NULL]);
375 1 wDelayTime=1000;
376 1 while (wDelayTime);
377 1 SetEeprom();
378 1 Loop_Counter=0;
379 1 Loop_Counter1=11;
380 1 wLoop_Counter=0;
381 1 Operate_Flag=OPERATE_NO;
382 1 wDemoDelay=400;
383 1 Chip_Station=Chip_Station_copy=CHIP_STATION_NO;
384 1 Error_Flag=CHIP_STATION_NO;
385 1 while (1)
386 1 {
387 2 Chek_key();
388 2 if (Key_Func==KEY_START)
389 2 {
390 3 Operate_Eeprom();
391 3 Chek_Chip();
392 3 Chip_Station_copy=Chip_Station;
393 3 wLoop_Counter=CHIP_STATION_R;
394 3 }
395 2 switch (Operate_Flag)
396 2 {
397 3 case OPERATE_NO:
398 3 if (wDemoDelay%50==0)
399 3 {
400 4 Chek_Chip();
401 4 if (Chip_Station!=Chip_Station_copy)
402 4 {
403 5 if (Chip_Station_copy==CHIP_STATION_NO)
404 5 {
405 6 if (Chip_Station&CHIP_STATION_R)
406 6 wLoop_Counter=CHIP_STATION_R;
407 6 else if (Chip_Station&CHIP_STATION_D1)
408 6 wLoop_Counter=CHIP_STATION_D1;
409 6 else if (Chip_Station&CHIP_STATION_D2)
410 6 wLoop_Counter=CHIP_STATION_D2;
C51 COMPILER V7.50 EEPROMCOPY 08/12/2006 10:29:13 PAGE 8
411 6 else if (Chip_Station&CHIP_STATION_D3)
412 6 wLoop_Counter=CHIP_STATION_D3;
413 6 else if (Chip_Station&CHIP_STATION_D4)
414 6 wLoop_Counter=CHIP_STATION_D4;
415 6 else if (Chip_Station&CHIP_STATION_D5)
416 6 wLoop_Counter=CHIP_STATION_D5;
417 6 else if (Chip_Station&CHIP_STATION_D6)
418 6 wLoop_Counter=CHIP_STATION_D6;
419 6 else if (Chip_Station&CHIP_STATION_D7)
420 6 wLoop_Counter=CHIP_STATION_D7;
421 6 else
422 6 wLoop_Counter=CHIP_STATION_D8;
423 6 }
424 5 else
425 5 wLoop_Counter=Chip_Station^Chip_Station_copy;
426 5 Disp_CurLed(wLoop_Counter);
427 5 Chip_Station_copy=Chip_Station;
428 5 if (Chip_Station==CHIP_STATION_NO)
429 5 Loop_Counter1=5;
430 5 else
431 5 wDemoDelay=600;
432 5 }
433 4 }
434 3 if (wDemoDelay==0)
435 3 {
436 4 Loop_Counter=INC(Loop_Counter,LIGHT_RED,LIGHT_YELLOW);
437 4 TurnOnOff_Light(Loop_Counter);
438 4 if (Chip_Station!=CHIP_STATION_NO)
439 4 {
440 5 while (1)
441 5 {
442 6 if (wLoop_Counter==CHIP_STATION_R)
443 6 wLoop_Counter=CHIP_STATION_D1;
444 6 else
445 6 wLoop_Counter*=2;
446 6 if (Chip_Station&wLoop_Counter)
447 6 break;
448 6 }
449 5 Disp_CurLed(wLoop_Counter);
450 5 wDemoDelay=600;
451 5 }
452 4 else
453 4 {
454 5 Loop_Counter1=INC(Loop_Counter1,0,11);
455 5 Disp_Loop(Loop_Counter1);
456 5 wDemoDelay=200;
457 5 }
458 4
459 4 }
460 3 break;
461 3 case OPERATE_ER:
462 3 if (wDemoDelay%50==0)
463 3 {
464 4 Chek_Chip();
465 4 if (Chip_Station!=Chip_Station_copy)
466 4 {
467 5 Operate_Flag=OPERATE_NO;
468 5 Chip_Station_copy=CHIP_STATION_NO;
469 5 Chip_Station=CHIP_STATION_NO;
470 5 Loop_Counter=0;
471 5 wLoop_Counter=0;
472 5 Loop_Counter1=11;
C51 COMPILER V7.50 EEPROMCOPY 08/12/2006 10:29:13 PAGE 9
473 5 break;
474 5 }
475 4 }
476 3 if (wDemoDelay==0)
477 3 {
478 4 if (Error_Flag!=CHIP_STATION_NO)
479 4 {
480 5 while (1)
481 5 {
482 6 if (wLoop_Counter==CHIP_STATION_R)
483 6 wLoop_Counter=CHIP_STATION_D1;
484 6 else
485 6 wLoop_Counter*=2;
486 6 if (Error_Flag&wLoop_Counter)
487 6 break;
488 6 }
489 5 Disp_CurLed(wLoop_Counter);
490 5 }
491 4 Loop_Counter=INCx(Loop_Counter,0,3,3);
492 4 TurnOnOff_Light(Loop_Counter);
493 4 wDemoDelay=400;
494 4 }
495 3 break;
496 3 case OPERATE_OK:
497 3 if (wDemoDelay%50==0)
498 3 {
499 4 Chek_Chip();
500 4 if (Chip_Station!=Chip_Station_copy)
501 4 {
502 5 Disp_CurLed(Chip_Station^Chip_Station_copy);
503 5 Chip_Station_copy=Chip_Station;
504 5 wDemoDelay=800;
505 5 }
506 4 if ((Chip_Station==CHIP_STATION_R)||(Chip_Station==CHIP_STATION_NO))
507 4 {
508 5 Operate_Flag=OPERATE_NO;
509 5 Chip_Station_copy=CHIP_STATION_NO;
510 5 Loop_Counter=0;
511 5 wLoop_Counter=0;
512 5 Loop_Counter1=11;
513 5 }
514 4 }
515 3 if (wDemoDelay==0)
516 3 {
517 4 wDemoDelay=800;
518 4 Disp_Led(Led_Table[CH_NULL]);
519 4 }
520 3 break;
521 3 }
522 2 }
523 1 }
524
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2224 ----
CONSTANT SIZE = 65 ----
XDATA SIZE = 143 13
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
C51 COMPILER V7.50 EEPROMCOPY 08/12/2006 10:29:13 PAGE 10
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -