📄 pwm.lst
字号:
HI-TECH Software PICC Macro Assembler V9.60PL2
Sun Jan 04 11:02:51 2009
1 processor 16F886
2 opt pw 79
3 psect text1,local,class=CODE,delta=2
4 psect text2,local,class=CODE,delta=2
5 psect rbss_0,global,class=BANK0,space=1,delta=
+ 1
6 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
7 0000
8 0000
9 0000
10 0000
11 0000
12 0000
13 0000
14 0000
15 0000
16 0000
17
18 psect text1
19 1C50 _PwmValueSetup
20 ; _DutyVar assigned to ?a_PwmValueSetup+0
21 0000 _PwmValueSetup$DutyVar set ?a_PwmValueSetup
22 ; _BB assigned to ?a_PwmValueSetup+1
23 0000 _PwmValueSetup$BB set ?a_PwmValueSetup+1
24 ; _Ccpr2Reg assigned to ?a_PwmValueSetup+2
25 0000 _PwmValueSetup$Ccpr2Reg set ?a_PwmValueSetup+2
26 ;_DutyVar stored from w
27 1C50 0183 clrf 3 ;select bank 0
28 1C51 00C3 movwf ?a_PwmValueSetup
29 ;PWM.C: 38: void
30 1C52 300A movlw 10
31 1C53 00F6 movwf btemp+2
32 1C54 01F7 clrf btemp+3
33 1C55 0843 movf ?a_PwmValueSetup,w
34 1C56 00F4 movwf btemp
35 1C57 01F5 clrf btemp+1
36 1C58 160A 158A 240F fcall lwmul
+ 160A 158A
37 1C5D 0878 movf btemp+4,w
38 1C5E 00C5 movwf ?a_PwmValueSetup+2
39 1C5F 0879 movf btemp+5,w
40 1C60 00C6 movwf ?a_PwmValueSetup+3
41 ;PWM.C: 48: BB=Ccpr2Reg&0x03;
42 1C61 0845 movf ?a_PwmValueSetup+2,w
43 1C62 3903 andlw 3
44 1C63 00C4 movwf ?a_PwmValueSetup+1
45 ;PWM.C: 49: BB=BB<<4;
46 1C64 0EC4 swapf ?a_PwmValueSetup+1
47 1C65 30F0 movlw 240
48 1C66 05C4 andwf ?a_PwmValueSetup+1
49 ;PWM.C: 50: CCP2CON|=BB;
50 1C67 0844 movf ?a_PwmValueSetup+1,w
51 1C68 049D iorwf 29 ;volatile
52 ;PWM.C: 51: Ccpr2Reg=Ccpr2Reg>>2;
53 1C69 1003 bcf 3,0
54 1C6A 0CC6 rrf ?a_PwmValueSetup+3
55 1C6B 0CC5 rrf ?a_PwmValueSetup+2
56 1C6C 1003 bcf 3,0
57 1C6D 0CC6 rrf ?a_PwmValueSetup+3
58 1C6E 0CC5 rrf ?a_PwmValueSetup+2
59 ;PWM.C: 52: CCPR2L=Ccpr2Reg&0xff;
60 1C6F 0845 movf ?a_PwmValueSetup+2,w
61 1C70 009B movwf 27 ;volatile
62 ;PWM.C: 53: }
63 1C71 0008 return ;W free
64 1C72 _PwmSetup
65 ; _DutyVar assigned to ?a_PwmSetup+0
66 0000 _PwmSetup$DutyVar set ?a_PwmSetup
67 ;_DutyVar stored from w
68 1C72 0183 clrf 3 ;select bank 0
69 1C73 00C2 movwf ?a_PwmSetup
70 ;PWM.C: 8: void
71 1C74 1683 bsf 3,5
72 1C75 1487 bsf 7,1
73 ;PWM.C: 14: PR2=255;;
74 1C76 30FF movlw -1
75 1C77 0092 movwf 18
76 ;PWM.C: 15: ;
77 1C78 300C movlw 12
78 1C79 1283 bcf 3,5
79 1C7A 009D movwf 29 ;volatile
80 ;PWM.C: 21: PwmValueSetup(DutyVar);
81 1C7B 0842 movf ?a_PwmSetup,w
82 1C7C 2450 160A 158A fcall _PwmValueSetup
83 ;PWM.C: 24: TMR2IF=0;
84 1C7F 108C bcf 12,1
85 ;PWM.C: 25: T2CKPS0=1;
86 1C80 1412 bsf 18,0
87 ;PWM.C: 26: T2CKPS1=1;
88 1C81 1492 bsf 18,1
89 ;PWM.C: 27: TMR2ON=1;
90 1C82 1512 bsf 18,2
91 1C83 l5
92 ;PWM.C: 31: do{}
93 ;PWM.C: 32: while(TMR2IF==0);
94 1C83 1C8C btfss 12,1
95 1C84 2C83 goto l5
96 ;PWM.C: 35: TMR2IF=0;
97 1C85 108C bcf 12,1
98 ;PWM.C: 36: TRISC1=0;
99 1C86 1683 bsf 3,5
100 1C87 1087 bcf 7,1
101 ;PWM.C: 37: }
102 1C88 1283 bcf 3,5
103 1C89 0008 return ;W free
104
105 psect text2
106 0000
107 0000
108 0000
109 0000
110 0000
111 0000
112 0000
113 0000
114 0000
115 0000
116 0000
117 0000
118 0000
119 0000
120 0000
121 0000
122 0000
123 0000
124 0000
125 0000
126 0000
127 0000
128 0000
129 0000
130 0000
131 0000
132 0000
133 0000
134 0000
135 0000
136 0000
137 0000
138 0000
139 0000
140 0000
141 0000
142 0000
143 0000
144 0000
145 0000
146 0000
147 0000
148 0000
149 0000
150 0000
151 0000
152 0000
153 0000
154 0000
155 0000
156 0000
157 0000
158 0000
159 0000
160 0000
161 0000
162 0000
163 0000
164 0000
165 0000
166 0000
167 0000
168 0000
169 0000
170 0000
171 0000
172 0000
173 0000
174 0000
175 0000
176 0000
177 0000
178 0000
179 0000
180 0000
181 0000
182 0000
183 0000
184 0000
185 0000
186 0000
187 0000
188 0000
189 0000
190 0000
191 0000
192 0000
193 0000
194 0000
195 0000
196 0000
197 0000
198 0000
199 0000
200 0000
201 0000
202 0000
203 0000
204 0000
205 0000
206 0000
207 0000
208 0000
209 0000
210 0000
211 0000
212 0000
213 0000
214 0000
215 0000
216 0000
217 0000
218 0000
219 0000
220 0000
221 0000
222 0000
223 0000
224 0000
225 0000
226 0000
227 0000
228 0000
229 0000
230 0000
231 0000
232 0000
233 0000
234 0000
235 0000
236 0000
237 0000
238 0000
239 0000
240 0000
241 0000
242 0000
243 0000
244 0000
245 0000
246 0000
247 0000
248 0000
249 0000
250 0000
251 0000
252 0000
253 0000
254 0000
255 0000
256 0000
257 0000
258 0000
259 0000
260 0000
261 0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -