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

📄 pid.lst

📁 TI公司24X系列DSP控制永磁同步电机PMSM
💻 LST
📖 第 1 页 / 共 2 页
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs pid.asm -o ..\obj\pid.obj -l ..\temp\pid.lst 

TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Mon Aug 18 20:35:54 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
pid.asm                                                              PAGE    1

       1            ;=====================================================================================
       2            ; File name:        PID.ASM                     
       3            ;                    
       4            ; Originator:   Digital Control Systems Group
       5            ;                       Texas Instruments
       6            ;
       7            ; Description:                                 
       8            ; Performs PID and feed forward control 
       9            ;
      10            ;=====================================================================================
      11            ; History:
      12            ;-------------------------------------------------------------------------------------
      13            ; 9-15-2000     Release Rev 1.0
      14            ;-------------------------------------------------------------------------------------
      15            ; C prototype : int pid(struct pid_data pointer *);  
      16            ;===========================================================================
      17            ;
      18            ; History:                
      19            ; __________________________________________________________________________
      20            ; Date of Mod   |                     DESCRIPTION
      21            ;   ------------|-----------------------------------------------------------
      22            ;               |
      23            ;                |
      24            ;                |
      25            ;                |
      26            ;===========================================================================
      27            ; The PID and Feed-forward controller operates on a structure defined as         
      28            ; follows:
      29            ; [un_H,un_L,en,en-1,en-2,K0,K1,K2,Kx,Kf,rn,sat_upper,sat_lower,output]
      30            ; This is fourteen elements in all.
      31            ; If any func *s are added they should be added in at the end, or else the pid_ff
      32            ; called with a * to the first data element.
      33            ;
      34            
      35            
      36            
      37                    
      38                            .def        _pid_ff
      39            
      40 0000 8aa0  _pid_ff:             POPD        *+
      41 0001 80a0                  SAR        AR0,*+
      42 0002 8180                  SAR        AR1,*
      43 0003 b001                  LARK        AR0,1
      44 0004 00e8                  LAR        AR0,*0+,AR0
      45            ;===============================================================================
      46 0005 be43                  SETC        OVM
      47 0006 bf01                  SPM        1        
      48 0007 be46                  clrc    SXM                ; ARP=AR0, AR0->FR0.
      49            ;-------------------------------------------------------------------------------
      50 0008 7c03                  SBRK        #3                ; Point to ARG1 (in this pointer to 
      51                                                    ; source struct.
      52                                                    ; AR0=(FR0)-3
      53                                                    ; ARP=AR0, AR0->FR0-3.
      54            ;-------------------------------------------------------------------------------
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Mon Aug 18 20:35:54 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
pid.asm                                                              PAGE    2

      55 0009 038b                  LAR        AR3,*,AR3           ; point AR3 to struct.
      56                                                    ; ARP=AR3, AR0->FR0-3, AR3->un_H.
      57            ;-------------------------------------------------------------------------------
      58 000a 7807                  ADRK        #7                ; move AR3 to point to K2
      59                                                    ; ARP=AR3, AR0->FR0-3, AR3->K2.
      60            ;-------------------------------------------------------------------------------
      61 000b 8b88                  MAR         *,AR0                ; ARP=AR0 to get the pointer again.
      62                                                    ; ARP=AR0, AR0->FR0-3, AR3->K2.
      63            ;-------------------------------------------------------------------------------
      64 000c 028a                  LAR        AR2,*,AR2        ; Get the ptr to struct pid in AR2.
      65                                                    ; ARP=AR2, AR0->FR0-3, AR2->un_H,AR3->K2
      66            ;-------------------------------------------------------------------------------
      67 000d 6aa0                  LACC        *+,16                ; get un_H in ACCH
      68                                                    ; ARP=AR2, AR0->FR0-3, AR2->un_L,AR3->K2
      69            ;-------------------------------------------------------------------------------
      70 000e 20a0                  ADD        *+                ; get un_L in ACCL
      71                                                    ; ARP=AR2, AR0->FR0-3, AR2->en,AR3->K2
      72            ;-------------------------------------------------------------------------------
      73 000f 7802                  ADRK        #2                ; point AR2 to en-2.
      74                                                    ; ARP=AR2, AR0->FR0-3, AR2->en-2,AR3->K2
      75            ;-------------------------------------------------------------------------------
      76 0010 739b                  LT        *-,AR3                ; get en-2 in TREG
      77                                                    ; ARP=AR3, AR2->en-1,AR3->K2, AR0->FR0-3
      78            ;-------------------------------------------------------------------------------
      79 0011 549a                  MPY         *-,AR2                ; get product (en-2)*K2
      80                                                    ; ARP=AR2, AR2->en-1,AR3->K1, AR0->FR0-3
      81            ;-------------------------------------------------------------------------------
      82 0012 729b                  LTD        *-,AR3                ; get en-1 and point to en
      83                                                    ; also en-1 is copied to en-2.
      84                                                    ; **ALSO **
      85                                                    ; add product to un_H:un_L.
      86                                                    ; ARP=AR3, AR2->en ,AR3->K1, AR0->FR0-3
      87            ;-------------------------------------------------------------------------------
      88 0013 549a                  MPY        *-,AR2                ; multiply by K1 and move AR3 to K0
      89                                                    ; ARP=AR2, AR2->en,AR3->K0, AR0->FR0-3
      90            ;-------------------------------------------------------------------------------
      91 0014 729b                  LTD        *-,AR3                ; load TREG with en, copy en to en-1
      92                                                    ; ARP=AR3 pointing to K0
      93                                                    ; AR2 now points to un_L
      94                                                    ; **ALSO **
      95                                                    ; add product to un_H:un_L.
      96                                                    ; ARP=AR3, AR2->un_L,AR3->K0, AR0->FR0-3
      97            ;-------------------------------------------------------------------------------
      98 0015 548a                  MPY        *,AR2                ; get product K0.en
      99                                                    ; ARP=AR2, AR2->un_L,AR3->K0, AR0->FR0-3
     100            ;-------------------------------------------------------------------------------
     101 0016 be04                  APAC                        ; add to acc
     102            ;-------------------------------------------------------------------------------
     103                            ; Acc now has un=un-1 + K0.en + K1 en-1 + K2 en-2.
     104                            ; AR3 points to K0, AR2 points to un_L
     105                            ; ARP=AR3.
     106            ;-------------------------------------------------------------------------------
     107 0017 9090                  SACL        *-                ; store lower un-sat'ed sum in un_L                
     108                                                    ; ARP=AR2, AR2->un_H,AR3->K0, AR0->FR0-3
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00  Mon Aug 18 20:35:54 2003
Copyright (c) 1987-1999  Texas Instruments Incorporated 
pid.asm                                                              PAGE    3

     109            ;-------------------------------------------------------------------------------
     110 0018 9880                  SACH        *                ; store upper un-sat'ed sum in un_H
     111                                                    ; ARP=AR2, AR2->un_H,AR3->K0, AR0->FR0-3
     112            ;-------------------------------------------------------------------------------
     113            
     114                            ; AR2 points to un_H
     115            
     116            
     117                   ;         B       _PID_DIAG_EXIT

⌨️ 快捷键说明

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