📄 320240mine.lst
字号:
402 1 Dis_Pos_Pic(px,(py+72),32,32,gImage_4);
403 1 Dis_Pos_Pic((px+5),(py+72),32,32,gImage_5);
404 1 Dis_Pos_Pic((px+10),(py+72),32,32,gImage_6);
405 1 Dis_Pos_Pic(px,(py+112),32,32,gImage_7);
406 1 Dis_Pos_Pic((px+5),(py+112),32,32,gImage_8);
407 1 Dis_Pos_Pic((px+10),(py+112),32,32,gImage_9);
408 1 Dis_Pos_Pic((px),(py+152),32,32,gImage_0);
409 1 Dis_Pos_Pic((px+5),(py+152),48,32,gImage_finish);
410 1 }
411 void draw(void)
412 {
413 1 uchar stack,m;
414 1 xdata uchar mdata[240];
415 1 for(stack = 0;stack<240;stack++)
416 1 { mdata[stack] = stack;
417 2 if(stack>50) mdata[stack] = (stack-50);
418 2 if(stack>100) mdata[stack] = (stack-100);
419 2 if(stack>150) mdata[stack] = (stack-150);
420 2 if(stack>200) mdata[stack] = (stack-200);
421 2 Dis_Point((20+stack),(mdata[stack]+100),1);
422 2
423 2 }
424 1 //for(m = 0;m<240;m++)
425 1 //Dis_Point((20+m),(mdata[m]+100),1);
426 1
427 1 }
C51 COMPILER V7.50 320240MINE 02/21/2009 10:27:02 PAGE 8
*** WARNING C280 IN LINE 413 OF 320240MINE.C: 'm': unreferenced local variable
428 void rec(uchar px,uchar py,uchar att)
429 {
430 1 Dis_Linexy(px,py,(px+7),(py+11),att);
431 1 Dis_Linexy((px+8),(py+10),(px+21),(py-11),att);
432 1 }
433 /*void draw(void)
434 {
435 uchar i;
436 xdata uchar mdata[240];
437 for(i=0;i<100;i++)
438 mdata[i]=i;
439 for(i=99;i>=0;i--)
440 { mdata[i+1] = mdata[i];
441
442 Dis_Point((20+98-i),(mdata[99-i]+100),0);
443 Dis_Point((20+99-i),(mdata[99-i]+100),1);
444 }
445 }
446 void draw(void)
447 {
448 uchar i,j,k;
449 xdata uchar mdata[100];
450 for(i = 0;i < 100;i++)
451 {
452
453 if(i<50) mdata[0] = i;
454 else mdata[0] = (i-50);
455 for(j = i;j > 0;j--)
456 mdata[j] = mdata[j-1];
457 mdata[0] = 0;
458 for(k = 1;k <i+1;k++)
459 {
460 Dis_Point((k+30),(100+mdata[k+1]),0);
461 Dis_Point((k+30),(100+mdata[k]),1);
462
463 }
464 }
465 }*/
466 uchar Key_Scan(void)
467 {
468 1 uchar X1,X2,Y1,Y2,temp;
469 1 Wrr_Addr(0x0f);
470 1 Wrr_Data(0x00);
471 1 delay1ms(1);//必须加延迟
472 1 Wrr_Addr(0x0f);
473 1 temp = Read_Data();
474 1
475 1 if((temp&0x01) == 0x01)
476 1 {
477 2
478 2 X1 = ADC_X1_MSB();
479 2 Y1 = ADC_Y1_MSB();
480 2 delay1ms(2);
481 2 if((X1 > 0x18)&&(X1 < 0xF0)&&(Y1 > 0x1B)&&(Y1 < 0xEA))
482 2 {
483 3 X2 = ADC_X1_MSB();
484 3 Y2 = ADC_Y1_MSB();
485 3 if((X2 == X1)&&(Y2 == Y1))
486 3 {
487 4 LCD_Text();
488 4 LCD_FontSize(0);
C51 COMPILER V7.50 320240MINE 02/21/2009 10:27:02 PAGE 9
489 4 LCD_GotoXY(0x20,0x50);
490 4 Print_Hex(X1);
491 4 LCD_GotoXY(0x23,0x50);
492 4 Print_Hex(Y1); //测绘按钮用代码
493 4
494 4 if((Y1>0x1c)&&(Y1<0x30)&&(X1>0xc2)&&(X1<0xeb)) return 19;
495 4
496 4 if((Y1>0xca)&&(Y1<0xe2)&&(X1>0x1c)&&(X1<0x40)) return 1;
497 4
498 4 if((Y1>0x4b)&&(Y1<0x62)&&(X1>0xcd)&&(X1<0xdf)) return 2;
499 4
500 4 if((Y1>0x1c)&&(Y1<0x30)&&(X1>0x55)&&(X1<0x7d)) return 3;
501 4
502 4 if((Y1>0x5c)&&(Y1<0x73)&&(X1>0xcb)&&(X1<0xde)) return 4;
503 4
504 4 if((Y1>0x5f)&&(Y1<0x74)&&(X1>0xaf)&&(X1<0xc0)) return 5;
505 4
506 4 if((Y1>0x5e)&&(Y1<0x74)&&(X1>0x93)&&(X1<0xa5)) return 6;
507 4
508 4 if((Y1>0x82)&&(Y1<0x97)&&(X1>0xcb)&&(X1<0xdc)) return 7;
509 4
510 4 if((Y1>0x80)&&(Y1<0x97)&&(X1>0xaf)&&(X1<0xc1)) return 8;
511 4
512 4 if((Y1>0x81)&&(Y1<0x97)&&(X1>0x93)&&(X1<0xa5)) return 9;
513 4
514 4 if((Y1>0xa5)&&(Y1<0xba)&&(X1>0xc9)&&(X1<0xdd)) return 10;
515 4
516 4 if((Y1>0xa5)&&(Y1<0xba)&&(X1>0xaf)&&(X1<0xc1)) return 11;
517 4 if((Y1>0xa5)&&(Y1<0xba)&&(X1>0x93)&&(X1<0xa5)) return 12;
518 4
519 4 if((Y1>0xc8)&&(Y1<0xdd)&&(X1>0xcb)&&(X1<0xdb)) return 13;
520 4
521 4 if((Y1>0xc9)&&(Y1<0xdd)&&(X1>0xa4)&&(X1<0xbf)) return 14;
522 4
523 4
524 4
525 4 if((Y1>0x42)&&(Y1<0x69)&&(X1>0xc0)&&(X1<0xe1)) return 15;
526 4
527 4 if((Y1>0x70)&&(Y1<0x81)&&(X1>0xcf)&&(X1<0xdc)) return 16;
528 4
529 4 if((Y1>0x91)&&(Y1<0xa6)&&(X1>0xcf)&&(X1<0xdc)) return 17;
530 4
531 4 if((Y1>0xb5)&&(Y1<0xc8)&&(X1>0xcf)&&(X1<0xdc)) return 18;
532 4 }
533 3 }
534 2
535 2 }
536 1 }
537 void Show_Moniter2(void)
538 {
539 1 Only_Show_Page2();
540 1 Access_Page2();
541 1 if(monitor2==0)
542 1 {
543 2 Lcd_Clear();
544 2 Dis_Text(8,10,11,4,sRAiO3);
545 2 Dis_Blank_Rec(4,38,34,38);
546 2
547 2 Dis_Blank_Rec(4,60,7,84);
548 2 Dis_Text(14,64,6,4,sRAiO5);
549 2 Dis_Blank_Rec(4,99,7,123);
550 2 Dis_Text(14,103,6,4,sRAiO6);
C51 COMPILER V7.50 320240MINE 02/21/2009 10:27:02 PAGE 10
551 2 Dis_Blank_Rec(4,138,7,162);
552 2 Dis_Text(14,142,8,4,sRAiO7);
553 2 Dis_Blank_Rec(4,177,7,201);
554 2 Dis_Text(14,181,8,4,sRAiO8);
555 2 LCD_Text();
556 2 Dis_Pos_Pic(32,206,64,32,gImage_back);
557 2 monitor1 = 0;
558 2 monitor2 = 1;
559 2 monitor3 = 0;
560 2 }
561 1 }
562 void Show_Monitor3(void)
563 {
564 1 Only_Show_Page2();
565 1 Access_Page2();
566 1 if(monitor3 == 0)
567 1 {
568 2 Lcd_Clear();
569 2 Dis_Text(12,10,6,4,sRAiO4);
570 2 Lcd_Graphic();
571 2 //Dis_Text(4,38,30,0,sRAiO2);
572 2 Dis_Blank_Rec(4,38,34,38);
573 2
574 2 Dis_Blank_Rec(4,60,7,84);
575 2 Dis_Text(15,64,6,0,sRAiO9);
576 2 Dis_Blank_Rec(4,99,7,123);
577 2 Dis_Text(15,103,6,0,sRAi10);
578 2
579 2 Lcd_Graphic();
580 2 Dis_Linexy(32,72,55,72,1);
581 2 Dis_Linexy(50,67,55,72,1);
582 2 Dis_Linexy(55,72,50,77,1);
583 2 //Dis_Linexy(33,123,260,123,1);
584 2 Dis_Pos_Pic(32,206,64,32,gImage_back);
585 2 monitor1 = 0;
586 2 monitor3 = 1;
587 2 monitor2 = 0;
588 2 }
589 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2956 ----
CONSTANT SIZE = 3501 ----
XDATA SIZE = ---- 240
PDATA SIZE = ---- ----
DATA SIZE = ---- 27
IDATA SIZE = ---- ----
BIT SIZE = 4 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -