📄 mod6_cnt.lst
字号:
dspa -q -l -s -i../../../rtmon -i../../../sys/bldc3_2/asm -i..\..\..\rtmon -i..\..\..\sys\bldc3_2\asm -v2xx -iC:/CCStudio_v3.1/c2400/cgtools/include -g mod6_cnt.asm mod6_cnt.obj
TMS320C24xx COFF Assembler Version 7.04 Wed Dec 28 11:23:53 2005
Copyright (c) 1987-2003 Texas Instruments Incorporated
mod6_cnt.asm PAGE 1
1 ;===========================================================================
2 ; File Name: mod6_cnt.asm
3 ;
4 ; Module Name: MOD6_CNT
5 ;
6 ; Initialization Routine: MOD6_CNT_INIT
7 ;
8 ; Originator: Digital Control Systems Group
9 ; Texas Instruments
10 ;
11 ; Description: This module implements a modulo 6 counter. It counts from
12 ; state 0 through 5, then resets to 0 and repeats the process.
13 ; The state of the output variable m6_cntr changes to the next
14 ; state every time it receives a trigger input through the input
15 ; variable m6_trig_in.
16 ;
17 ; |~~~~~~~~~~~~~~~|
18 ; | |
19 ; m6_trig_in o------>| MOD6_CNT |----->o m6_cntr
20 ; | |
21 ; |_______________|
22 ;
23 ;
24 ;
25 ;=====================================================================================
26 ; History:
27 ;-------------------------------------------------------------------------------------
28 ; 9-15-2000 Release Rev 1.00
29 ;===========================================================================
30 ;(To use this Module, copy this section to main system file)
31 ; .ref MOD6_CNT, MOD6_CNT_INIT ;function call
32 ; .ref m6_trig_in, m6_cntr ;Inputs
33 ;===========================================================================
34 ;Module definitions for external reference.
35 .def MOD6_CNT, MOD6_CNT_INIT ;function call
36 .def m6_trig_in, m6_cntr ;Inputs
37 ;===========================================================================
38 .include x24x_app.h
39
40 ;===========================================================================
41 ;Variable Definitions for mod6_cnt module
42 ;---------------------------------------------------------------------------
43 ;m6_cntr .usect "mod6_cnt",1 ;Mod 6 counter output
44 ;m6_trig_in .usect "mod6_cnt",1 ;Mod 6 counter trigger input
45
46 0000 m6_cntr_vars .usect "mod6_cnt",2,1
47 0000- m6_cntr .set m6_cntr_vars+0 ;Mod 6 counter output
48 0001- m6_trig_in .set m6_cntr_vars+1 ;Mod 6 counter trigger input
49
50
51 ;======================================================================
52 0000 MOD6_CNT_INIT:
53 ;======================================================================
54 0000 bc00- LDP #m6_cntr
TMS320C24xx COFF Assembler Version 7.04 Wed Dec 28 11:23:53 2005
Copyright (c) 1987-2003 Texas Instruments Incorporated
mod6_cnt.asm PAGE 2
55 0001 ae00- SPLK #0h, m6_cntr
0002 0000
56 0003 ae01- SPLK #0h, m6_trig_in
0004 0000
57 0005 ef00 RET
58
59 ;======================================================================
60 0006 MOD6_CNT:
61 ;======================================================================
62 0006 bc00- LDP #m6_cntr
63 0007 1001- LACC m6_trig_in
64 0008 e388 BCND M6C_END, EQ ;If no trigger exit
0009 0015'
65
66 000a 1000- CHK_STATE: LACC m6_cntr
67 000b ba05 SUB #05h ;Check if at last state
68 000c e388 BCND M6_RST_ST0,EQ ;If yes, re-init ptr to 1st state
000d 0013'
69 000e 1000- LACC m6_cntr ;If not, select next State (Sn->Sn+1)
70 000f b801 ADD #01h
71 0010 9000- SACL m6_cntr ;i.e. inc commutation_ptr
72 0011 7980 B M6C_END
0012 0015'
73 0013 M6_RST_ST0:
74 0013 ae00- SPLK #0h, m6_cntr ;Reset state pointer to 0
0014 0000
75 0015 M6C_END:
76 0015 ef00 RET
77
78
79
80
81
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -