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

📄 fixturecontrol.lst

📁 64输入32输出单片机程序
💻 LST
字号:
C51 COMPILER V7.06   FIXTURECONTROL                                                        08/22/2004 21:22:03 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE FIXTURECONTROL
OBJECT MODULE PLACED IN FixtureControl.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE FixtureControl.c LARGE OPTIMIZE(7,SIZE) MODA2 DEBUG OBJECTEXTEND

stmt level    source

   1          //---------------------------------------------------------------------------
   2          //      Project Title : Armature resistance tester for stator.
   3          //        Project No. : 
   4          //       Project Ver. : 1.00
   5          //          File Name : FixtureControl.c
   6          //           Revision : 1.00
   7          //       Initial Date : 22-Oct,2002
   8          //        Modify Date : 09-Dec,2003
   9          //        Description : 
  10          #include <..\atmel\at89s53.h>
  11          #include <absacc.h>
  12          #include <stdio.h>
  13          #include <string.h>
  14          #include <dom12a.h>
  15          
  16          #define EXT_OUTP0       0x01
  17          #define EXT_OUTP1       0x02
  18          #define EXT_OUTP2       0x04
  19          #define EXT_OUTP3       0x08
  20          #define EXT_OUTP4       0x10
  21          #define BUZZER          0x20
  22          #define FAIL_LAMP       0x40
  23          #define PASS_LAMP       0x80
  24          
  25          #define START_SW        0x01
  26          #define EXT_INP1        0x02
  27          #define EXT_INP2        0x04
  28          #define EXT_INP3        0x08
  29          #define EXT_INP4        0x10
  30          #define EXT_INP5        0x20
  31          
  32          extern char _set_extoutp (char f, char s);
  33          extern char _get_extinp (char f);
  34          
  35          extern void     msDelay(unsigned int timer_count);
  36          
  37          //local func.
  38          uchar Fixture_Sequence_Control(uchar flagPass, uchar FCM);
  39          uchar start_Fixture_control(uchar FCM);
  40          
  41          //**********************************************************
  42          uchar start_Fixture_control(uchar FCM)
  43          {
  44   1        // OUTP0 --- Test needle
  45   1        // OUTP1 --- PUSHUP
  46   1        FCM = FCM;
  47   1        msDelay(1000);                                        // delay 1000ms
  48   1        _set_extoutp(EXT_OUTP0, ON);  // Test needle contact the armature
  49   1        msDelay(300);
  50   1        //if ( !FCM)
  51   1        //            _set_extoutp(EXT_OUTP1,ON);     
  52   1        //msDelay(300);
  53   1        return (0);
  54   1      } // end func.
  55          
C51 COMPILER V7.06   FIXTURECONTROL                                                        08/22/2004 21:22:03 PAGE 2   

  56          //**********************************************************
  57          uchar Fixture_Sequence_Control(uchar flagPass, uchar FCM)
  58          {
  59   1        if ( flagPass ) {
  60   2               switch (FCM) { 
  61   3                      case 0: //mode 0
  62   3                              _set_extoutp( EXT_OUTP0, OFF);          // test needle remove
  63   3                              msDelay(500);
  64   3                              _set_extoutp( EXT_OUTP1, ON);           // Pushup on
  65   3                              msDelay(1000);
  66   3                              _set_extoutp( EXT_OUTP1, OFF);      // Pushup off
  67   3                              while ( !_get_extinp(START_SW ));       // wait if START signal still on(active low
  68   3                              msDelay(100);
  69   3                              break;
  70   3                      case 1: // mode 1
  71   3                              _set_extoutp( EXT_OUTP0, OFF);          // top pistol remove
  72   3                              while ( !_get_extinp(START_SW ));       // wait if START signal still on(active low
  73   3                              msDelay(100);
  74   3                              break;
  75   3               } // end switch
  76   2        } else { // Test failed
  77   2                      if ( !FCM ) { // mode 0
  78   3                              while ( _get_extinp( EXT_INP1 ) ); //reset hitted 
  79   3                              msDelay(300);
  80   3                              _set_extoutp( EXT_OUTP0, OFF); // test needle remove    
  81   3                      } else
  82   2                              _set_extoutp( EXT_OUTP1, OFF); // test needle remove
  83   2        } // end else
  84   1      
  85   1        return (0);
  86   1      } // end func.


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    155    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----       1
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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