📄 download.lst
字号:
C51 COMPILER V7.06 DOWNLOAD 03/16/2008 11:09:04 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE DOWNLOAD
OBJECT MODULE PLACED IN DOWNLOAD.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE DOWNLOAD.C DEBUG OBJECTEXTEND PAGE
-WIDTH(79) PAGELENGTH(66)
stmt level source
1
-
-
2 #include <Reg52.h>
3 #include <absacc.h>
4 #include <stdio.h>
5 #include <intrins.h>
6 #include <dspcode.h>
7 /*定义宏*/
8 #define uint unsigned int
9 #define uchar unsigned char
10
11
12 /*定义寄存器端口地址*/
13 //#define HPICL XBYTE[0xe000]
14 //#define HPICH XBYTE[0xe100]
15 //#define WR_HPIL0_D XBYTE[0xe200]
16 //#define WR_HPIH0_D XBYTE[0xe300]
17 //#define WR_HPIL_A XBYTE[0xe400]
18 //#define WR_HPIH_A XBYTE[0xe500]
19 //#define WR_HPIL1_D XBYTE[0xe600]
20 //#define WR_HPIH1_D XBYTE[0xe700]
21
22
23 //my definition
24 sbit DSPRST =P1^6;
25 sbit HCS =P1^0;
26 sbit HBIL =P1^1;
27 sbit HCN0 =P1^2;
28 sbit HCN1 =P1^3;
29 sbit HRW =P1^4;
30 sbit HDS =P1^5;
31
32
33
34 void wr_dspcode();
35 void delay(uint wu);
36
37
38 download()
39 {
40 1
41 1 DSPRST=1;
42 1 HDS=1;
43 1 HCS=1;
44 1
45 1 delay(10000);
46 1
47 1 DSPRST=0;
48 1 delay(1000);
49 1 DSPRST=1; // dsp reset
50 1 delay(10000);
51 1
52 1 HRW=0;
53 1
54 1 wr_dspcode();
C51 COMPILER V7.06 DOWNLOAD 03/16/2008 11:09:04 PAGE 2
55 1
56 1
57 1
58 1 while(1);
59 1
60 1 }
61
62 void delay(uint wu)
63 {
64 1 for(wu;wu>0;wu--);
65 1 }
66
67
68
69
70 void wr_dspcode()
71 {
72 1 uchar code *dspptr/*,*temp*/;
73 1 uchar len;
74 1 char i;
75 1 uint addr;
76 1
77 1 // HPICL=0x08; //clear HPIint,least is first
78 1 // HPICH=0x08;
79 1 HCS=0;
80 1 P2=0x0;
81 1 HBIL=0;
82 1 HCN0=0;
83 1 HCN1=0;
84 1
85 1 HDS=0;
86 1 HDS=1;
87 1
88 1 HBIL=1;
89 1 HDS=0;
90 1 HDS=1;
91 1
92 1
93 1
94 1 dspptr=dspcode;
95 1 while(1)
96 1 {
97 2 len=*dspptr++;
98 2 if(len==0) break;
99 2 else
100 2 {
101 3 addr=((*dspptr++)*256)+(*dspptr++);
102 3
103 3 addr--;
104 3
105 3 P2=addr/256;
106 3 HBIL=0;
107 3 HCN0=0;
108 3 HCN1=1;
109 3 HDS=0;
110 3 HDS=1;
111 3
112 3 // WR_HPIH_A=addr%256;
113 3
114 3 P2=addr%256;
115 3 HBIL=1;
116 3 HDS=0;
117 3 HDS=1;
118 3
C51 COMPILER V7.06 DOWNLOAD 03/16/2008 11:09:04 PAGE 3
119 3 for(i=0;i<len/2;i++)
120 3 {
121 4 //WR_HPIL0_D=*dspptr++;
122 4 P2=*dspptr++;
123 4 HBIL=0;
124 4 HCN0=1;
125 4 HCN1=0;
126 4 HDS=0;
127 4 HDS=1;
128 4
129 4
130 4 // WR_HPIH0_D=*dspptr++;
131 4
132 4 P2=*dspptr++;
133 4 HBIL=1;
134 4 HDS=0;
135 4 HDS=1;
136 4
137 4 }
138 3 }
139 2 }
140 1 // WR_HPIL_A=0x00;
141 1
142 1 P2=0x0;
143 1 HBIL=0;
144 1 HCN0=0;
145 1 HCN1=1;
146 1 HDS=0;
147 1 HDS=1;
148 1
149 1 // WR_HPIH_A=0x7f;
150 1
151 1 P2=0x7f;
152 1
153 1 HBIL=1;
154 1 HDS=0;
155 1 HDS=1;
156 1
157 1 // WR_HPIL1_D=0x00; //THE START ADDRESS OF RUN
158 1
159 1 P2=0x0;
160 1 HBIL=0;
161 1 HCN0=1;
162 1 HCN1=1;
163 1 HDS=0;
164 1 HDS=1;
165 1
166 1 // WR_HPIH1_D=0x80;
167 1
168 1 P2=0x80;
169 1
170 1 HBIL=1;
171 1 HDS=0;
172 1 HDS=1;
173 1
174 1
175 1 HCS=1;
176 1
177 1 }
178
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 295 ----
C51 COMPILER V7.06 DOWNLOAD 03/16/2008 11:09:04 PAGE 4
CONSTANT SIZE = 1247 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 2
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -