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

📄 vhz.lst

📁 本程序来自TI公司网站原程序,其功能是通过传统的V/F控制算法来实现对感应电机的控制,控制程序可以采用.asm也可以采用.C。 程序的具体算法和介绍在软件压缩包有详细介绍!
💻 LST
📖 第 1 页 / 共 4 页
字号:
     347            
     348                    .sym    _drive,_drive,8,2,48,.fake10
     349                    .globl  _drive
     350                    .globl  _isr_ticker
     351 0000               .text
     352            
     353                    .sym    _main,_main,32,2,0
     354                    .globl  _main
     355            
     356                    .func   88
TMS320C24xx COFF Assembler Version 7.02  Mon Apr 28 14:36:15 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/vhz.asm                                                      PAGE    9

     357            ;>>>>   void main()   
     358            ******************************************************
     359            * FUNCTION DEF : _main
     360            ******************************************************
     361 0000       _main:
     362 0000 8aa0          POPD    *+
     363 0001 80a0          SAR     AR0,*+
     364 0002 8180          SAR     AR1,*
     365 0003 b001          LARK    AR0,1
     366 0004 00e0          LAR     AR0,*0+
     367            
     368                    .line   6
     369            ;>>>>           RstSystem();
     370            ;>>>>   #if (BUILDLEVEL==LEVEL1)
     371            ;>>>>   #if     TARGET==F243                      
     372            ;>>>>           pwm.period_max=500;      /* This is based on 20kHz PWM frequency (20MHz) */
     373            ;>>>>   #elif   TARGET==F2407                                                          
     374 0005 7a80          CALL    _RstSystem
         0006 0068' 
     375                    .line   31
     376            ;>>>>           pwm.period_max=1000;      /* This is based on 20kHz PWM frequency (40MHz) */
     377            ;>>>>   #endif  /* TARGET */            
     378 0007 bc00-         LDPK    _pwm
     379 0008 ae00-         SPLK    #1000,_pwm
         0009 03e8  
     380                    .line   39
     381            ;>>>>           VHZ_TI_Init(&vhz);
     382 000a bf80          LALK    _vhz+0
         000b 0013- 
     383 000c 90a0          SACL    *+
     384 000d 7a80          CALL    _VHZ_TI_Init
         000e 0000! 
     385 000f 8b90          MAR     *-
     386                    .line   44
     387            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     388 0010 7a80          CALL    _rtmon_init
         0011 0093' 
     389                    .line   45
     390            ;>>>>           enable_ints();           /* Set off the system running.              */
     391 0012 7a80          CALL    _enable_ints
         0013 0000! 
     392                    .line   50
     393            ;>>>>           while(drive.enable_flg==0)
     394 0014 bc00-         LDPK    _drive
     395 0015 103f-         LAC     _drive
     396 0016 e308          BNZ     L2
         0017 0023' 
     397 0018       L1:
     398                    .line   52
     399            ;>>>>           drive.init(&drive);
     400 0018 bf80          LALK    _drive+0
         0019 003f- 
     401 001a 90a0          SACL    *+
     402 001b bc00-         LDPK    _drive+1
TMS320C24xx COFF Assembler Version 7.02  Mon Apr 28 14:36:15 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/vhz.asm                                                      PAGE   10

     403 001c 1040-         LAC     _drive+1
     404 001d be30          CALA
     405 001e 8b90          MAR     *-
     406                    .line   50
     407 001f bc00-         LDPK    _drive
     408 0020 103f-         LAC     _drive
     409 0021 e388          BZ      L1
         0022 0018' 
     410 0023       L2:
     411                    .line   58
     412            ;>>>>           pwm.mfunc_c1=0;
     413 0023 b900          LACK    0
     414 0024 9002-         SACL    _pwm+2
     415                    .line   59
     416            ;>>>>           pwm.mfunc_c2=0;
     417 0025 9003-         SACL    _pwm+3
     418                    .line   60
     419            ;>>>>           pwm.mfunc_c3=0;
     420 0026 9004-         SACL    _pwm+4
     421                    .line   61
     422            ;>>>>           pwm.init(&pwm);          
     423            ;>>>>   #if     TARGET==F243                      
     424            ;>>>>           EVIFRA=0xffff;          
     425            ;>>>>   #elif   TARGET==F2407                                                          
     426 0027 bf80          LALK    _pwm+0
         0028 0000- 
     427 0029 90a0          SACL    *+
     428 002a 1005-         LAC     _pwm+5
     429 002b be30          CALA
     430 002c 8b9b          MAR     *-,AR3
     431                    .line   69
     432            ;>>>>               EVAIFRA=0xffff;        
     433            ;>>>>   #endif  /* TARGET */
     434 002d bf0b          LARK    AR3,29743
         002e 742f  
     435 002f ae80          SPLK    #-1,* 
         0030 ffff  
     436                    .line   76
     437            ;>>>>           dac.qptr0=&vhz.svgen.va;
     438 0031 bf80          LALK    _vhz+17
         0032 0024- 
     439 0033 bc00-         LDPK    _dac
     440 0034 9037-         SACL    _dac
     441                    .line   77
     442            ;>>>>           dac.qptr1=&vhz.svgen.vb;
     443 0035 bf80          LALK    _vhz+18
         0036 0025- 
     444 0037 9038-         SACL    _dac+1
     445                    .line   78
     446            ;>>>>           dac.qptr2=&vhz.svgen.vc;
     447 0038 bf80          LALK    _vhz+19
         0039 0026- 
     448 003a 9039-         SACL    _dac+2
     449                    .line   79
TMS320C24xx COFF Assembler Version 7.02  Mon Apr 28 14:36:15 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/vhz.asm                                                      PAGE   11

     450            ;>>>>           dac.qptr3=&vhz.svgen.alpha;
     451            ;>>>>   #endif /* (BUILDLEVEL==LEVEL1) */  
     452            ;>>>>   #if (BUILDLEVEL==LEVEL2)
     453            ;>>>>   #if     TARGET==F243                      
     454            ;>>>>           pwm.period_max=500;      /* This is based on 20kHz PWM frequency (20MHz) */
     455            ;>>>>   #elif   TARGET==F2407                                                          
     456            ;>>>>           pwm.period_max=1000;      /* This is based on 20kHz PWM frequency (40MHz) */
     457            ;>>>>   #endif  /* TARGET */            
     458            ;>>>>           VHZ_TI_Init(&vhz);
     459            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     460            ;>>>>           enable_ints();           /* Set off the system running.              */
     461            ;>>>>           while(drive.enable_flg==0)
     462            ;>>>>           drive.init(&drive);
     463            ;>>>>           pwm.mfunc_c1=0;
     464            ;>>>>           pwm.mfunc_c2=0;
     465            ;>>>>           pwm.mfunc_c3=0;
     466            ;>>>>           pwm.init(&pwm);
     467            ;>>>>           dac.qptr0=&vhz.svgen.va;
     468            ;>>>>           dac.qptr1=&vhz.svgen.vb;
     469            ;>>>>           dac.qptr2=&vhz.svgen.vc;
     470            ;>>>>           dac.qptr3=&vhz.svgen.alpha;
     471            ;>>>>   #endif /* (BUILDLEVEL==LEVEL2) */   
     472            ;>>>>   #if (BUILDLEVEL==LEVEL3)
     473            ;>>>>   #if     TARGET==F243                      
     474            ;>>>>           pwm.period_max=500;      /* This is based on 20kHz PWM frequency (20MHz) */
     475            ;>>>>   #elif   TARGET==F2407                                                          
     476            ;>>>>           pwm.period_max=1000;      /* This is based on 20kHz PWM frequency (40MHz) */
     477            ;>>>>   #endif  /* TARGET */            
     478            ;>>>>           VHZ_TI_Init(&vhz);
     479            ;>>>>           rtmon_init();            /* Call the monitor init function           */
     480            ;>>>>           enable_ints();           /* Set off the system running.              */
     481            ;>>>>           while(drive.enable_flg==0)
     482            ;>>>>           drive.init(&drive);
     483            ;>>>>           pwm.mfunc_c1=0;
     484            ;>>>>           pwm.mfunc_c2=0;
     485            ;>>>>           pwm.mfunc_c3=0;
     486            ;>>>>           pwm.init(&pwm);          
     487            ;>>>>           cap.init(&cap);
     488            ;>>>>           dac.qptr0=&vhz.svgen.va;
     489            ;>>>>           dac.qptr1=&vhz.svgen.vb;
     490            ;>>>>           dac.qptr2=&vhz.svgen.vc;
     491            ;>>>>           dac.qptr3=&vhz.svgen.alpha;
     492            ;>>>>   #endif /* (BUILDLEVEL==LEVEL3) */
     493            ;>>>>   #if     TARGET==F243
     494            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     495            ;>>>>   #elif   TARGET==F2407                                                          
     496 003b bf80          LALK    _vhz+15
         003c 0022- 
     497 003d 903a-         SACL    _dac+3
     498                    .line   226
     499            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     500            ;>>>>   #endif /* TARGET */          
     501            ;>>>>           while(1)             /* Nothing running in the background at present */
     502 003e ae80          SPLK    #-1,* 
TMS320C24xx COFF Assembler Version 7.02  Mon Apr 28 14:36:15 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
../temp/vhz.asm                                                      PAGE   12

         003f ffff  
     503 0040       L3:
     504                    .line   238
     505 0040 7980          B       L3
         0041 0040' 
     506                    .endfunc        327,000000000H,1
     507            
     508                    .sym    _c_int02,_c_int02,32,2,0
     509                    .globl  _c_int02
     510            
     511                    .func   329
     512            ;>>>>   void interrupt c_int02()
     513            ******************************************************
     514            * FUNCTION DEF : _c_int02
     515            ******************************************************
     516 0042       _c_int02:
     517 0042 7a80          CALL    I$$SAVE
         0043 0000! 
     518 0044 8180          SAR     AR1,*
     519 0045 b001          LARK    AR0,1
     520 0046 00e0          LAR     AR0,*0+
     521            
     522                    .line   3
     523            ;>>>>        asm("      CLRC     XF "); 
     524 0047 be4c        CLRC     XF 
     525                    .line   5
     526            ;>>>>        isr_ticker++;
     527            ;>>>>   #if (BUILDLEVEL==LEVEL1)
     528            ;>>>>   #if     TARGET==F243                      
     529            ;>>>>           EVIFRA=0x0ffff;           /* Clear all Group A EV interrupt flags    */
     530            ;>>>>   #elif   TARGET==F2407                                                          
     531 0048 bc00-         LDPK    _isr_ticker
     532 0049 1043-         LAC     _isr_ticker
     533 004a b801          ADDK    1
     534 004b 9043-         SACL    _isr_ticker
     535                    .line   14
     536            ;>>>>           EVAIFRA=0x0ffff;          /* Clear all EV1 Group A EV interrupt flags*/
     537            ;>>>>   #endif  /* TARGET */            
     538 004c bf0b          LARK    AR3,29743
         004d 742f  

⌨️ 快捷键说明

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