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

📄 asc0.lst

📁 英飞凌C166之XC164CS开关SWITCH程序
💻 LST
字号:
C166 COMPILER V6.04, ASC0                                                                  08/30/2007 14:28:44 PAGE 1   


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

 stmt lvl     source

    1         //****************************************************************************
    2         // @Module        Asynchronous/Synchronous Serial Interface 0 (ASC0)
    3         // @Filename      ASC0.C
    4         // @Project       SWITCH.dav
    5         //----------------------------------------------------------------------------
    6         // @Controller    Infineon XC164CS-16F
    7         //
    8         // @Compiler      Keil
    9         //
   10         // @Codegenerator 2.8
   11         //
   12         // @Description   This file contains functions that use the ASC0 module.
   13         //
   14         //----------------------------------------------------------------------------
   15         // @Date          2007-5-25 16:09:04
   16         //
   17         //****************************************************************************
   18         
   19         // USER CODE BEGIN (ASC0_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 (ASC0_General,2)
   32         
   33         // USER CODE END
   34         
   35         
   36         //****************************************************************************
   37         // @Macros
   38         //****************************************************************************
   39         
   40         // USER CODE BEGIN (ASC0_General,3)
   41         
   42         // USER CODE END
   43         
   44         
   45         //****************************************************************************
   46         // @Defines
   47         //****************************************************************************
   48         
   49         // USER CODE BEGIN (ASC0_General,4)
   50         
   51         // USER CODE END
   52         
   53         
   54         //****************************************************************************
   55         // @Typedefs
C166 COMPILER V6.04, ASC0                                                                  08/30/2007 14:28:44 PAGE 2   

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

  118         // USER CODE BEGIN (Init,1)
  119         
  120         // USER CODE END
  121         
  122         void ASC0_vInit(void)
  123         {
  124  1        // USER CODE BEGIN (Init,2)
  125  1      
  126  1        // USER CODE END
  127  1      
  128  1        ///  -----------------------------------------------------------------------
  129  1        ///  Configuration of the ASC0 Baudrate Generator:
  130  1        ///  -----------------------------------------------------------------------
  131  1        ///  - fractional divider as prescaler for baud rate timer is used
  132  1      
  133  1        ASC0_FDV       =  0x01D0;      // load ASC0 fractional divider register
  134  1      
  135  1        ///  - required baud rate = 19.200 kbaud
  136  1        ///  - real baud rate     = 19.200 kbaud
  137  1        ///  - deviation          = 0.001 %
  138  1      
  139  1        ASC0_BG        =  0x003A;      // load ASC0 baud rate time reload register
  140  1      
  141  1        ///  -----------------------------------------------------------------------
  142  1        ///  Configuration of the ASC0 Operation Mode:
  143  1        ///  -----------------------------------------------------------------------
  144  1        ///  - 8-bit data asychronous operation with one stop bit
  145  1        ///  - receiver is enabled
  146  1        ///  - fractional divider is enabled
  147  1      
  148  1        ASC0_CON       =  0x0811;      // load ASC0 control register
  149  1      
  150  1        ///  -----------------------------------------------------------------------
  151  1        ///  FIFO Configuration:
  152  1        ///  -----------------------------------------------------------------------
  153  1        ///  - receive FIFO is enabled
  154  1        ///  - receive interrupt trigger level = 4
  155  1        ///  - transmit FIFO is enabled
  156  1        ///  - transmit interrupt trigger level = 4
  157  1      
  158  1        ASC0_RXFCON    =  0x0403;      // load ASC0 receive FIFO control register
  159  1        ASC0_TXFCON    =  0x0403;      // load ASC0 transmit FIFO control register
  160  1      
  161  1        ///  -----------------------------------------------------------------------
  162  1        ///  Configuration of the used ASC0 Port Pins:
  163  1        ///  -----------------------------------------------------------------------
  164  1        ///  - P3.10 is used for ASC0 Transmit Data Output (TxDA0)
  165  1        ///  - P3.11 is used for ASC0 Receive data Input (RxDA0)
  166  1      
  167  1        ALTSEL0P3     |=  0x0400;      // select alternate output function
  168  1        P3   = (P3   & ~(uword)0x0400) | 0x0400;    //set data register
  169  1        DP3  = (DP3  & ~(uword)0x0400) | 0x0400;    //set direction register
  170  1      
  171  1        ///  -----------------------------------------------------------------------
  172  1        ///  Configuration of the used ASC0 Interrupts:
  173  1        ///  -----------------------------------------------------------------------
  174  1        ///  Rx service request node configuration:
  175  1        ///  - Rx interrupt priority level (ILVL) = 13
  176  1        ///  - Rx interrupt group level (GLVL) = 1
  177  1        ///  - Rx group priority extension (GPX) = 0
  178  1      
  179  1        ASC0_RIC       =  0x0075;     
C166 COMPILER V6.04, ASC0                                                                  08/30/2007 14:28:44 PAGE 4   

  180  1      
  181  1      
  182  1        // USER CODE BEGIN (ASC0_Function,3)
  183  1      
  184  1        // USER CODE END
  185  1      
  186  1        ASC0_CON      |=  0x8000;      // enable baud rate generator
  187  1      
  188  1      
  189  1      } //  End of function ASC0_vInit
  190         
  191         
  192         //****************************************************************************
  193         // @Function      void ASC0_vSendData(uword uwData) 
  194         //
  195         //----------------------------------------------------------------------------
  196         // @Description   This function writes a send data initialization word into 
  197         //                the transmit buffer register.
  198         //                
  199         //                Note: 
  200         //                In a multiprocessor system the master with this function 
  201         //                has the possibility to send data to the selected slave. To 
  202         //                achieve this, the 9th bit must set on zero.
  203         //
  204         //----------------------------------------------------------------------------
  205         // @Returnvalue   None
  206         //
  207         //----------------------------------------------------------------------------
  208         // @Parameters    uwData: 
  209         //                Data to be send
  210         //
  211         //----------------------------------------------------------------------------
  212         // @Date          2007-5-25
  213         //
  214         //****************************************************************************
  215         
  216         // USER CODE BEGIN (SendData,1)
  217         
  218         // USER CODE END
  219         
  220         void ASC0_vSendData(uword uwData)
  221         {
  222  1        ASC0_TBIC_IR = 0;        //  reset transmit buffer interrupt request 
  223  1        ASC0_TBUF    = uwData;   //  load transmit buffer register
  224  1      
  225  1      } //  End of function ASC0_vSendData
  226         
  227         
  228         //****************************************************************************
  229         // @Function      void ASC0_viRx(void) 
  230         //
  231         //----------------------------------------------------------------------------
  232         // @Description   This is the receive interrupt service routine for the ASC0. 
  233         //                It is called if the data has been received. 
  234         //                Please note that you have to add application specific code 
  235         //                to this function.
  236         //
  237         //----------------------------------------------------------------------------
  238         // @Returnvalue   None
  239         //
  240         //----------------------------------------------------------------------------
  241         // @Parameters    None
C166 COMPILER V6.04, ASC0                                                                  08/30/2007 14:28:44 PAGE 5   

  242         //
  243         //----------------------------------------------------------------------------
  244         // @Date          2007-5-25
  245         //
  246         //****************************************************************************
  247         
  248         // USER CODE BEGIN (Rx,1)
  249         
  250         // USER CODE END
  251         
  252         void ASC0_viRx(void) interrupt ASC0_RINT
  253         {
  254  1      
  255  1        // USER CODE BEGIN (Rx,2)
  256  1      
  257  1        // USER CODE END
  258  1      
  259  1      } //  End of function ASC0_viRx
  260         
  261         
  262         
  263         
  264         // USER CODE BEGIN (ASC0_General,10)
  265         
  266         // USER CODE END
  267         


MODULE INFORMATION:   INITIALIZED  UNINITIALIZED
  CODE SIZE        =          72     --------
  NEAR-CONST SIZE  =    --------     --------
  FAR-CONST SIZE   =    --------     --------
  HUGE-CONST SIZE  =    --------     --------
  XHUGE-CONST SIZE =    --------     --------
  NEAR-DATA SIZE   =    --------     --------
  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.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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