⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lst

📁 蛇形机器人程序
💻 LST
字号:
C51 COMPILER V7.09   MAIN                                                                  06/11/2004 03:17:14 PAGE 1   


C51 COMPILER V7.09, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN Main.OBJ
COMPILER INVOKED BY: D:\Keil\C51\BIN\C51.EXE Main.c OMF2 ROM(COMPACT) OPTIMIZE(SIZE) REGFILE(.\FollowLine.ORC) BROWSE DE
                    -BUG

line level    source

   1          /*
   2                  Main Prgram
   3          */
   4          
   5          #include<REG2051.h>
   6          #include<FollowLine.h>
   7          #include<intrins.h>
   8          //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   9          #define CatchBoxTime 2000               // original time is 2000
  10          #define CalibrateLine  2000
  11          #define BackLineTime 2500
  12          
  13          bit FrontFlag = 0;
  14          bit StopFlag = 0;
  15          bit BackTouchFlag = 0;  //touching sensor to the 2 score zone
  16          bit ClampFlag = 0;              // 1 = 
  17          
  18          unsigned int iStopTime = 0;
  19          //~~~~~~~~~~~~~~~~~Function Declaration~~~~~~~~~~~~~~~~~~~~
  20          void Delay(unsigned int time);
  21          extern void initial(void);
  22          
  23          //***************************************************
  24          //~~~~~~~~~~~~~~~~Main function~~~~~~~~~~~~~~~~~~~~~*
  25          //***************************************************
  26          void main (void)
  27          {
  28   1              DriveLeftMo1 = 0;
  29   1              DriveLeftMo2 = 1;
  30   1              P1 = 0x7F;
  31   1      /*
  32   1              DriveRightMo1 = 0 ;
  33   1              DriveRightMo2 = 1 ;
  34   1      /*      _nop_();
  35   1              Delay(1);  //.25ms
  36   1              _nop_();
  37   1              initial();
  38   1              _nop_();
  39   1       /*
  40   1       //     start up 
  41   1              Stop(); 
  42   1              MotorLeft(1,1);
  43   1              MotorRight(1,1);
  44   1              Delay(800);
  45   1              MotorLeft(3,1);
  46   1              MotorRight(3,1);
  47   1              Delay(800);     
  48   1              while(1)
  49   1              {
  50   1                      MotorLeft(26,1);
  51   1                      MotorRight(28,1);
  52   1              }
  53   1              /*
  54   1              while(LineCounterP < 3) // right side zone
C51 COMPILER V7.09   MAIN                                                                  06/11/2004 03:17:14 PAGE 2   

  55   1                                                              // move right to out of start up zone
  56   1              {
  57   1                      SensorSta();
  58   1                      FollowLine(16);                    //origanl  8 
  59   1              }
  60   1              LineCounterP = 0;
  61   1              */
  62   1      
  63   1                      
  64   1      
  65   1      }
  66          
  67          
  68          //~~~~~~~~~Delay Function~~~~~~~~~~~~~~~~~~~~~~~
  69          void Delay(unsigned int time) //time /ms
  70          {
  71   1              unsigned int i;
  72   1              unsigned char j;
  73   1              time *=2;
  74   1              for (i=0;i<time;i++)
  75   1              {
  76   2                      _nop_ ();
  77   2                      for (j=0;j<10;j++)
  78   2                      {
  79   3                              _nop_ ();
  80   3                      }
  81   2              }
  82   1      } 
  83          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     41    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      2    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      4    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -