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

📄 f243qep2.lst

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 LST
📖 第 1 页 / 共 2 页
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs f243qep2.asm -o ..\obj\f243qep2.obj -l ..\temp\f243qep2.lst 

TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:42:41 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
f243qep2.asm                                                         PAGE    1

       1            ;===============================================================================================================
       2            ; File name:       F243QEP2.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ; Description:                                   
       7            ; This file contains source for the QEP theta calculation function.
       8            ;=====================================================================================
       9            ; History:
      10            ;-------------------------------------------------------------------------------------
      11            ; 9-15-2000     Release Rev 1.0
      12            ;================================================================================
      13            ; Applicability: F240,F241,C242,F243,F24xx.  (Peripheral Independant).
      14            ;
      15            ;
      16            ;================================================================================
      17            ; Routine Name: Generic function.        Routine Type: C Callable
      18            ;
      19            ; Description:
      20            ;  
      21            ;  C prototype : int F243_qep_theta_calc(struct QEP *p)
      22            ;================================================================================
      23                            
      24            ; Definition of the QEP structure is as follows:
      25            ; typedef struct QEP       { int theta_elec, theta_mech, QepDir;
      26            ;                            int dwn_cnt_offset,theta_raw,mech_scaler,
      27            ;                            int pole_pairs;
      28            ;                            int rev_counter;
      29            ;                            int QEP_pulse_cnt, 
      30            ;                            int index_sync_flg ;
      31            ;                            int (*calc)();
      32            ;                            int (*init)();
      33            ;                            int (*indexevent)();
      34            ;                          } ;
      35            ;
      36            ;
      37            ;                       
      38            ;
      39            ;
      40            ;
      41            ;
      42            ;================================================================================
      43            ; System Constants:
      44            
      45      0000  CAL_ANGLE       .set    0000h
      46      0fa0  ENCODER_MAX     .set    4000
      47            
      48            ;================================================================================
      49            
      50            ;================================================================================
      51            ; Include files
      52                                    .include ..\include\x24x.h
      53            ;================================================================================
      54            
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Tue May  6 12:42:41 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
f243qep2.asm                                                         PAGE    2

      55            ;================================================================================
      56            ; Global symbols:
      57                                    .def        _F243_qep_theta_calc
      58            ;================================================================================
      59            
      60      0001  __F243_qep_theta_calc_framesize .set 0001h
      61            ;================================================================================
      62 0000       _F243_qep_theta_calc:
      63 0000 8aa0                       POPD        *+
      64 0001 80a0                  SAR        AR0,*+
      65 0002 8180                  SAR        AR1,*
      66 0003 b001                  LARK        AR0,__F243_qep_theta_calc_framesize
      67 0004 00e8                  LAR        AR0,*0+,AR0
      68 0005 be46          CLRC        SXM        
      69            ;================================================================================
      70 0006 7c03          SBRK        #3              ; Point AR0 to the first argument.
      71            ;--------------------------------------------------------------------------------
      72 0007 0280          LAR     AR2,*                ; point AR2 to address of data structure.
      73            ;--------------------------------------------------------------------------------
      74 0008 7803          ADRK    #3              ; Move AR0 back to FR0
      75                                            ; ARP=AR0. AR0->FR0 AR2->theta_elec.
      76            ;--------------------------------------------------------------------------------
      77 0009 8b8a          MAR     *,AR2           ; ARP=AR2. AR0->FR0 AR2->theta_elec.
      78            ;--------------------------------------------------------------------------------
      79 000a 7802          ADRK    #2              ; ARP=AR2. AR0->FR0 AR2->Qep_Dir.
      80            ;--------------------------------------------------------------------------------
      81 000b aeab          SPLK    #1,*+,AR3      ; Set QEP direction to Up-count.
         000c 0001  
      82                                            ; ARP=AR2. AR0->FR0 AR2->down_count_offset.
      83            ;--------------------------------------------------------------------------------
      84 000d bf0b          LAR     AR3,#GPTCON     ; Point AR3 to GPTCON
         000e 7400  
      85                                            ; ARP=AR2. AR0->FR0 AR2->down_count_offset AR3->GPTCON.
      86            ;--------------------------------------------------------------------------------
      87 000f 4180          BIT        *,BIT14                        ; Check direction of rotation (count)
      88                                            ; ARP=AR2. AR0->FR0 AR2->down_count_offset AR3->GPTCON.
      89            ;--------------------------------------------------------------------------------
      90 0010 e100          BCND        UP_COUNT,TC        ; If=1 upcount - no need to correct.
         0011 001b' 
      91                                            ; ARP=AR2. AR0->FR0 AR2->down_count_offset AR3->GPTCON.
      92            ;--------------------------------------------------------------------------------
      93 0012       DWN_COUNT:        

⌨️ 快捷键说明

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