📄 dac_view.lst
字号:
dspa -q -l -s -i../../../rtmon -i../../../sys/bldc3_2/asm -i..\..\..\rtmon -i..\..\..\sys\bldc3_2\asm -v2xx -iC:/ti/c2400/cgtools/include -g dac_view.asm dac_view.obj
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:34:18 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
dac_view.asm PAGE 1
1 ;===========================================================================
2 ; File Name: DAC_VIEW.asm
3 ;
4 ; Module Name: DAC_VIEW_DRV
5 ;
6 ; Initialization Routine: DAC_VIEW_DRV_INIT
7 ;
8 ; Originator: Digital Control Systems Group
9 ; Texas Instruments
10 ;
11 ; Description: Converts any s/w variable with Q15 representation into its
12 ; equivalent Q0 format that spans the full input range of
13 ; a 12-bit DAC. Thus, it can be used to view the signal,
14 ; represented by the variable, at the output of the 12-bit
15 ; DAC on the 24x/24xx EVM.
16 ; |~~~~~~~~~~~~~~~|
17 ; DAC_IPTR0 o------>| |----->o DAC0 (pin)
18 ; DAC_IPTR1 o------>| |----->o DAC1 (pin)
19 ; DAC_IPTR2 o------>| DAC_VIEW_DRV |----->o DAC2 (pin)
20 ; DAC_IPTR3 o------>| |----->o DAC3 (pin)
21 ; |_______________|
22 ;
23 ; The input variables ( DAC_IPTR0,...etc) are pointers to Data RAM,
24 ; hence any Data RAM variable (in Q15 representation) can be output
25 ; to the DAC. Useful in Real-time mode to change DAC signals on the
26 ; "fly".
27 ;
28 ; Target: 'LF2407/F243/F240 EVM
29 ;
30 ;=====================================================================================
31 ; History:
32 ;-------------------------------------------------------------------------------------
33 ; 9-15-2000 Release Rev 1.0
34 ;===========================================================================
35 ;(To use this Module, copy this section to main system file)
36 ; .ref DAC_VIEW_DRV,DAC_VIEW_DRV_INIT ; function call
37 ; .ref DAC_IPTR0,DAC_IPTR1,DAC_IPTR2,DAC_IPTR3 ; Inputs
38 ;===========================================================================
39 ;Module definitions for external reference.
40 .def DAC_VIEW_DRV,DAC_VIEW_DRV_INIT ; function call
41 .def DAC_IPTR0,DAC_IPTR1,DAC_IPTR2,DAC_IPTR3 ; Inputs
42 ;===========================================================================
43 .include x24x_app.h
44
45 0fff DAC_FLL_RES .set 4095 ; Note: DAC is 12bit res.
46 07ff DAC_HLF_RES .set 2047
47
48 0000 dac_hlf_rng .usect "dac_view",1
49 0001 dac_fll_rng .usect "dac_view",1
50 0002 DAC_IPTR0 .usect "dac_view",1
51 0003 DAC_IPTR1 .usect "dac_view",1
52 0004 DAC_IPTR2 .usect "dac_view",1
53 0005 DAC_IPTR3 .usect "dac_view",1
54 0006 DAC_tmp0 .usect "dac_view",1
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:34:18 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
dac_view.asm PAGE 2
55
56 0000 DAC_VIEW_DRV_INIT:
57 0000 bc00- LDP #dac_hlf_rng
58 0001 ae00- SPLK #DAC_HLF_RES,dac_hlf_rng
0002 07ff
59 0003 ae01- SPLK #DAC_FLL_RES,dac_fll_rng
0004 0fff
60 0005 ae02- SPLK #300h,DAC_IPTR0
0006 0300
61 0007 ae03- SPLK #300h,DAC_IPTR1
0008 0300
62 0009 ae04- SPLK #300h,DAC_IPTR2
000a 0300
63 000b ae05- SPLK #300h,DAC_IPTR3
000c 0300
64 000d ef00 RET
65
66 000e DAC_VIEW_DRV:
67 ;Convert Q15 input value to an absolute Q0 output to DAC0 channel
68 000e bf01 SPM 1
69 000f 8b8e MAR *,AR6
70 0010 bc00- LDP #DAC_IPTR0
71 0011 0602- LAR AR6,DAC_IPTR0
72 0012 7380 LT *
73 0013 5400- MPY dac_hlf_rng ; Normalise to half range of DAC
74 0014 be03 PAC ;
75 0015 6100- ADDH dac_hlf_rng ; offset by 1/2 DAC max value
76 0016 9806- SACH DAC_tmp0
77 0017 0c06- OUT DAC_tmp0,PA0 ; DAC0 o/p
0018 0000
78
79 ;Convert Q15 input value to an absolute Q0 output to DAC1 channel
80 0019 0603- LAR AR6,DAC_IPTR1
81 001a 7380 LT *
82 001b 5400- MPY dac_hlf_rng ; Normalise to half range of DAC
83 001c be03 PAC ;
84 001d 6100- ADDH dac_hlf_rng ; offset by 1/2 DAC max value
85 001e 9806- SACH DAC_tmp0
86 001f 0c06- OUT DAC_tmp0,PA1 ;DAC1 o/p
0020 0001
87
88 ;Convert Q15 input value to an absolute Q0 output to DAC2 channel
89 0021 0604- LAR AR6,DAC_IPTR2
90 0022 7380 LT *
91 0023 5400- MPY dac_hlf_rng ; Normalise to half range of DAC
92 0024 be03 PAC ;
93 0025 6100- ADDH dac_hlf_rng ; offset by 1/2 DAC max value
94 0026 9806- SACH DAC_tmp0
95 0027 0c06- OUT DAC_tmp0,PA2 ;DAC2 o/p
0028 0002
96
97 ;Convert Q15 input value to an absolute Q0 output to DAC3 channel
98 0029 0605- LAR AR6,DAC_IPTR3
99 002a 7380 LT *
TMS320C24xx COFF Assembler Version 7.02 Sun Apr 27 20:34:18 2003
Copyright (c) 1987-2002 Texas Instruments Incorporated
dac_view.asm PAGE 3
100 002b 5400- MPY dac_hlf_rng ; Normalise to half range of DAC
101 002c be03 PAC ;
102 002d 6100- ADDH dac_hlf_rng ; offset by 1/2 DAC max value
103 002e 9806- SACH DAC_tmp0
104 002f 0c06- OUT DAC_tmp0,PA3 ; DAC3 o/p
0030 0003
105 ;update DAC:
106 0031 0c06- OUT DAC_tmp0,PA4 ; here DAC_tmp0 is only a dummy.
0032 0004
107 0033 8b89 mar *,AR1 ; C requirement
108 0034 bf00 SPM 0 ; C requirement
109 0035 ef00 RET
110
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -