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

📄 adc.lst

📁 xc164的t12
💻 LST
字号:
C166 COMPILER V6.02, ADC                                                                   08/08/2006 15:48:08 PAGE 1   


C166 COMPILER V6.02, COMPILATION OF MODULE ADC
OBJECT MODULE PLACED IN ADC.OBJ
COMPILER INVOKED BY: C:\Keil\C166\BIN\C166.EXE ADC.C MODV2 BROWSE MODV2 DEBUG

 stmt lvl     source

    1         //****************************************************************************
    2         // @Module        Analog / Digital Converter (ADC)
    3         // @Filename      ADC.C
    4         // @Project       T12_T13_AD_PEC.dav
    5         //----------------------------------------------------------------------------
    6         // @Controller    Infineon XC164CM-8F40
    7         //
    8         // @Compiler      Keil
    9         //
   10         // @Codegenerator 0.2
   11         //
   12         // @Description   This file contains functions that use the ADC module.
   13         //
   14         //----------------------------------------------------------------------------
   15         // @Date          2006-7-8 23:19:35
   16         //
   17         //****************************************************************************
   18         
   19         // USER CODE BEGIN (ADC_General,1)
   20         
   21         // USER CODE END
   22         
   23         
   24         
   25         //****************************************************************************
   26         // @Project Includes
   27         //****************************************************************************
   28         
   29         #include "MAIN.H"
   30         
   31         // USER CODE BEGIN (ADC_General,2)
   32         
   33         // USER CODE END
   34         
   35         
   36         //****************************************************************************
   37         // @Macros
   38         //****************************************************************************
   39         
   40         // USER CODE BEGIN (ADC_General,3)
   41         
   42         // USER CODE END
   43         
   44         
   45         //****************************************************************************
   46         // @Defines
   47         //****************************************************************************
   48         
   49         // USER CODE BEGIN (ADC_General,4)
   50         
   51         // USER CODE END
   52         
   53         
   54         //****************************************************************************
   55         // @Typedefs
C166 COMPILER V6.02, ADC                                                                   08/08/2006 15:48:08 PAGE 2   

   56         //****************************************************************************
   57         
   58         // USER CODE BEGIN (ADC_General,5)
   59         
   60         // USER CODE END
   61         
   62         
   63         //****************************************************************************
   64         // @Imported Global Variables
   65         //****************************************************************************
   66         
   67         // USER CODE BEGIN (ADC_General,6)
   68         
   69         // USER CODE END
   70         
   71         
   72         //****************************************************************************
   73         // @Global Variables
   74         //****************************************************************************
   75         
   76         // USER CODE BEGIN (ADC_General,7)
   77         unsigned int ADC_Result[10];
   78         // USER CODE END
   79         
   80         
   81         //****************************************************************************
   82         // @External Prototypes
   83         //****************************************************************************
   84         
   85         // USER CODE BEGIN (ADC_General,8)
   86         
   87         // USER CODE END
   88         
   89         
   90         //****************************************************************************
   91         // @Prototypes Of Local Functions
   92         //****************************************************************************
   93         
   94         // USER CODE BEGIN (ADC_General,9)
   95         
   96         // USER CODE END
   97         
   98         
   99         //****************************************************************************
  100         // @Function      void ADC_vInit(void) 
  101         //
  102         //----------------------------------------------------------------------------
  103         // @Description   This is the initialization function of the ADC function 
  104         //                library. It is assumed that the SFRs used by this library 
  105         //                are in reset state. 
  106         //
  107         //----------------------------------------------------------------------------
  108         // @Returnvalue   None
  109         //
  110         //----------------------------------------------------------------------------
  111         // @Parameters    None
  112         //
  113         //----------------------------------------------------------------------------
  114         // @Date          2006-7-8
  115         //
  116         //****************************************************************************
  117         
C166 COMPILER V6.02, ADC                                                                   08/08/2006 15:48:08 PAGE 3   

  118         // USER CODE BEGIN (Init,1)
  119         
  120         // USER CODE END
  121         
  122         void ADC_vInit(void)
  123         {
  124  1        // USER CODE BEGIN (Init,2)
  125  1      
  126  1        // USER CODE END
  127  1      
  128  1        ///  - enhanced mode is selected
  129  1        ///  - fixed channel single conversion mode is selected
  130  1        ///  - 10-bit resolution
  131  1        ///  - once converts channel 0
  132  1        ///  - ADC start bit is reset
  133  1        ///  - wait for ADDAT read mode is enabled
  134  1        ///  - converter basic clock tbc is fpd / 1
  135  1        ///  - sample time tsc is tbc * 8
  136  1        ///  - post calibration is enabled
  137  1        ///  - conversion time tc = 1.550 祍
  138  1        ///  - channel injection is enabled
  139  1        ///  - inject channel 0
  140  1        ///  - trigger input CCU6 selected
  141  1        ///  - resolution for injection mode is 10-bit
  142  1        ///  - converter basic clock tbc for injection mode is fpd / 1
  143  1        ///  - sample time tsc for injection mode is tbc * 8
  144  1        ///  - conversion time in injection mode tc = 1.550 祍
  145  1      
  146  1        ADC_CTR0       =  0xA600;      // load ADC control register 0
  147  1      
  148  1        ADC_CTR2       =  0x0000;      // load ADC control register 2
  149  1      
  150  1        ADC_DAT2       =  0x0000;      // load A/D converter 2 result register
  151  1      
  152  1        ADC_CTR2IN     =  0x0000;      // load ADC injection control register 2
  153  1      
  154  1      
  155  1      
  156  1        ///  -----------------------------------------------------------------------
  157  1        ///  Configuration of the used ADC Interrupts:
  158  1        ///  -----------------------------------------------------------------------
  159  1        ///  Error service request node configuration:
  160  1        ///  - Error interrupt priority level (ILVL) = 12
  161  1        ///  - Error interrupt group level (GLVL) = 2
  162  1        ///  - Error group priority extension (GPX) = 0
  163  1      
  164  1        ADC_EIC        =  0x0072;     
  165  1      
  166  1        ///  Use PEC channel 2 for ADC Error INT:
  167  1        ///  - decrement counter
  168  1        ///  - increment destination pointer
  169  1        ///  - transfer a word
  170  1        ///  - service End of PEC interrrupt by a EOP interrupt node is enabled
  171  1        ///  - End of PEC intrrupt request is enabled
  172  1      
  173  1        PECC2          =  0x520A;      // load PECC2 control register
  174  1      
  175  1        SRCP2  =  _sof_(&ADC_DAT2);  //set source pointer
*** WARNING C98 IN LINE 175 OF ADC.C: parameter 1: pointer to different objects
  176  1      
  177  1        //// - DESTINATION-POINTER for PECC channel 2 is set because it is selected 
  178  1        ////   for user defined
C166 COMPILER V6.02, ADC                                                                   08/08/2006 15:48:08 PAGE 4   

  179  1        DSTP2  =  _sof_(0x0000);      //set destination pointer
  180  1      
  181  1      
  182  1        ///  -----------------------------------------------------------------------
  183  1        ///  Configuration of the used ADC Port Pins:
  184  1        ///  -----------------------------------------------------------------------
  185  1        ///  - P5.0 is used for Analog Input Pin (AN0)
  186  1      
  187  1        ///  - digital input stage is disconnected from port line P5.0
  188  1      
  189  1        P5DIDIS        =  0x0001;      // load Port 5 digital input disable register
  190  1      
  191  1      
  192  1      
  193  1        // USER CODE BEGIN (Init,3)
  194  1        DSTP2  =  _sof_(ADC_Result);      //set destination pointer
*** WARNING C98 IN LINE 194 OF ADC.C: parameter 1: pointer to different objects
  195  1        // USER CODE END
  196  1      
  197  1      } //  End of function ADC_vInit
  198         
  199         
  200         //****************************************************************************
  201         // @Function      void ADC_viError(void) 
  202         //
  203         //----------------------------------------------------------------------------
  204         // @Description   This is the interrupt service routine for the overwrite 
  205         //                error of the ADC (in standard mode) - the last measurement 
  206         //                result was overwritten - , or the ISR for the end of an 
  207         //                injected conversion - the result of the injected conversion 
  208         //                has beenwritten to ADC_DAT2. An overrun is not possible in 
  209         //                channel injection mode; in this case the A/D measurement is 
  210         //                stopped. To get the injected conversion result the user can 
  211         //                call the function ADC_uwReadInject().
  212         //                Please note that you have to add application specific code 
  213         //                to this function.
  214         //
  215         //----------------------------------------------------------------------------
  216         // @Returnvalue   None
  217         //
  218         //----------------------------------------------------------------------------
  219         // @Parameters    None
  220         //
  221         //----------------------------------------------------------------------------
  222         // @Date          2006-7-8
  223         //
  224         //****************************************************************************
  225         
  226         // USER CODE BEGIN (Error,1)
  227         
  228         // USER CODE END
  229         
  230         void ADC_viError(void) interrupt ADC_E_INT
  231         {
  232  1        // USER CODE BEGIN (Error,2)
  233  1      
  234  1        // USER CODE END
  235  1      
  236  1      } //  End of function ADC_viError
  237         
  238         
  239         
C166 COMPILER V6.02, ADC                                                                   08/08/2006 15:48:08 PAGE 5   

  240         
  241         // USER CODE BEGIN (ADC_General,10)
  242         
  243         // USER CODE END
  244         


MODULE INFORMATION:   INITIALIZED  UNINITIALIZED
  CODE SIZE        =          56     --------
  NEAR-CONST SIZE  =    --------     --------
  FAR-CONST SIZE   =    --------     --------
  HUGE-CONST SIZE  =    --------     --------
  XHUGE-CONST SIZE =    --------     --------
  NEAR-DATA SIZE   =          20     --------
  FAR-DATA SIZE    =    --------     --------
  XHUGE-DATA SIZE  =    --------     --------
  IDATA-DATA SIZE  =    --------     --------
  SDATA-DATA SIZE  =    --------     --------
  BDATA-DATA SIZE  =    --------     --------
  HUGE-DATA SIZE   =    --------     --------
  BIT SIZE         =    --------     --------
  INIT'L SIZE      =    --------     --------
END OF MODULE INFORMATION.


C166 COMPILATION COMPLETE.  2 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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