Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1755 | - | 1 | 1 .file "timer0.c" |
2 | 2 .arch atmega644p |
||
3 | 3 __SREG__ = 0x3f |
||
4 | 4 __SP_H__ = 0x3e |
||
5 | 5 __SP_L__ = 0x3d |
||
6 | 6 __tmp_reg__ = 0 |
||
7 | 7 __zero_reg__ = 1 |
||
8 | 8 .global __do_copy_data |
||
9 | 9 .global __do_clear_bss |
||
10 | 10 .global ServoRollValue |
||
11 | 11 .global ServoRollValue |
||
12 | 12 .section .bss |
||
13 | 15 ServoRollValue: |
||
14 | 16 0000 0000 .skip 2,0 |
||
15 | 17 .global ServoNickValue |
||
16 | 18 .global ServoNickValue |
||
17 | 21 ServoNickValue: |
||
18 | 22 0002 0000 .skip 2,0 |
||
19 | 23 .global BeepMuster |
||
20 | 24 .data |
||
21 | 27 BeepMuster: |
||
22 | 28 0000 FFFF .word -1 |
||
23 | 29 .global ServoActive |
||
24 | 30 .global ServoActive |
||
25 | 31 .section .bss |
||
26 | 34 ServoActive: |
||
27 | 35 0004 00 .skip 1,0 |
||
28 | 36 .global SendSPI |
||
29 | 37 .global SendSPI |
||
30 | 40 SendSPI: |
||
31 | 41 0005 00 .skip 1,0 |
||
32 | 42 .global beeptime |
||
33 | 43 .global beeptime |
||
34 | 46 beeptime: |
||
35 | 47 0006 0000 .skip 2,0 |
||
36 | 48 .global cntKompass |
||
37 | 49 .global cntKompass |
||
38 | 52 cntKompass: |
||
39 | 53 0008 0000 .skip 2,0 |
||
40 | 54 .global UpdateMotor |
||
41 | 55 .global UpdateMotor |
||
42 | 58 UpdateMotor: |
||
43 | 59 000a 00 .skip 1,0 |
||
44 | 60 .global CountMilliseconds |
||
45 | 61 .global CountMilliseconds |
||
46 | 64 CountMilliseconds: |
||
47 | 65 000b 0000 .skip 2,0 |
||
48 | 66 .data |
||
49 | 69 CameraShutterCycleOnCount: |
||
50 | 70 0002 1400 .word 20 |
||
51 | 71 .lcomm CameraShutterCycleCounter,2 |
||
52 | 72 .lcomm CameraShutterCycle,2 |
||
53 | 75 cnt_1ms.6: |
||
54 | 76 0004 01 .byte 1 |
||
55 | 77 .lcomm cnt.7,1 |
||
56 | 78 .lcomm compass_active.8,1 |
||
57 | 79 .text |
||
58 | 80 .global __vector_18 |
||
59 | 82 __vector_18: |
||
60 | 83 /* prologue: frame size=0 */ |
||
61 | 84 0000 1F92 push __zero_reg__ |
||
62 | 85 0002 0F92 push __tmp_reg__ |
||
63 | 86 0004 0FB6 in __tmp_reg__,__SREG__ |
||
64 | 87 0006 0F92 push __tmp_reg__ |
||
65 | 88 0008 1124 clr __zero_reg__ |
||
66 | 89 000a 2F93 push r18 |
||
67 | 90 000c 3F93 push r19 |
||
68 | 91 000e 5F93 push r21 |
||
69 | 92 0010 6F93 push r22 |
||
70 | 93 0012 7F93 push r23 |
||
71 | 94 0014 8F93 push r24 |
||
72 | 95 0016 9F93 push r25 |
||
73 | 96 0018 AF93 push r26 |
||
74 | 97 001a BF93 push r27 |
||
75 | 98 001c EF93 push r30 |
||
76 | 99 001e FF93 push r31 |
||
77 | 100 /* prologue end (size=16) */ |
||
78 | 101 0020 20E0 ldi r18,lo8(0) |
||
79 | 102 0022 8091 0000 lds r24,SendSPI |
||
80 | 103 0026 8823 tst r24 |
||
81 | 104 0028 29F0 breq .L2 |
||
82 | 105 002a 8091 0000 lds r24,SendSPI |
||
83 | 106 002e 8150 subi r24,lo8(-(-1)) |
||
84 | 107 0030 8093 0000 sts SendSPI,r24 |
||
85 | 108 .L2: |
||
86 | 109 0034 8091 0000 lds r24,SpektrumTimer |
||
87 | 110 0038 8823 tst r24 |
||
88 | 111 003a 19F0 breq .L3 |
||
89 | 112 003c 8150 subi r24,lo8(-(-1)) |
||
90 | 113 003e 8093 0000 sts SpektrumTimer,r24 |
||
91 | 114 .L3: |
||
92 | 115 0042 8091 0000 lds r24,cnt.7 |
||
93 | 116 0046 8150 subi r24,lo8(-(-1)) |
||
94 | 117 0048 8093 0000 sts cnt.7,r24 |
||
95 | 118 004c 8F3F cpi r24,lo8(-1) |
||
96 | 119 004e 09F0 breq .+2 |
||
97 | 120 0050 5BC0 rjmp .L4 |
||
98 | 121 0052 89E0 ldi r24,lo8(9) |
||
99 | 122 0054 8093 0000 sts cnt.7,r24 |
||
100 | 123 0058 8091 0000 lds r24,CountMilliseconds |
||
101 | 124 005c 9091 0000 lds r25,(CountMilliseconds)+1 |
||
102 | 125 0060 0196 adiw r24,1 |
||
103 | 126 0062 9093 0000 sts (CountMilliseconds)+1,r25 |
||
104 | 127 0066 8093 0000 sts CountMilliseconds,r24 |
||
105 | 128 006a 8091 0000 lds r24,cnt_1ms.6 |
||
106 | 129 006e 8F5F subi r24,lo8(-(1)) |
||
107 | 130 0070 8170 andi r24,lo8(1) |
||
108 | 131 0072 8093 0000 sts cnt_1ms.6,r24 |
||
109 | 132 0076 8823 tst r24 |
||
110 | 133 0078 19F4 brne .L5 |
||
111 | 134 007a 81E0 ldi r24,lo8(1) |
||
112 | 135 007c 8093 0000 sts UpdateMotor,r24 |
||
113 | 136 .L5: |
||
114 | 137 0080 3499 sbic 38-0x20,4 |
||
115 | 138 0082 03C0 rjmp .L6 |
||
116 | 139 0084 81E0 ldi r24,lo8(1) |
||
117 | 140 0086 8093 0000 sts compass_active.8,r24 |
||
118 | 141 .L6: |
||
119 | 142 008a 8091 0000 lds r24,beeptime |
||
120 | 143 008e 9091 0000 lds r25,(beeptime)+1 |
||
121 | 144 0092 892B or r24,r25 |
||
122 | 145 0094 21F1 breq .L7 |
||
123 | 146 0096 8091 0000 lds r24,beeptime |
||
124 | 147 009a 9091 0000 lds r25,(beeptime)+1 |
||
125 | 148 009e 0B97 sbiw r24,11 |
||
126 | 149 00a0 50F0 brlo .L8 |
||
127 | 150 00a2 8091 0000 lds r24,beeptime |
||
128 | 151 00a6 9091 0000 lds r25,(beeptime)+1 |
||
129 | 152 00aa 0A97 sbiw r24,10 |
||
130 | 153 00ac 9093 0000 sts (beeptime)+1,r25 |
||
131 | 154 00b0 8093 0000 sts beeptime,r24 |
||
132 | 155 00b4 04C0 rjmp .L9 |
||
133 | 156 .L8: |
||
134 | 157 00b6 1092 0000 sts (beeptime)+1,__zero_reg__ |
||
135 | 158 00ba 1092 0000 sts beeptime,__zero_reg__ |
||
136 | 159 .L9: |
||
137 | 160 00be 8091 0000 lds r24,beeptime |
||
138 | 161 00c2 9091 0000 lds r25,(beeptime)+1 |
||
139 | 162 00c6 2091 0000 lds r18,BeepMuster |
||
140 | 163 00ca 3091 0000 lds r19,(BeepMuster)+1 |
||
141 | 164 00ce 8223 and r24,r18 |
||
142 | 165 00d0 9323 and r25,r19 |
||
143 | 166 00d2 892B or r24,r25 |
||
144 | 167 00d4 11F0 breq .L10 |
||
145 | 168 00d6 21E0 ldi r18,lo8(1) |
||
146 | 169 00d8 08C0 rjmp .L12 |
||
147 | 170 .L10: |
||
148 | 171 00da 20E0 ldi r18,lo8(0) |
||
149 | 172 00dc 06C0 rjmp .L12 |
||
150 | 173 .L7: |
||
151 | 174 00de 8FEF ldi r24,lo8(-1) |
||
152 | 175 00e0 9FEF ldi r25,hi8(-1) |
||
153 | 176 00e2 9093 0000 sts (BeepMuster)+1,r25 |
||
154 | 177 00e6 8093 0000 sts BeepMuster,r24 |
||
155 | 178 .L12: |
||
156 | 179 00ea 8091 0000 lds r24,PlatinenVersion |
||
157 | 180 00ee 2223 tst r18 |
||
158 | 181 00f0 31F0 breq .L13 |
||
159 | 182 00f2 8A30 cpi r24,lo8(10) |
||
160 | 183 00f4 11F4 brne .L14 |
||
161 | 184 00f6 5A9A sbi 43-0x20,2 |
||
162 | 185 00f8 07C0 rjmp .L4 |
||
163 | 186 .L14: |
||
164 | 187 00fa 479A sbi 40-0x20,7 |
||
165 | 188 00fc 05C0 rjmp .L4 |
||
166 | 189 .L13: |
||
167 | 190 00fe 8A30 cpi r24,lo8(10) |
||
168 | 191 0100 11F4 brne .L17 |
||
169 | 192 0102 5A98 cbi 43-0x20,2 |
||
170 | 193 0104 01C0 rjmp .L4 |
||
171 | 194 .L17: |
||
172 | 195 0106 4798 cbi 40-0x20,7 |
||
173 | 196 .L4: |
||
174 | 197 0108 8091 0000 lds r24,compass_active.8 |
||
175 | 198 010c 8823 tst r24 |
||
176 | 199 010e 09F4 brne .+2 |
||
177 | 200 0110 72C0 rjmp .L1 |
||
178 | 201 0112 2091 0000 lds r18,NaviDataOkay |
||
179 | 202 0116 2223 tst r18 |
||
180 | 203 0118 09F0 breq .+2 |
||
181 | 204 011a 6DC0 rjmp .L1 |
||
182 | 205 011c 8091 0000 lds r24,EE_Parameter+13 |
||
183 | 206 0120 83FF sbrs r24,3 |
||
184 | 207 0122 69C0 rjmp .L1 |
||
185 | 208 0124 86B1 in r24,38-0x20 |
||
186 | 209 0126 9927 clr r25 |
||
187 | 210 0128 FC01 movw r30,r24 |
||
188 | 211 012a E071 andi r30,lo8(16) |
||
189 | 212 012c F070 andi r31,hi8(16) |
||
190 | 213 012e 84FF sbrs r24,4 |
||
191 | 214 0130 14C0 rjmp .L20 |
||
192 | 215 0132 8091 0000 lds r24,cntKompass |
||
193 | 216 0136 9091 0000 lds r25,(cntKompass)+1 |
||
194 | 217 013a 0196 adiw r24,1 |
||
195 | 218 013c 9093 0000 sts (cntKompass)+1,r25 |
||
196 | 219 0140 8093 0000 sts cntKompass,r24 |
||
197 | 220 0144 8091 0000 lds r24,cntKompass |
||
198 | 221 0148 9091 0000 lds r25,(cntKompass)+1 |
||
199 | 222 014c 895E subi r24,lo8(1001) |
||
200 | 223 014e 9340 sbci r25,hi8(1001) |
||
201 | 224 0150 08F4 brsh .+2 |
||
202 | 225 0152 51C0 rjmp .L1 |
||
203 | 226 0154 2093 0000 sts compass_active.8,r18 |
||
204 | 227 0158 4EC0 rjmp .L1 |
||
205 | 228 .L20: |
||
206 | 229 015a 8091 0000 lds r24,cntKompass |
||
207 | 230 015e 9091 0000 lds r25,(cntKompass)+1 |
||
208 | 231 0162 892B or r24,r25 |
||
209 | 232 0164 09F4 brne .+2 |
||
210 | 233 0166 43C0 rjmp .L23 |
||
211 | 234 0168 8091 0000 lds r24,cntKompass |
||
212 | 235 016c 9091 0000 lds r25,(cntKompass)+1 |
||
213 | 236 0170 8A56 subi r24,lo8(362) |
||
214 | 237 0172 9140 sbci r25,hi8(362) |
||
215 | 238 0174 E0F5 brsh .L23 |
||
216 | 239 0176 8091 0000 lds r24,cntKompass |
||
217 | 240 017a 9091 0000 lds r25,(cntKompass)+1 |
||
218 | 241 017e 69E2 ldi r22,lo8(41) |
||
219 | 242 0180 70E0 ldi r23,hi8(41) |
||
220 | 243 0182 0E94 0000 call __udivmodhi4 |
||
221 | 244 0186 8091 0000 lds r24,cntKompass |
||
222 | 245 018a 9091 0000 lds r25,(cntKompass)+1 |
||
223 | 246 018e 860F add r24,r22 |
||
224 | 247 0190 971F adc r25,r23 |
||
225 | 248 0192 9093 0000 sts (cntKompass)+1,r25 |
||
226 | 249 0196 8093 0000 sts cntKompass,r24 |
||
227 | 250 019a 8091 0000 lds r24,cntKompass |
||
228 | 251 019e 9091 0000 lds r25,(cntKompass)+1 |
||
229 | 252 01a2 0B97 sbiw r24,11 |
||
230 | 253 01a4 50F0 brlo .L24 |
||
231 | 254 01a6 8091 0000 lds r24,cntKompass |
||
232 | 255 01aa 9091 0000 lds r25,(cntKompass)+1 |
||
233 | 256 01ae 0A97 sbiw r24,10 |
||
234 | 257 01b0 9093 0000 sts (KompassValue)+1,r25 |
||
235 | 258 01b4 8093 0000 sts KompassValue,r24 |
||
236 | 259 01b8 04C0 rjmp .L25 |
||
237 | 260 .L24: |
||
238 | 261 01ba F093 0000 sts (KompassValue)+1,r31 |
||
239 | 262 01be E093 0000 sts KompassValue,r30 |
||
240 | 263 .L25: |
||
241 | 264 01c2 8091 0000 lds r24,KompassValue |
||
242 | 265 01c6 9091 0000 lds r25,(KompassValue)+1 |
||
243 | 266 01ca 2091 0000 lds r18,KompassStartwert |
||
244 | 267 01ce 3091 0000 lds r19,(KompassStartwert)+1 |
||
245 | 268 01d2 821B sub r24,r18 |
||
246 | 269 01d4 930B sbc r25,r19 |
||
247 | 270 01d6 845E subi r24,lo8(-(540)) |
||
248 | 271 01d8 9D4F sbci r25,hi8(-(540)) |
||
249 | 272 01da 68E6 ldi r22,lo8(360) |
||
250 | 273 01dc 71E0 ldi r23,hi8(360) |
||
251 | 274 01de 0E94 0000 call __divmodhi4 |
||
252 | 275 01e2 845B subi r24,lo8(-(-180)) |
||
253 | 276 01e4 9040 sbci r25,hi8(-(-180)) |
||
254 | 277 01e6 9093 0000 sts (KompassRichtung)+1,r25 |
||
255 | 278 01ea 8093 0000 sts KompassRichtung,r24 |
||
256 | 279 .L23: |
||
257 | 280 01ee 1092 0000 sts (cntKompass)+1,__zero_reg__ |
||
258 | 281 01f2 1092 0000 sts cntKompass,__zero_reg__ |
||
259 | 282 .L1: |
||
260 | 283 /* epilogue: frame size=0 */ |
||
261 | 284 01f6 FF91 pop r31 |
||
262 | 285 01f8 EF91 pop r30 |
||
263 | 286 01fa BF91 pop r27 |
||
264 | 287 01fc AF91 pop r26 |
||
265 | 288 01fe 9F91 pop r25 |
||
266 | 289 0200 8F91 pop r24 |
||
267 | 290 0202 7F91 pop r23 |
||
268 | 291 0204 6F91 pop r22 |
||
269 | 292 0206 5F91 pop r21 |
||
270 | 293 0208 3F91 pop r19 |
||
271 | 294 020a 2F91 pop r18 |
||
272 | 295 020c 0F90 pop __tmp_reg__ |
||
273 | 296 020e 0FBE out __SREG__,__tmp_reg__ |
||
274 | 297 0210 0F90 pop __tmp_reg__ |
||
275 | 298 0212 1F90 pop __zero_reg__ |
||
276 | 299 0214 1895 reti |
||
277 | 300 /* epilogue end (size=16) */ |
||
278 | 301 /* function __vector_18 size 271 (239) */ |
||
279 | 303 .global SetDelay |
||
280 | 305 SetDelay: |
||
281 | 306 /* prologue: frame size=0 */ |
||
282 | 307 /* prologue end (size=0) */ |
||
283 | 308 0216 2091 0000 lds r18,CountMilliseconds |
||
284 | 309 021a 3091 0000 lds r19,(CountMilliseconds)+1 |
||
285 | 310 021e 280F add r18,r24 |
||
286 | 311 0220 391F adc r19,r25 |
||
287 | 312 0222 C901 movw r24,r18 |
||
288 | 313 0224 0196 adiw r24,1 |
||
289 | 314 /* epilogue: frame size=0 */ |
||
290 | 315 0226 0895 ret |
||
291 | 316 /* epilogue end (size=1) */ |
||
292 | 317 /* function SetDelay size 9 (8) */ |
||
293 | 319 .global CheckDelay |
||
294 | 321 CheckDelay: |
||
295 | 322 /* prologue: frame size=0 */ |
||
296 | 323 /* prologue end (size=0) */ |
||
297 | 324 0228 2091 0000 lds r18,CountMilliseconds |
||
298 | 325 022c 3091 0000 lds r19,(CountMilliseconds)+1 |
||
299 | 326 0230 821B sub r24,r18 |
||
300 | 327 0232 930B sbc r25,r19 |
||
301 | 328 0234 892F mov r24,r25 |
||
302 | 329 0236 9927 clr r25 |
||
303 | 330 0238 8695 lsr r24 |
||
304 | 331 023a 8074 andi r24,lo8(64) |
||
305 | 332 023c 9070 andi r25,hi8(64) |
||
306 | 333 /* epilogue: frame size=0 */ |
||
307 | 334 023e 0895 ret |
||
308 | 335 /* epilogue end (size=1) */ |
||
309 | 336 /* function CheckDelay size 12 (11) */ |
||
310 | 338 .global Delay_ms |
||
311 | 340 Delay_ms: |
||
312 | 341 /* prologue: frame size=0 */ |
||
313 | 342 0240 CF93 push r28 |
||
314 | 343 0242 DF93 push r29 |
||
315 | 344 /* prologue end (size=2) */ |
||
316 | 345 0244 0E94 0000 call SetDelay |
||
317 | 346 0248 EC01 movw r28,r24 |
||
318 | 347 .L29: |
||
319 | 348 024a CE01 movw r24,r28 |
||
320 | 349 024c 0E94 0000 call CheckDelay |
||
321 | 350 0250 8823 tst r24 |
||
322 | 351 0252 D9F3 breq .L29 |
||
323 | 352 /* epilogue: frame size=0 */ |
||
324 | 353 0254 DF91 pop r29 |
||
325 | 354 0256 CF91 pop r28 |
||
326 | 355 0258 0895 ret |
||
327 | 356 /* epilogue end (size=3) */ |
||
328 | 357 /* function Delay_ms size 13 (8) */ |
||
329 | 359 .global Delay_ms_Mess |
||
330 | 361 Delay_ms_Mess: |
||
331 | 362 /* prologue: frame size=0 */ |
||
332 | 363 025a CF93 push r28 |
||
333 | 364 025c DF93 push r29 |
||
334 | 365 /* prologue end (size=2) */ |
||
335 | 366 025e 0E94 0000 call SetDelay |
||
336 | 367 0262 EC01 movw r28,r24 |
||
337 | 368 0264 09C0 rjmp .L40 |
||
338 | 369 .L36: |
||
339 | 370 0266 8091 0000 lds r24,AdReady |
||
340 | 371 026a 8823 tst r24 |
||
341 | 372 026c 29F0 breq .L40 |
||
342 | 373 026e 9093 0000 sts AdReady,r25 |
||
343 | 374 0272 8FEC ldi r24,lo8(-49) |
||
344 | 375 0274 8093 7A00 sts 122,r24 |
||
345 | 376 .L40: |
||
346 | 377 0278 CE01 movw r24,r28 |
||
347 | 378 027a 0E94 0000 call CheckDelay |
||
348 | 379 027e 982F mov r25,r24 |
||
349 | 380 0280 8823 tst r24 |
||
350 | 381 0282 89F3 breq .L36 |
||
351 | 382 /* epilogue: frame size=0 */ |
||
352 | 383 0284 DF91 pop r29 |
||
353 | 384 0286 CF91 pop r28 |
||
354 | 385 0288 0895 ret |
||
355 | 386 /* epilogue end (size=3) */ |
||
356 | 387 /* function Delay_ms_Mess size 24 (19) */ |
||
357 | 389 .global TIMER2_Init |
||
358 | 391 TIMER2_Init: |
||
359 | 392 /* prologue: frame size=0 */ |
||
360 | 393 /* prologue end (size=0) */ |
||
361 | 394 028a 4FB7 in r20,95-0x20 |
||
362 | 395 028c 8091 0000 lds r24,Parameter_UserParam8 |
||
363 | 396 0290 282F mov r18,r24 |
||
364 | 397 0292 3327 clr r19 |
||
365 | 398 0294 2F77 andi r18,lo8(127) |
||
366 | 399 0296 3070 andi r19,hi8(127) |
||
367 | 400 0298 C901 movw r24,r18 |
||
368 | 401 029a 880F lsl r24 |
||
369 | 402 029c 991F rol r25 |
||
370 | 403 029e 880F lsl r24 |
||
371 | 404 02a0 991F rol r25 |
||
372 | 405 02a2 820F add r24,r18 |
||
373 | 406 02a4 931F adc r25,r19 |
||
374 | 407 02a6 9093 0000 sts (CameraShutterCycle)+1,r25 |
||
375 | 408 02aa 8093 0000 sts CameraShutterCycle,r24 |
||
376 | 409 /* #APP */ |
||
377 | 410 02ae F894 cli |
||
378 | 411 /* #NOAPP */ |
||
379 | 412 02b0 5F98 cbi 43-0x20,7 |
||
380 | 413 02b2 3E9A sbi 39-0x20,6 |
||
381 | 414 02b4 469A sbi 40-0x20,6 |
||
382 | 415 02b6 8091 B000 lds r24,176 |
||
383 | 416 02ba 8F70 andi r24,lo8(15) |
||
384 | 417 02bc 8093 B000 sts 176,r24 |
||
385 | 418 02c0 8091 B000 lds r24,176 |
||
386 | 419 02c4 8360 ori r24,lo8(3) |
||
387 | 420 02c6 8093 B000 sts 176,r24 |
||
388 | 421 02ca 8091 B100 lds r24,177 |
||
389 | 422 02ce 8B73 andi r24,lo8(59) |
||
390 | 423 02d0 8093 B100 sts 177,r24 |
||
391 | 424 02d4 8091 B100 lds r24,177 |
||
392 | 425 02d8 8B60 ori r24,lo8(11) |
||
393 | 426 02da 8093 B100 sts 177,r24 |
||
394 | 427 02de 1092 B200 sts 178,__zero_reg__ |
||
395 | 428 02e2 8FEF ldi r24,lo8(-1) |
||
396 | 429 02e4 8093 B300 sts 179,r24 |
||
397 | 430 02e8 8091 B000 lds r24,176 |
||
398 | 431 02ec 8068 ori r24,lo8(-128) |
||
399 | 432 02ee 8093 B000 sts 176,r24 |
||
400 | 433 02f2 8091 7000 lds r24,112 |
||
401 | 434 02f6 8A7F andi r24,lo8(-6) |
||
402 | 435 02f8 8093 7000 sts 112,r24 |
||
403 | 436 02fc 8091 7000 lds r24,112 |
||
404 | 437 0300 8260 ori r24,lo8(2) |
||
405 | 438 0302 8093 7000 sts 112,r24 |
||
406 | 439 0306 4FBF out 95-0x20,r20 |
||
407 | 440 /* epilogue: frame size=0 */ |
||
408 | 441 0308 0895 ret |
||
409 | 442 /* epilogue end (size=1) */ |
||
410 | 443 /* function TIMER2_Init size 65 (64) */ |
||
411 | 445 .global Timer_Init |
||
412 | 447 Timer_Init: |
||
413 | 448 /* prologue: frame size=0 */ |
||
414 | 449 /* prologue end (size=0) */ |
||
415 | 450 030a 8AE0 ldi r24,lo8(10) |
||
416 | 451 030c 90E0 ldi r25,hi8(10) |
||
417 | 452 030e 0E94 0000 call SetDelay |
||
418 | 453 0312 9093 0000 sts (tim_main)+1,r25 |
||
419 | 454 0316 8093 0000 sts tim_main,r24 |
||
420 | 455 031a 82E0 ldi r24,lo8(2) |
||
421 | 456 031c 85BD out 69-0x20,r24 |
||
422 | 457 031e 83EA ldi r24,lo8(-93) |
||
423 | 458 0320 84BD out 68-0x20,r24 |
||
424 | 459 0322 17BC out 71-0x20,__zero_reg__ |
||
425 | 460 0324 84EB ldi r24,lo8(-76) |
||
426 | 461 0326 88BD out 72-0x20,r24 |
||
427 | 462 0328 86E0 ldi r24,lo8(6) |
||
428 | 463 032a 86BD out 70-0x20,r24 |
||
429 | 464 032c 8091 6E00 lds r24,110 |
||
430 | 465 0330 8160 ori r24,lo8(1) |
||
431 | 466 0332 8093 6E00 sts 110,r24 |
||
432 | 467 /* epilogue: frame size=0 */ |
||
433 | 468 0336 0895 ret |
||
434 | 469 /* epilogue end (size=1) */ |
||
435 | 470 /* function Timer_Init size 23 (22) */ |
||
436 | 472 .lcomm PulseOutput.0,1 |
||
437 | 473 .lcomm RemainingPulse.1,2 |
||
438 | 474 .lcomm ServoFrameTime.2,2 |
||
439 | 475 .lcomm ServoIndex.3,1 |
||
440 | 476 .data |
||
441 | 479 ServoNickOffset.4: |
||
442 | 480 0005 FC01 .word 508 |
||
443 | 483 ServoRollOffset.5: |
||
444 | 484 0007 FC01 .word 508 |
||
445 | 485 .text |
||
446 | 486 .global __vector_9 |
||
447 | 488 __vector_9: |
||
448 | 489 /* prologue: frame size=0 */ |
||
449 | 490 0338 1F92 push __zero_reg__ |
||
450 | 491 033a 0F92 push __tmp_reg__ |
||
451 | 492 033c 0FB6 in __tmp_reg__,__SREG__ |
||
452 | 493 033e 0F92 push __tmp_reg__ |
||
453 | 494 0340 1124 clr __zero_reg__ |
||
454 | 495 0342 2F93 push r18 |
||
455 | 496 0344 3F93 push r19 |
||
456 | 497 0346 4F93 push r20 |
||
457 | 498 0348 5F93 push r21 |
||
458 | 499 034a 6F93 push r22 |
||
459 | 500 034c 7F93 push r23 |
||
460 | 501 034e 8F93 push r24 |
||
461 | 502 0350 9F93 push r25 |
||
462 | 503 0352 AF93 push r26 |
||
463 | 504 0354 BF93 push r27 |
||
464 | 505 0356 CF93 push r28 |
||
465 | 506 0358 DF93 push r29 |
||
466 | 507 035a EF93 push r30 |
||
467 | 508 035c FF93 push r31 |
||
468 | 509 /* prologue end (size=19) */ |
||
469 | 510 035e 8091 0000 lds r24,PlatinenVersion |
||
470 | 511 0362 8431 cpi r24,lo8(20) |
||
471 | 512 0364 08F0 brlo .+2 |
||
472 | 513 0366 17C1 rjmp .L44 |
||
473 | 514 0368 8091 0000 lds r24,Parameter_UserParam8 |
||
474 | 515 036c 87FD sbrc r24,7 |
||
475 | 516 036e 13C1 rjmp .L44 |
||
476 | 517 0370 8091 0000 lds r24,PulseOutput.0 |
||
477 | 518 0374 8823 tst r24 |
||
478 | 519 0376 09F0 breq .+2 |
||
479 | 520 0378 AEC3 rjmp .L62 |
||
480 | 521 037a 8091 B000 lds r24,176 |
||
481 | 522 037e 86FF sbrs r24,6 |
||
482 | 523 0380 ECC0 rjmp .L46 |
||
483 | 524 0382 8091 B000 lds r24,176 |
||
484 | 525 0386 8F7B andi r24,lo8(-65) |
||
485 | 526 0388 8093 B000 sts 176,r24 |
||
486 | 527 038c 89EA ldi r24,lo8(937) |
||
487 | 528 038e 93E0 ldi r25,hi8(937) |
||
488 | 529 0390 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
489 | 530 0394 8093 0000 sts RemainingPulse.1,r24 |
||
490 | 531 0398 8091 0000 lds r24,ServoNickOffset.4 |
||
491 | 532 039c 9091 0000 lds r25,(ServoNickOffset.4)+1 |
||
492 | 533 03a0 9C01 movw r18,r24 |
||
493 | 534 03a2 220F lsl r18 |
||
494 | 535 03a4 331F rol r19 |
||
495 | 536 03a6 280F add r18,r24 |
||
496 | 537 03a8 391F adc r19,r25 |
||
497 | 538 03aa 8091 0000 lds r24,Parameter_ServoNickControl |
||
498 | 539 03ae 9927 clr r25 |
||
499 | 540 03b0 880F lsl r24 |
||
500 | 541 03b2 991F rol r25 |
||
501 | 542 03b4 880F lsl r24 |
||
502 | 543 03b6 991F rol r25 |
||
503 | 544 03b8 280F add r18,r24 |
||
504 | 545 03ba 391F adc r19,r25 |
||
505 | 546 03bc 37FF sbrs r19,7 |
||
506 | 547 03be 02C0 rjmp .L47 |
||
507 | 548 03c0 2D5F subi r18,lo8(-(3)) |
||
508 | 549 03c2 3F4F sbci r19,hi8(-(3)) |
||
509 | 550 .L47: |
||
510 | 551 03c4 C901 movw r24,r18 |
||
511 | 552 03c6 9595 asr r25 |
||
512 | 553 03c8 8795 ror r24 |
||
513 | 554 03ca 9595 asr r25 |
||
514 | 555 03cc 8795 ror r24 |
||
515 | 556 03ce 9093 0000 sts (ServoNickOffset.4)+1,r25 |
||
516 | 557 03d2 8093 0000 sts ServoNickOffset.4,r24 |
||
517 | 558 03d6 9093 0000 sts (ServoNickValue)+1,r25 |
||
518 | 559 03da 8093 0000 sts ServoNickValue,r24 |
||
519 | 560 03de 8091 0000 lds r24,EE_Parameter+98 |
||
520 | 561 03e2 6091 0000 lds r22,EE_Parameter+46 |
||
521 | 562 03e6 2091 0000 lds r18,IntegralNick |
||
522 | 563 03ea 3091 0000 lds r19,(IntegralNick)+1 |
||
523 | 564 03ee 4091 0000 lds r20,(IntegralNick)+2 |
||
524 | 565 03f2 5091 0000 lds r21,(IntegralNick)+3 |
||
525 | 566 03f6 80FF sbrs r24,0 |
||
526 | 567 03f8 2CC0 rjmp .L48 |
||
527 | 568 03fa 7727 clr r23 |
||
528 | 569 03fc 8827 clr r24 |
||
529 | 570 03fe 9927 clr r25 |
||
530 | 571 0400 EA01 movw r28,r20 |
||
531 | 572 0402 D901 movw r26,r18 |
||
532 | 573 0404 57FF sbrs r21,7 |
||
533 | 574 0406 04C0 rjmp .L49 |
||
534 | 575 0408 A158 subi r26,lo8(-(127)) |
||
535 | 576 040a BF4F sbci r27,hi8(-(127)) |
||
536 | 577 040c CF4F sbci r28,hlo8(-(127)) |
||
537 | 578 040e DF4F sbci r29,hhi8(-(127)) |
||
538 | 579 .L49: |
||
539 | 580 0410 E7E0 ldi r30,7 |
||
540 | 581 0412 D595 1: asr r29 |
||
541 | 582 0414 C795 ror r28 |
||
542 | 583 0416 B795 ror r27 |
||
543 | 584 0418 A795 ror r26 |
||
544 | 585 041a EA95 dec r30 |
||
545 | 586 041c D1F7 brne 1b |
||
546 | 587 041e 9D01 movw r18,r26 |
||
547 | 588 0420 AE01 movw r20,r28 |
||
548 | 589 0422 0E94 0000 call __mulsi3 |
||
549 | 590 0426 9B01 movw r18,r22 |
||
550 | 591 0428 AC01 movw r20,r24 |
||
551 | 592 042a 97FF sbrs r25,7 |
||
552 | 593 042c 04C0 rjmp .L50 |
||
553 | 594 042e 215C subi r18,lo8(-(63)) |
||
554 | 595 0430 3F4F sbci r19,hi8(-(63)) |
||
555 | 596 0432 4F4F sbci r20,hlo8(-(63)) |
||
556 | 597 0434 5F4F sbci r21,hhi8(-(63)) |
||
557 | 598 .L50: |
||
558 | 599 0436 66E0 ldi r22,6 |
||
559 | 600 0438 5595 1: asr r21 |
||
560 | 601 043a 4795 ror r20 |
||
561 | 602 043c 3795 ror r19 |
||
562 | 603 043e 2795 ror r18 |
||
563 | 604 0440 6A95 dec r22 |
||
564 | 605 0442 D1F7 brne 1b |
||
565 | 606 0444 8091 0000 lds r24,ServoNickValue |
||
566 | 607 0448 9091 0000 lds r25,(ServoNickValue)+1 |
||
567 | 608 044c 820F add r24,r18 |
||
568 | 609 044e 931F adc r25,r19 |
||
569 | 610 0450 2BC0 rjmp .L121 |
||
570 | 611 .L48: |
||
571 | 612 0452 7727 clr r23 |
||
572 | 613 0454 8827 clr r24 |
||
573 | 614 0456 9927 clr r25 |
||
574 | 615 0458 EA01 movw r28,r20 |
||
575 | 616 045a D901 movw r26,r18 |
||
576 | 617 045c 57FF sbrs r21,7 |
||
577 | 618 045e 04C0 rjmp .L52 |
||
578 | 619 0460 A158 subi r26,lo8(-(127)) |
||
579 | 620 0462 BF4F sbci r27,hi8(-(127)) |
||
580 | 621 0464 CF4F sbci r28,hlo8(-(127)) |
||
581 | 622 0466 DF4F sbci r29,hhi8(-(127)) |
||
582 | 623 .L52: |
||
583 | 624 0468 27E0 ldi r18,7 |
||
584 | 625 046a D595 1: asr r29 |
||
585 | 626 046c C795 ror r28 |
||
586 | 627 046e B795 ror r27 |
||
587 | 628 0470 A795 ror r26 |
||
588 | 629 0472 2A95 dec r18 |
||
589 | 630 0474 D1F7 brne 1b |
||
590 | 631 0476 9D01 movw r18,r26 |
||
591 | 632 0478 AE01 movw r20,r28 |
||
592 | 633 047a 0E94 0000 call __mulsi3 |
||
593 | 634 047e 9B01 movw r18,r22 |
||
594 | 635 0480 AC01 movw r20,r24 |
||
595 | 636 0482 97FF sbrs r25,7 |
||
596 | 637 0484 04C0 rjmp .L53 |
||
597 | 638 0486 215C subi r18,lo8(-(63)) |
||
598 | 639 0488 3F4F sbci r19,hi8(-(63)) |
||
599 | 640 048a 4F4F sbci r20,hlo8(-(63)) |
||
600 | 641 048c 5F4F sbci r21,hhi8(-(63)) |
||
601 | 642 .L53: |
||
602 | 643 048e F6E0 ldi r31,6 |
||
603 | 644 0490 5595 1: asr r21 |
||
604 | 645 0492 4795 ror r20 |
||
605 | 646 0494 3795 ror r19 |
||
606 | 647 0496 2795 ror r18 |
||
607 | 648 0498 FA95 dec r31 |
||
608 | 649 049a D1F7 brne 1b |
||
609 | 650 049c 8091 0000 lds r24,ServoNickValue |
||
610 | 651 04a0 9091 0000 lds r25,(ServoNickValue)+1 |
||
611 | 652 04a4 821B sub r24,r18 |
||
612 | 653 04a6 930B sbc r25,r19 |
||
613 | 654 .L121: |
||
614 | 655 04a8 9093 0000 sts (ServoNickValue)+1,r25 |
||
615 | 656 04ac 8093 0000 sts ServoNickValue,r24 |
||
616 | 657 04b0 8091 0000 lds r24,EE_Parameter+47 |
||
617 | 658 04b4 282F mov r18,r24 |
||
618 | 659 04b6 3327 clr r19 |
||
619 | 660 04b8 220F lsl r18 |
||
620 | 661 04ba 331F rol r19 |
||
621 | 662 04bc 220F lsl r18 |
||
622 | 663 04be 331F rol r19 |
||
623 | 664 04c0 8091 0000 lds r24,ServoNickValue |
||
624 | 665 04c4 9091 0000 lds r25,(ServoNickValue)+1 |
||
625 | 666 04c8 8217 cp r24,r18 |
||
626 | 667 04ca 9307 cpc r25,r19 |
||
627 | 668 04cc 7CF0 brlt .L122 |
||
628 | 669 04ce 8091 0000 lds r24,EE_Parameter+48 |
||
629 | 670 04d2 282F mov r18,r24 |
||
630 | 671 04d4 3327 clr r19 |
||
631 | 672 04d6 220F lsl r18 |
||
632 | 673 04d8 331F rol r19 |
||
633 | 674 04da 220F lsl r18 |
||
634 | 675 04dc 331F rol r19 |
||
635 | 676 04de 8091 0000 lds r24,ServoNickValue |
||
636 | 677 04e2 9091 0000 lds r25,(ServoNickValue)+1 |
||
637 | 678 04e6 2817 cp r18,r24 |
||
638 | 679 04e8 3907 cpc r19,r25 |
||
639 | 680 04ea 24F4 brge .L55 |
||
640 | 681 .L122: |
||
641 | 682 04ec 3093 0000 sts (ServoNickValue)+1,r19 |
||
642 | 683 04f0 2093 0000 sts ServoNickValue,r18 |
||
643 | 684 .L55: |
||
644 | 685 04f4 2091 0000 lds r18,RemainingPulse.1 |
||
645 | 686 04f8 3091 0000 lds r19,(RemainingPulse.1)+1 |
||
646 | 687 04fc 8091 0000 lds r24,ServoNickValue |
||
647 | 688 0500 9091 0000 lds r25,(ServoNickValue)+1 |
||
648 | 689 0504 280F add r18,r24 |
||
649 | 690 0506 391F adc r19,r25 |
||
650 | 691 0508 2050 subi r18,lo8(-(-512)) |
||
651 | 692 050a 3240 sbci r19,hi8(-(-512)) |
||
652 | 693 050c 3093 0000 sts (RemainingPulse.1)+1,r19 |
||
653 | 694 0510 2093 0000 sts RemainingPulse.1,r18 |
||
654 | 695 0514 8091 0000 lds r24,ServoNickValue |
||
655 | 696 0518 9091 0000 lds r25,(ServoNickValue)+1 |
||
656 | 697 051c 97FD sbrc r25,7 |
||
657 | 698 051e 0396 adiw r24,3 |
||
658 | 699 .L57: |
||
659 | 700 0520 9595 asr r25 |
||
660 | 701 0522 8795 ror r24 |
||
661 | 702 0524 9595 asr r25 |
||
662 | 703 0526 8795 ror r24 |
||
663 | 704 0528 9093 0000 sts (ServoNickValue)+1,r25 |
||
664 | 705 052c 8093 0000 sts ServoNickValue,r24 |
||
665 | 706 0530 45E0 ldi r20,hi8(1501) |
||
666 | 707 0532 2D3D cpi r18,lo8(1501) |
||
667 | 708 0534 3407 cpc r19,r20 |
||
668 | 709 0536 18F0 brlo .L58 |
||
669 | 710 0538 8CED ldi r24,lo8(1500) |
||
670 | 711 053a 95E0 ldi r25,hi8(1500) |
||
671 | 712 053c 05C0 rjmp .L123 |
||
672 | 713 .L58: |
||
673 | 714 053e 2757 subi r18,lo8(375) |
||
674 | 715 0540 3140 sbci r19,hi8(375) |
||
675 | 716 0542 30F4 brsh .L59 |
||
676 | 717 0544 87E7 ldi r24,lo8(375) |
||
677 | 718 0546 91E0 ldi r25,hi8(375) |
||
678 | 719 .L123: |
||
679 | 720 0548 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
680 | 721 054c 8093 0000 sts RemainingPulse.1,r24 |
||
681 | 722 .L59: |
||
682 | 723 0550 8091 0000 lds r24,RemainingPulse.1 |
||
683 | 724 0554 9091 0000 lds r25,(RemainingPulse.1)+1 |
||
684 | 725 0558 87C2 rjmp .L134 |
||
685 | 726 .L46: |
||
686 | 727 055a 8091 B000 lds r24,176 |
||
687 | 728 055e 8064 ori r24,lo8(64) |
||
688 | 729 0560 8093 B000 sts 176,r24 |
||
689 | 730 0564 8091 0000 lds r24,EE_Parameter+53 |
||
690 | 731 0568 282F mov r18,r24 |
||
691 | 732 056a 3327 clr r19 |
||
692 | 733 056c 8DED ldi r24,lo8(1757) |
||
693 | 734 056e 96E0 ldi r25,hi8(1757) |
||
694 | 735 0570 289F mul r18,r24 |
||
695 | 736 0572 A001 movw r20,r0 |
||
696 | 737 0574 299F mul r18,r25 |
||
697 | 738 0576 500D add r21,r0 |
||
698 | 739 0578 389F mul r19,r24 |
||
699 | 740 057a 500D add r21,r0 |
||
700 | 741 057c 1124 clr r1 |
||
701 | 742 057e CA01 movw r24,r20 |
||
702 | 743 0580 2091 0000 lds r18,ServoFrameTime.2 |
||
703 | 744 0584 3091 0000 lds r19,(ServoFrameTime.2)+1 |
||
704 | 745 0588 821B sub r24,r18 |
||
705 | 746 058a 930B sbc r25,r19 |
||
706 | 747 058c 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
707 | 748 0590 8093 0000 sts RemainingPulse.1,r24 |
||
708 | 749 0594 9DC2 rjmp .L109 |
||
709 | 750 .L44: |
||
710 | 751 0596 8091 0000 lds r24,PulseOutput.0 |
||
711 | 752 059a 8823 tst r24 |
||
712 | 753 059c 09F0 breq .+2 |
||
713 | 754 059e 9BC2 rjmp .L62 |
||
714 | 755 05a0 8091 B000 lds r24,176 |
||
715 | 756 05a4 86FF sbrs r24,6 |
||
716 | 757 05a6 65C2 rjmp .L64 |
||
717 | 758 05a8 8091 B000 lds r24,176 |
||
718 | 759 05ac 8F7B andi r24,lo8(-65) |
||
719 | 760 05ae 8093 B000 sts 176,r24 |
||
720 | 761 05b2 E091 0000 lds r30,ServoIndex.3 |
||
721 | 762 05b6 EE23 tst r30 |
||
722 | 763 05b8 F1F4 brne .L65 |
||
723 | 764 05ba 8091 0000 lds r24,EE_Parameter+53 |
||
724 | 765 05be 282F mov r18,r24 |
||
725 | 766 05c0 3327 clr r19 |
||
726 | 767 05c2 8DED ldi r24,lo8(1757) |
||
727 | 768 05c4 96E0 ldi r25,hi8(1757) |
||
728 | 769 05c6 289F mul r18,r24 |
||
729 | 770 05c8 A001 movw r20,r0 |
||
730 | 771 05ca 299F mul r18,r25 |
||
731 | 772 05cc 500D add r21,r0 |
||
732 | 773 05ce 389F mul r19,r24 |
||
733 | 774 05d0 500D add r21,r0 |
||
734 | 775 05d2 1124 clr r1 |
||
735 | 776 05d4 CA01 movw r24,r20 |
||
736 | 777 05d6 2091 0000 lds r18,ServoFrameTime.2 |
||
737 | 778 05da 3091 0000 lds r19,(ServoFrameTime.2)+1 |
||
738 | 779 05de 821B sub r24,r18 |
||
739 | 780 05e0 930B sbc r25,r19 |
||
740 | 781 05e2 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
741 | 782 05e6 8093 0000 sts RemainingPulse.1,r24 |
||
742 | 783 05ea 1092 0000 sts (ServoFrameTime.2)+1,__zero_reg__ |
||
743 | 784 05ee 1092 0000 sts ServoFrameTime.2,__zero_reg__ |
||
744 | 785 05f2 469A sbi 40-0x20,6 |
||
745 | 786 05f4 6DC2 rjmp .L109 |
||
746 | 787 .L65: |
||
747 | 788 05f6 49EA ldi r20,lo8(937) |
||
748 | 789 05f8 53E0 ldi r21,hi8(937) |
||
749 | 790 05fa 5093 0000 sts (RemainingPulse.1)+1,r21 |
||
750 | 791 05fe 4093 0000 sts RemainingPulse.1,r20 |
||
751 | 792 0602 8E2F mov r24,r30 |
||
752 | 793 0604 9927 clr r25 |
||
753 | 794 0606 8330 cpi r24,3 |
||
754 | 795 0608 9105 cpc r25,__zero_reg__ |
||
755 | 796 060a 09F4 brne .+2 |
||
756 | 797 060c A4C1 rjmp .L92 |
||
757 | 798 060e 8430 cpi r24,4 |
||
758 | 799 0610 9105 cpc r25,__zero_reg__ |
||
759 | 800 0612 3CF4 brge .L105 |
||
760 | 801 0614 8130 cpi r24,1 |
||
761 | 802 0616 9105 cpc r25,__zero_reg__ |
||
762 | 803 0618 61F0 breq .L68 |
||
763 | 804 061a 0297 sbiw r24,2 |
||
764 | 805 061c 09F4 brne .+2 |
||
765 | 806 061e D2C0 rjmp .L80 |
||
766 | 807 0620 ECC1 rjmp .L104 |
||
767 | 808 .L105: |
||
768 | 809 0622 8430 cpi r24,4 |
||
769 | 810 0624 9105 cpc r25,__zero_reg__ |
||
770 | 811 0626 09F4 brne .+2 |
||
771 | 812 0628 DBC1 rjmp .L102 |
||
772 | 813 062a 0597 sbiw r24,5 |
||
773 | 814 062c 09F4 brne .+2 |
||
774 | 815 062e DBC1 rjmp .L103 |
||
775 | 816 0630 E4C1 rjmp .L104 |
||
776 | 817 .L68: |
||
777 | 818 0632 8091 0000 lds r24,ServoNickOffset.4 |
||
778 | 819 0636 9091 0000 lds r25,(ServoNickOffset.4)+1 |
||
779 | 820 063a 9C01 movw r18,r24 |
||
780 | 821 063c 220F lsl r18 |
||
781 | 822 063e 331F rol r19 |
||
782 | 823 0640 280F add r18,r24 |
||
783 | 824 0642 391F adc r19,r25 |
||
784 | 825 0644 8091 0000 lds r24,Parameter_ServoNickControl |
||
785 | 826 0648 9927 clr r25 |
||
786 | 827 064a 880F lsl r24 |
||
787 | 828 064c 991F rol r25 |
||
788 | 829 064e 880F lsl r24 |
||
789 | 830 0650 991F rol r25 |
||
790 | 831 0652 280F add r18,r24 |
||
791 | 832 0654 391F adc r19,r25 |
||
792 | 833 0656 37FF sbrs r19,7 |
||
793 | 834 0658 02C0 rjmp .L69 |
||
794 | 835 065a 2D5F subi r18,lo8(-(3)) |
||
795 | 836 065c 3F4F sbci r19,hi8(-(3)) |
||
796 | 837 .L69: |
||
797 | 838 065e C901 movw r24,r18 |
||
798 | 839 0660 9595 asr r25 |
||
799 | 840 0662 8795 ror r24 |
||
800 | 841 0664 9595 asr r25 |
||
801 | 842 0666 8795 ror r24 |
||
802 | 843 0668 9093 0000 sts (ServoNickOffset.4)+1,r25 |
||
803 | 844 066c 8093 0000 sts ServoNickOffset.4,r24 |
||
804 | 845 0670 9093 0000 sts (ServoNickValue)+1,r25 |
||
805 | 846 0674 8093 0000 sts ServoNickValue,r24 |
||
806 | 847 0678 8091 0000 lds r24,EE_Parameter+98 |
||
807 | 848 067c 6091 0000 lds r22,EE_Parameter+46 |
||
808 | 849 0680 2091 0000 lds r18,IntegralNick |
||
809 | 850 0684 3091 0000 lds r19,(IntegralNick)+1 |
||
810 | 851 0688 4091 0000 lds r20,(IntegralNick)+2 |
||
811 | 852 068c 5091 0000 lds r21,(IntegralNick)+3 |
||
812 | 853 0690 80FF sbrs r24,0 |
||
813 | 854 0692 2CC0 rjmp .L70 |
||
814 | 855 0694 7727 clr r23 |
||
815 | 856 0696 8827 clr r24 |
||
816 | 857 0698 9927 clr r25 |
||
817 | 858 069a EA01 movw r28,r20 |
||
818 | 859 069c D901 movw r26,r18 |
||
819 | 860 069e 57FF sbrs r21,7 |
||
820 | 861 06a0 04C0 rjmp .L71 |
||
821 | 862 06a2 A158 subi r26,lo8(-(127)) |
||
822 | 863 06a4 BF4F sbci r27,hi8(-(127)) |
||
823 | 864 06a6 CF4F sbci r28,hlo8(-(127)) |
||
824 | 865 06a8 DF4F sbci r29,hhi8(-(127)) |
||
825 | 866 .L71: |
||
826 | 867 06aa 27E0 ldi r18,7 |
||
827 | 868 06ac D595 1: asr r29 |
||
828 | 869 06ae C795 ror r28 |
||
829 | 870 06b0 B795 ror r27 |
||
830 | 871 06b2 A795 ror r26 |
||
831 | 872 06b4 2A95 dec r18 |
||
832 | 873 06b6 D1F7 brne 1b |
||
833 | 874 06b8 9D01 movw r18,r26 |
||
834 | 875 06ba AE01 movw r20,r28 |
||
835 | 876 06bc 0E94 0000 call __mulsi3 |
||
836 | 877 06c0 9B01 movw r18,r22 |
||
837 | 878 06c2 AC01 movw r20,r24 |
||
838 | 879 06c4 97FF sbrs r25,7 |
||
839 | 880 06c6 04C0 rjmp .L72 |
||
840 | 881 06c8 215C subi r18,lo8(-(63)) |
||
841 | 882 06ca 3F4F sbci r19,hi8(-(63)) |
||
842 | 883 06cc 4F4F sbci r20,hlo8(-(63)) |
||
843 | 884 06ce 5F4F sbci r21,hhi8(-(63)) |
||
844 | 885 .L72: |
||
845 | 886 06d0 F6E0 ldi r31,6 |
||
846 | 887 06d2 5595 1: asr r21 |
||
847 | 888 06d4 4795 ror r20 |
||
848 | 889 06d6 3795 ror r19 |
||
849 | 890 06d8 2795 ror r18 |
||
850 | 891 06da FA95 dec r31 |
||
851 | 892 06dc D1F7 brne 1b |
||
852 | 893 06de 8091 0000 lds r24,ServoNickValue |
||
853 | 894 06e2 9091 0000 lds r25,(ServoNickValue)+1 |
||
854 | 895 06e6 820F add r24,r18 |
||
855 | 896 06e8 931F adc r25,r19 |
||
856 | 897 06ea 27C0 rjmp .L124 |
||
857 | 898 .L70: |
||
858 | 899 06ec 7727 clr r23 |
||
859 | 900 06ee 8827 clr r24 |
||
860 | 901 06f0 9927 clr r25 |
||
861 | 902 06f2 57FF sbrs r21,7 |
||
862 | 903 06f4 04C0 rjmp .L74 |
||
863 | 904 06f6 2158 subi r18,lo8(-(127)) |
||
864 | 905 06f8 3F4F sbci r19,hi8(-(127)) |
||
865 | 906 06fa 4F4F sbci r20,hlo8(-(127)) |
||
866 | 907 06fc 5F4F sbci r21,hhi8(-(127)) |
||
867 | 908 .L74: |
||
868 | 909 06fe E7E0 ldi r30,7 |
||
869 | 910 0700 5595 1: asr r21 |
||
870 | 911 0702 4795 ror r20 |
||
871 | 912 0704 3795 ror r19 |
||
872 | 913 0706 2795 ror r18 |
||
873 | 914 0708 EA95 dec r30 |
||
874 | 915 070a D1F7 brne 1b |
||
875 | 916 070c 0E94 0000 call __mulsi3 |
||
876 | 917 0710 9B01 movw r18,r22 |
||
877 | 918 0712 AC01 movw r20,r24 |
||
878 | 919 0714 97FF sbrs r25,7 |
||
879 | 920 0716 04C0 rjmp .L75 |
||
880 | 921 0718 215C subi r18,lo8(-(63)) |
||
881 | 922 071a 3F4F sbci r19,hi8(-(63)) |
||
882 | 923 071c 4F4F sbci r20,hlo8(-(63)) |
||
883 | 924 071e 5F4F sbci r21,hhi8(-(63)) |
||
884 | 925 .L75: |
||
885 | 926 0720 66E0 ldi r22,6 |
||
886 | 927 0722 5595 1: asr r21 |
||
887 | 928 0724 4795 ror r20 |
||
888 | 929 0726 3795 ror r19 |
||
889 | 930 0728 2795 ror r18 |
||
890 | 931 072a 6A95 dec r22 |
||
891 | 932 072c D1F7 brne 1b |
||
892 | 933 072e 8091 0000 lds r24,ServoNickValue |
||
893 | 934 0732 9091 0000 lds r25,(ServoNickValue)+1 |
||
894 | 935 0736 821B sub r24,r18 |
||
895 | 936 0738 930B sbc r25,r19 |
||
896 | 937 .L124: |
||
897 | 938 073a 9093 0000 sts (ServoNickValue)+1,r25 |
||
898 | 939 073e 8093 0000 sts ServoNickValue,r24 |
||
899 | 940 0742 8091 0000 lds r24,EE_Parameter+47 |
||
900 | 941 0746 282F mov r18,r24 |
||
901 | 942 0748 3327 clr r19 |
||
902 | 943 074a 220F lsl r18 |
||
903 | 944 074c 331F rol r19 |
||
904 | 945 074e 220F lsl r18 |
||
905 | 946 0750 331F rol r19 |
||
906 | 947 0752 8091 0000 lds r24,ServoNickValue |
||
907 | 948 0756 9091 0000 lds r25,(ServoNickValue)+1 |
||
908 | 949 075a 8217 cp r24,r18 |
||
909 | 950 075c 9307 cpc r25,r19 |
||
910 | 951 075e 7CF0 brlt .L125 |
||
911 | 952 0760 8091 0000 lds r24,EE_Parameter+48 |
||
912 | 953 0764 282F mov r18,r24 |
||
913 | 954 0766 3327 clr r19 |
||
914 | 955 0768 220F lsl r18 |
||
915 | 956 076a 331F rol r19 |
||
916 | 957 076c 220F lsl r18 |
||
917 | 958 076e 331F rol r19 |
||
918 | 959 0770 8091 0000 lds r24,ServoNickValue |
||
919 | 960 0774 9091 0000 lds r25,(ServoNickValue)+1 |
||
920 | 961 0778 2817 cp r18,r24 |
||
921 | 962 077a 3907 cpc r19,r25 |
||
922 | 963 077c 24F4 brge .L77 |
||
923 | 964 .L125: |
||
924 | 965 077e 3093 0000 sts (ServoNickValue)+1,r19 |
||
925 | 966 0782 2093 0000 sts ServoNickValue,r18 |
||
926 | 967 .L77: |
||
927 | 968 0786 8091 0000 lds r24,RemainingPulse.1 |
||
928 | 969 078a 9091 0000 lds r25,(RemainingPulse.1)+1 |
||
929 | 970 078e 2091 0000 lds r18,ServoNickValue |
||
930 | 971 0792 3091 0000 lds r19,(ServoNickValue)+1 |
||
931 | 972 0796 820F add r24,r18 |
||
932 | 973 0798 931F adc r25,r19 |
||
933 | 974 079a 8050 subi r24,lo8(-(-512)) |
||
934 | 975 079c 9240 sbci r25,hi8(-(-512)) |
||
935 | 976 079e 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
936 | 977 07a2 8093 0000 sts RemainingPulse.1,r24 |
||
937 | 978 07a6 8091 0000 lds r24,ServoNickValue |
||
938 | 979 07aa 9091 0000 lds r25,(ServoNickValue)+1 |
||
939 | 980 07ae 97FD sbrc r25,7 |
||
940 | 981 07b0 0396 adiw r24,3 |
||
941 | 982 .L79: |
||
942 | 983 07b2 9595 asr r25 |
||
943 | 984 07b4 8795 ror r24 |
||
944 | 985 07b6 9595 asr r25 |
||
945 | 986 07b8 8795 ror r24 |
||
946 | 987 07ba 9093 0000 sts (ServoNickValue)+1,r25 |
||
947 | 988 07be 8093 0000 sts ServoNickValue,r24 |
||
948 | 989 07c2 2EC1 rjmp .L67 |
||
949 | 990 .L80: |
||
950 | 991 07c4 8091 0000 lds r24,ServoRollOffset.5 |
||
951 | 992 07c8 9091 0000 lds r25,(ServoRollOffset.5)+1 |
||
952 | 993 07cc 9C01 movw r18,r24 |
||
953 | 994 07ce 220F lsl r18 |
||
954 | 995 07d0 331F rol r19 |
||
955 | 996 07d2 280F add r18,r24 |
||
956 | 997 07d4 391F adc r19,r25 |
||
957 | 998 07d6 8091 0000 lds r24,Parameter_ServoRollControl |
||
958 | 999 07da 9927 clr r25 |
||
959 | 1000 07dc 880F lsl r24 |
||
960 | 1001 07de 991F rol r25 |
||
961 | 1002 07e0 880F lsl r24 |
||
962 | 1003 07e2 991F rol r25 |
||
963 | 1004 07e4 280F add r18,r24 |
||
964 | 1005 07e6 391F adc r19,r25 |
||
965 | 1006 07e8 37FF sbrs r19,7 |
||
966 | 1007 07ea 02C0 rjmp .L81 |
||
967 | 1008 07ec 2D5F subi r18,lo8(-(3)) |
||
968 | 1009 07ee 3F4F sbci r19,hi8(-(3)) |
||
969 | 1010 .L81: |
||
970 | 1011 07f0 C901 movw r24,r18 |
||
971 | 1012 07f2 9595 asr r25 |
||
972 | 1013 07f4 8795 ror r24 |
||
973 | 1014 07f6 9595 asr r25 |
||
974 | 1015 07f8 8795 ror r24 |
||
975 | 1016 07fa 9093 0000 sts (ServoRollOffset.5)+1,r25 |
||
976 | 1017 07fe 8093 0000 sts ServoRollOffset.5,r24 |
||
977 | 1018 0802 9093 0000 sts (ServoRollValue)+1,r25 |
||
978 | 1019 0806 8093 0000 sts ServoRollValue,r24 |
||
979 | 1020 080a 8091 0000 lds r24,EE_Parameter+98 |
||
980 | 1021 080e 6091 0000 lds r22,EE_Parameter+50 |
||
981 | 1022 0812 A091 0000 lds r26,IntegralRoll |
||
982 | 1023 0816 B091 0000 lds r27,(IntegralRoll)+1 |
||
983 | 1024 081a C091 0000 lds r28,(IntegralRoll)+2 |
||
984 | 1025 081e D091 0000 lds r29,(IntegralRoll)+3 |
||
985 | 1026 0822 81FF sbrs r24,1 |
||
986 | 1027 0824 2AC0 rjmp .L82 |
||
987 | 1028 0826 7727 clr r23 |
||
988 | 1029 0828 8827 clr r24 |
||
989 | 1030 082a 9927 clr r25 |
||
990 | 1031 082c 9D01 movw r18,r26 |
||
991 | 1032 082e AE01 movw r20,r28 |
||
992 | 1033 0830 D7FF sbrs r29,7 |
||
993 | 1034 0832 04C0 rjmp .L83 |
||
994 | 1035 0834 2158 subi r18,lo8(-(127)) |
||
995 | 1036 0836 3F4F sbci r19,hi8(-(127)) |
||
996 | 1037 0838 4F4F sbci r20,hlo8(-(127)) |
||
997 | 1038 083a 5F4F sbci r21,hhi8(-(127)) |
||
998 | 1039 .L83: |
||
999 | 1040 083c E7E0 ldi r30,7 |
||
1000 | 1041 083e 5595 1: asr r21 |
||
1001 | 1042 0840 4795 ror r20 |
||
1002 | 1043 0842 3795 ror r19 |
||
1003 | 1044 0844 2795 ror r18 |
||
1004 | 1045 0846 EA95 dec r30 |
||
1005 | 1046 0848 D1F7 brne 1b |
||
1006 | 1047 084a 0E94 0000 call __mulsi3 |
||
1007 | 1048 084e 9B01 movw r18,r22 |
||
1008 | 1049 0850 AC01 movw r20,r24 |
||
1009 | 1050 0852 97FF sbrs r25,7 |
||
1010 | 1051 0854 04C0 rjmp .L84 |
||
1011 | 1052 0856 215C subi r18,lo8(-(63)) |
||
1012 | 1053 0858 3F4F sbci r19,hi8(-(63)) |
||
1013 | 1054 085a 4F4F sbci r20,hlo8(-(63)) |
||
1014 | 1055 085c 5F4F sbci r21,hhi8(-(63)) |
||
1015 | 1056 .L84: |
||
1016 | 1057 085e C6E0 ldi r28,6 |
||
1017 | 1058 0860 5595 1: asr r21 |
||
1018 | 1059 0862 4795 ror r20 |
||
1019 | 1060 0864 3795 ror r19 |
||
1020 | 1061 0866 2795 ror r18 |
||
1021 | 1062 0868 CA95 dec r28 |
||
1022 | 1063 086a D1F7 brne 1b |
||
1023 | 1064 086c 8091 0000 lds r24,ServoRollValue |
||
1024 | 1065 0870 9091 0000 lds r25,(ServoRollValue)+1 |
||
1025 | 1066 0874 820F add r24,r18 |
||
1026 | 1067 0876 931F adc r25,r19 |
||
1027 | 1068 0878 29C0 rjmp .L126 |
||
1028 | 1069 .L82: |
||
1029 | 1070 087a 7727 clr r23 |
||
1030 | 1071 087c 8827 clr r24 |
||
1031 | 1072 087e 9927 clr r25 |
||
1032 | 1073 0880 9D01 movw r18,r26 |
||
1033 | 1074 0882 AE01 movw r20,r28 |
||
1034 | 1075 0884 D7FF sbrs r29,7 |
||
1035 | 1076 0886 04C0 rjmp .L86 |
||
1036 | 1077 0888 2158 subi r18,lo8(-(127)) |
||
1037 | 1078 088a 3F4F sbci r19,hi8(-(127)) |
||
1038 | 1079 088c 4F4F sbci r20,hlo8(-(127)) |
||
1039 | 1080 088e 5F4F sbci r21,hhi8(-(127)) |
||
1040 | 1081 .L86: |
||
1041 | 1082 0890 B7E0 ldi r27,7 |
||
1042 | 1083 0892 5595 1: asr r21 |
||
1043 | 1084 0894 4795 ror r20 |
||
1044 | 1085 0896 3795 ror r19 |
||
1045 | 1086 0898 2795 ror r18 |
||
1046 | 1087 089a BA95 dec r27 |
||
1047 | 1088 089c D1F7 brne 1b |
||
1048 | 1089 089e 0E94 0000 call __mulsi3 |
||
1049 | 1090 08a2 9B01 movw r18,r22 |
||
1050 | 1091 08a4 AC01 movw r20,r24 |
||
1051 | 1092 08a6 97FF sbrs r25,7 |
||
1052 | 1093 08a8 04C0 rjmp .L87 |
||
1053 | 1094 08aa 215C subi r18,lo8(-(63)) |
||
1054 | 1095 08ac 3F4F sbci r19,hi8(-(63)) |
||
1055 | 1096 08ae 4F4F sbci r20,hlo8(-(63)) |
||
1056 | 1097 08b0 5F4F sbci r21,hhi8(-(63)) |
||
1057 | 1098 .L87: |
||
1058 | 1099 08b2 A6E0 ldi r26,6 |
||
1059 | 1100 08b4 5595 1: asr r21 |
||
1060 | 1101 08b6 4795 ror r20 |
||
1061 | 1102 08b8 3795 ror r19 |
||
1062 | 1103 08ba 2795 ror r18 |
||
1063 | 1104 08bc AA95 dec r26 |
||
1064 | 1105 08be D1F7 brne 1b |
||
1065 | 1106 08c0 8091 0000 lds r24,ServoRollValue |
||
1066 | 1107 08c4 9091 0000 lds r25,(ServoRollValue)+1 |
||
1067 | 1108 08c8 821B sub r24,r18 |
||
1068 | 1109 08ca 930B sbc r25,r19 |
||
1069 | 1110 .L126: |
||
1070 | 1111 08cc 9093 0000 sts (ServoRollValue)+1,r25 |
||
1071 | 1112 08d0 8093 0000 sts ServoRollValue,r24 |
||
1072 | 1113 08d4 8091 0000 lds r24,EE_Parameter+51 |
||
1073 | 1114 08d8 282F mov r18,r24 |
||
1074 | 1115 08da 3327 clr r19 |
||
1075 | 1116 08dc 220F lsl r18 |
||
1076 | 1117 08de 331F rol r19 |
||
1077 | 1118 08e0 220F lsl r18 |
||
1078 | 1119 08e2 331F rol r19 |
||
1079 | 1120 08e4 8091 0000 lds r24,ServoRollValue |
||
1080 | 1121 08e8 9091 0000 lds r25,(ServoRollValue)+1 |
||
1081 | 1122 08ec 8217 cp r24,r18 |
||
1082 | 1123 08ee 9307 cpc r25,r19 |
||
1083 | 1124 08f0 7CF0 brlt .L127 |
||
1084 | 1125 08f2 8091 0000 lds r24,EE_Parameter+52 |
||
1085 | 1126 08f6 282F mov r18,r24 |
||
1086 | 1127 08f8 3327 clr r19 |
||
1087 | 1128 08fa 220F lsl r18 |
||
1088 | 1129 08fc 331F rol r19 |
||
1089 | 1130 08fe 220F lsl r18 |
||
1090 | 1131 0900 331F rol r19 |
||
1091 | 1132 0902 8091 0000 lds r24,ServoRollValue |
||
1092 | 1133 0906 9091 0000 lds r25,(ServoRollValue)+1 |
||
1093 | 1134 090a 2817 cp r18,r24 |
||
1094 | 1135 090c 3907 cpc r19,r25 |
||
1095 | 1136 090e 24F4 brge .L89 |
||
1096 | 1137 .L127: |
||
1097 | 1138 0910 3093 0000 sts (ServoRollValue)+1,r19 |
||
1098 | 1139 0914 2093 0000 sts ServoRollValue,r18 |
||
1099 | 1140 .L89: |
||
1100 | 1141 0918 8091 0000 lds r24,RemainingPulse.1 |
||
1101 | 1142 091c 9091 0000 lds r25,(RemainingPulse.1)+1 |
||
1102 | 1143 0920 2091 0000 lds r18,ServoRollValue |
||
1103 | 1144 0924 3091 0000 lds r19,(ServoRollValue)+1 |
||
1104 | 1145 0928 820F add r24,r18 |
||
1105 | 1146 092a 931F adc r25,r19 |
||
1106 | 1147 092c 8050 subi r24,lo8(-(-512)) |
||
1107 | 1148 092e 9240 sbci r25,hi8(-(-512)) |
||
1108 | 1149 0930 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
1109 | 1150 0934 8093 0000 sts RemainingPulse.1,r24 |
||
1110 | 1151 0938 8091 0000 lds r24,ServoRollValue |
||
1111 | 1152 093c 9091 0000 lds r25,(ServoRollValue)+1 |
||
1112 | 1153 0940 97FD sbrc r25,7 |
||
1113 | 1154 0942 0396 adiw r24,3 |
||
1114 | 1155 .L91: |
||
1115 | 1156 0944 9595 asr r25 |
||
1116 | 1157 0946 8795 ror r24 |
||
1117 | 1158 0948 9595 asr r25 |
||
1118 | 1159 094a 8795 ror r24 |
||
1119 | 1160 094c 9093 0000 sts (ServoRollValue)+1,r25 |
||
1120 | 1161 0950 8093 0000 sts ServoRollValue,r24 |
||
1121 | 1162 0954 65C0 rjmp .L67 |
||
1122 | 1163 .L92: |
||
1123 | 1164 0956 8091 0000 lds r24,EE_Parameter+7 |
||
1124 | 1165 095a E82F mov r30,r24 |
||
1125 | 1166 095c FF27 clr r31 |
||
1126 | 1167 095e EE0F add r30,r30 |
||
1127 | 1168 0960 FF1F adc r31,r31 |
||
1128 | 1169 0962 E050 subi r30,lo8(-(PPM_in)) |
||
1129 | 1170 0964 F040 sbci r31,hi8(-(PPM_in)) |
||
1130 | 1171 0966 8081 ld r24,Z |
||
1131 | 1172 0968 9181 ldd r25,Z+1 |
||
1132 | 1173 096a 805E subi r24,lo8(-32) |
||
1133 | 1174 096c 9F4F sbci r25,hi8(-32) |
||
1134 | 1175 096e ACF1 brlt .L132 |
||
1135 | 1176 0970 8081 ld r24,Z |
||
1136 | 1177 0972 9181 ldd r25,Z+1 |
||
1137 | 1178 0974 8197 sbiw r24,33 |
||
1138 | 1179 0976 1CF0 brlt .L95 |
||
1139 | 1180 0978 8CED ldi r24,lo8(1500) |
||
1140 | 1181 097a 95E0 ldi r25,hi8(1500) |
||
1141 | 1182 097c 4DC0 rjmp .L128 |
||
1142 | 1183 .L95: |
||
1143 | 1184 097e 8091 0000 lds r24,CameraShutterCycle |
||
1144 | 1185 0982 9091 0000 lds r25,(CameraShutterCycle)+1 |
||
1145 | 1186 0986 C297 sbiw r24,50 |
||
1146 | 1187 0988 78F0 brlo .L129 |
||
1147 | 1188 098a 2091 0000 lds r18,CameraShutterCycleCounter |
||
1148 | 1189 098e 3091 0000 lds r19,(CameraShutterCycleCounter)+1 |
||
1149 | 1190 0992 8091 0000 lds r24,CameraShutterCycle |
||
1150 | 1191 0996 9091 0000 lds r25,(CameraShutterCycle)+1 |
||
1151 | 1192 099a 2817 cp r18,r24 |
||
1152 | 1193 099c 3907 cpc r19,r25 |
||
1153 | 1194 099e 49F4 brne .L99 |
||
1154 | 1195 09a0 1092 0000 sts (CameraShutterCycleCounter)+1,__zero_reg__ |
||
1155 | 1196 09a4 1092 0000 sts CameraShutterCycleCounter,__zero_reg__ |
||
1156 | 1197 .L129: |
||
1157 | 1198 09a8 5093 0000 sts (RemainingPulse.1)+1,r21 |
||
1158 | 1199 09ac 4093 0000 sts RemainingPulse.1,r20 |
||
1159 | 1200 09b0 37C0 rjmp .L67 |
||
1160 | 1201 .L99: |
||
1161 | 1202 09b2 8091 0000 lds r24,CameraShutterCycleCounter |
||
1162 | 1203 09b6 9091 0000 lds r25,(CameraShutterCycleCounter)+1 |
||
1163 | 1204 09ba 0196 adiw r24,1 |
||
1164 | 1205 09bc 9093 0000 sts (CameraShutterCycleCounter)+1,r25 |
||
1165 | 1206 09c0 8093 0000 sts CameraShutterCycleCounter,r24 |
||
1166 | 1207 09c4 2091 0000 lds r18,CameraShutterCycleCounter |
||
1167 | 1208 09c8 3091 0000 lds r19,(CameraShutterCycleCounter)+1 |
||
1168 | 1209 09cc 8091 0000 lds r24,CameraShutterCycleOnCount |
||
1169 | 1210 09d0 9091 0000 lds r25,(CameraShutterCycleOnCount)+1 |
||
1170 | 1211 09d4 2817 cp r18,r24 |
||
1171 | 1212 09d6 3907 cpc r19,r25 |
||
1172 | 1213 09d8 19F5 brne .L67 |
||
1173 | 1214 .L132: |
||
1174 | 1215 09da 87E7 ldi r24,lo8(375) |
||
1175 | 1216 09dc 91E0 ldi r25,hi8(375) |
||
1176 | 1217 09de 1CC0 rjmp .L128 |
||
1177 | 1218 .L102: |
||
1178 | 1219 09e0 8091 0000 lds r24,Parameter_Servo4 |
||
1179 | 1220 09e4 02C0 rjmp .L133 |
||
1180 | 1221 .L103: |
||
1181 | 1222 09e6 8091 0000 lds r24,Parameter_Servo5 |
||
1182 | 1223 .L133: |
||
1183 | 1224 09ea 9927 clr r25 |
||
1184 | 1225 09ec 880F lsl r24 |
||
1185 | 1226 09ee 991F rol r25 |
||
1186 | 1227 09f0 880F lsl r24 |
||
1187 | 1228 09f2 991F rol r25 |
||
1188 | 1229 09f4 8755 subi r24,lo8(-(425)) |
||
1189 | 1230 09f6 9E4F sbci r25,hi8(-(425)) |
||
1190 | 1231 09f8 0FC0 rjmp .L128 |
||
1191 | 1232 .L104: |
||
1192 | 1233 09fa FF27 clr r31 |
||
1193 | 1234 09fc EE0F add r30,r30 |
||
1194 | 1235 09fe FF1F adc r31,r31 |
||
1195 | 1236 0a00 E050 subi r30,lo8(-(PPM_in)) |
||
1196 | 1237 0a02 F040 sbci r31,hi8(-(PPM_in)) |
||
1197 | 1238 0a04 2081 ld r18,Z |
||
1198 | 1239 0a06 3181 ldd r19,Z+1 |
||
1199 | 1240 0a08 220F add r18,r18 |
||
1200 | 1241 0a0a 331F adc r19,r19 |
||
1201 | 1242 0a0c 8091 0000 lds r24,RemainingPulse.1 |
||
1202 | 1243 0a10 9091 0000 lds r25,(RemainingPulse.1)+1 |
||
1203 | 1244 0a14 820F add r24,r18 |
||
1204 | 1245 0a16 931F adc r25,r19 |
||
1205 | 1246 .L128: |
||
1206 | 1247 0a18 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
1207 | 1248 0a1c 8093 0000 sts RemainingPulse.1,r24 |
||
1208 | 1249 .L67: |
||
1209 | 1250 0a20 8091 0000 lds r24,RemainingPulse.1 |
||
1210 | 1251 0a24 9091 0000 lds r25,(RemainingPulse.1)+1 |
||
1211 | 1252 0a28 45E0 ldi r20,hi8(1501) |
||
1212 | 1253 0a2a 8D3D cpi r24,lo8(1501) |
||
1213 | 1254 0a2c 9407 cpc r25,r20 |
||
1214 | 1255 0a2e 18F0 brlo .L106 |
||
1215 | 1256 0a30 8CED ldi r24,lo8(1500) |
||
1216 | 1257 0a32 95E0 ldi r25,hi8(1500) |
||
1217 | 1258 0a34 05C0 rjmp .L130 |
||
1218 | 1259 .L106: |
||
1219 | 1260 0a36 8757 subi r24,lo8(375) |
||
1220 | 1261 0a38 9140 sbci r25,hi8(375) |
||
1221 | 1262 0a3a 30F4 brsh .L107 |
||
1222 | 1263 0a3c 87E7 ldi r24,lo8(375) |
||
1223 | 1264 0a3e 91E0 ldi r25,hi8(375) |
||
1224 | 1265 .L130: |
||
1225 | 1266 0a40 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
1226 | 1267 0a44 8093 0000 sts RemainingPulse.1,r24 |
||
1227 | 1268 .L107: |
||
1228 | 1269 0a48 2091 0000 lds r18,RemainingPulse.1 |
||
1229 | 1270 0a4c 3091 0000 lds r19,(RemainingPulse.1)+1 |
||
1230 | 1271 0a50 2C5B subi r18,lo8(-(-188)) |
||
1231 | 1272 0a52 3040 sbci r19,hi8(-(-188)) |
||
1232 | 1273 0a54 3093 0000 sts (RemainingPulse.1)+1,r19 |
||
1233 | 1274 0a58 2093 0000 sts RemainingPulse.1,r18 |
||
1234 | 1275 0a5c 8091 0000 lds r24,ServoFrameTime.2 |
||
1235 | 1276 0a60 9091 0000 lds r25,(ServoFrameTime.2)+1 |
||
1236 | 1277 0a64 820F add r24,r18 |
||
1237 | 1278 0a66 931F adc r25,r19 |
||
1238 | 1279 .L134: |
||
1239 | 1280 0a68 9093 0000 sts (ServoFrameTime.2)+1,r25 |
||
1240 | 1281 0a6c 8093 0000 sts ServoFrameTime.2,r24 |
||
1241 | 1282 0a70 2FC0 rjmp .L109 |
||
1242 | 1283 .L64: |
||
1243 | 1284 0a72 8091 B000 lds r24,176 |
||
1244 | 1285 0a76 8064 ori r24,lo8(64) |
||
1245 | 1286 0a78 8093 B000 sts 176,r24 |
||
1246 | 1287 0a7c 8CEB ldi r24,lo8(188) |
||
1247 | 1288 0a7e 90E0 ldi r25,hi8(188) |
||
1248 | 1289 0a80 9093 0000 sts (RemainingPulse.1)+1,r25 |
||
1249 | 1290 0a84 8093 0000 sts RemainingPulse.1,r24 |
||
1250 | 1291 0a88 8091 0000 lds r24,ServoFrameTime.2 |
||
1251 | 1292 0a8c 9091 0000 lds r25,(ServoFrameTime.2)+1 |
||
1252 | 1293 0a90 8454 subi r24,lo8(-(188)) |
||
1253 | 1294 0a92 9F4F sbci r25,hi8(-(188)) |
||
1254 | 1295 0a94 9093 0000 sts (ServoFrameTime.2)+1,r25 |
||
1255 | 1296 0a98 8093 0000 sts ServoFrameTime.2,r24 |
||
1256 | 1297 0a9c 8091 0000 lds r24,ServoActive |
||
1257 | 1298 0aa0 8823 tst r24 |
||
1258 | 1299 0aa2 21F0 breq .L112 |
||
1259 | 1300 0aa4 8091 0000 lds r24,SenderOkay |
||
1260 | 1301 0aa8 853B cpi r24,lo8(-75) |
||
1261 | 1302 0aaa 20F4 brsh .L111 |
||
1262 | 1303 .L112: |
||
1263 | 1304 0aac 8091 0000 lds r24,ServoActive |
||
1264 | 1305 0ab0 8230 cpi r24,lo8(2) |
||
1265 | 1306 0ab2 11F4 brne .L110 |
||
1266 | 1307 .L111: |
||
1267 | 1308 0ab4 4698 cbi 40-0x20,6 |
||
1268 | 1309 0ab6 01C0 rjmp .L113 |
||
1269 | 1310 .L110: |
||
1270 | 1311 0ab8 469A sbi 40-0x20,6 |
||
1271 | 1312 .L113: |
||
1272 | 1313 0aba 8091 0000 lds r24,ServoIndex.3 |
||
1273 | 1314 0abe 8F5F subi r24,lo8(-(1)) |
||
1274 | 1315 0ac0 8093 0000 sts ServoIndex.3,r24 |
||
1275 | 1316 0ac4 9091 0000 lds r25,EE_Parameter+53 |
||
1276 | 1317 0ac8 9817 cp r25,r24 |
||
1277 | 1318 0aca 10F4 brsh .L109 |
||
1278 | 1319 0acc 1092 0000 sts ServoIndex.3,__zero_reg__ |
||
1279 | 1320 .L109: |
||
1280 | 1321 0ad0 81E0 ldi r24,lo8(1) |
||
1281 | 1322 0ad2 8093 0000 sts PulseOutput.0,r24 |
||
1282 | 1323 .L62: |
||
1283 | 1324 0ad6 2091 0000 lds r18,RemainingPulse.1 |
||
1284 | 1325 0ada 3091 0000 lds r19,(RemainingPulse.1)+1 |
||
1285 | 1326 0ade 81E0 ldi r24,hi8(383) |
||
1286 | 1327 0ae0 2F37 cpi r18,lo8(383) |
||
1287 | 1328 0ae2 3807 cpc r19,r24 |
||
1288 | 1329 0ae4 30F0 brlo .L115 |
||
1289 | 1330 0ae6 8FEF ldi r24,lo8(-1) |
||
1290 | 1331 0ae8 8093 B300 sts 179,r24 |
||
1291 | 1332 0aec 2F5F subi r18,lo8(-(-255)) |
||
1292 | 1333 0aee 3040 sbci r19,hi8(-(-255)) |
||
1293 | 1334 0af0 0FC0 rjmp .L131 |
||
1294 | 1335 .L115: |
||
1295 | 1336 0af2 2F3F cpi r18,255 |
||
1296 | 1337 0af4 3105 cpc r19,__zero_reg__ |
||
1297 | 1338 0af6 C9F0 breq .L117 |
||
1298 | 1339 0af8 C0F0 brlo .L117 |
||
1299 | 1340 0afa A901 movw r20,r18 |
||
1300 | 1341 0afc 4F5F subi r20,lo8(-(-255)) |
||
1301 | 1342 0afe 5040 sbci r21,hi8(-(-255)) |
||
1302 | 1343 0b00 4F37 cpi r20,127 |
||
1303 | 1344 0b02 5105 cpc r21,__zero_reg__ |
||
1304 | 1345 0b04 50F4 brsh .L118 |
||
1305 | 1346 0b06 80E8 ldi r24,lo8(-128) |
||
1306 | 1347 0b08 8093 B300 sts 179,r24 |
||
1307 | 1348 0b0c 2058 subi r18,lo8(-(-128)) |
||
1308 | 1349 0b0e 3040 sbci r19,hi8(-(-128)) |
||
1309 | 1350 .L131: |
||
1310 | 1351 0b10 3093 0000 sts (RemainingPulse.1)+1,r19 |
||
1311 | 1352 0b14 2093 0000 sts RemainingPulse.1,r18 |
||
1312 | 1353 0b18 12C0 rjmp .L43 |
||
1313 | 1354 .L118: |
||
1314 | 1355 0b1a 8FEF ldi r24,lo8(-1) |
||
1315 | 1356 0b1c 8093 B300 sts 179,r24 |
||
1316 | 1357 0b20 5093 0000 sts (RemainingPulse.1)+1,r21 |
||
1317 | 1358 0b24 4093 0000 sts RemainingPulse.1,r20 |
||
1318 | 1359 0b28 0AC0 rjmp .L43 |
||
1319 | 1360 .L117: |
||
1320 | 1361 0b2a 8091 0000 lds r24,RemainingPulse.1 |
||
1321 | 1362 0b2e 8093 B300 sts 179,r24 |
||
1322 | 1363 0b32 1092 0000 sts (RemainingPulse.1)+1,__zero_reg__ |
||
1323 | 1364 0b36 1092 0000 sts RemainingPulse.1,__zero_reg__ |
||
1324 | 1365 0b3a 1092 0000 sts PulseOutput.0,__zero_reg__ |
||
1325 | 1366 .L43: |
||
1326 | 1367 /* epilogue: frame size=0 */ |
||
1327 | 1368 0b3e FF91 pop r31 |
||
1328 | 1369 0b40 EF91 pop r30 |
||
1329 | 1370 0b42 DF91 pop r29 |
||
1330 | 1371 0b44 CF91 pop r28 |
||
1331 | 1372 0b46 BF91 pop r27 |
||
1332 | 1373 0b48 AF91 pop r26 |
||
1333 | 1374 0b4a 9F91 pop r25 |
||
1334 | 1375 0b4c 8F91 pop r24 |
||
1335 | 1376 0b4e 7F91 pop r23 |
||
1336 | 1377 0b50 6F91 pop r22 |
||
1337 | 1378 0b52 5F91 pop r21 |
||
1338 | 1379 0b54 4F91 pop r20 |
||
1339 | 1380 0b56 3F91 pop r19 |
||
1340 | 1381 0b58 2F91 pop r18 |
||
1341 | 1382 0b5a 0F90 pop __tmp_reg__ |
||
1342 | 1383 0b5c 0FBE out __SREG__,__tmp_reg__ |
||
1343 | 1384 0b5e 0F90 pop __tmp_reg__ |
||
1344 | 1385 0b60 1F90 pop __zero_reg__ |
||
1345 | 1386 0b62 1895 reti |
||
1346 | 1387 /* epilogue end (size=19) */ |
||
1347 | 1388 /* function __vector_9 size 1056 (1018) */ |
||
1348 | 1390 .lcomm tim_main,2 |
||
1349 | 1391 /* File "timer0.c": code 1473 = 0x05c1 (1389), prologues 39, epilogues 45 */ |
||
1350 | DEFINED SYMBOLS |
||
1351 | *ABS*:00000000 timer0.c |
||
1352 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:3 *ABS*:0000003f __SREG__ |
||
1353 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:4 *ABS*:0000003e __SP_H__ |
||
1354 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:5 *ABS*:0000003d __SP_L__ |
||
1355 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:6 *ABS*:00000000 __tmp_reg__ |
||
1356 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:7 *ABS*:00000001 __zero_reg__ |
||
1357 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:15 .bss:00000000 ServoRollValue |
||
1358 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:21 .bss:00000002 ServoNickValue |
||
1359 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:27 .data:00000000 BeepMuster |
||
1360 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:34 .bss:00000004 ServoActive |
||
1361 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:40 .bss:00000005 SendSPI |
||
1362 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:46 .bss:00000006 beeptime |
||
1363 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:52 .bss:00000008 cntKompass |
||
1364 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:58 .bss:0000000a UpdateMotor |
||
1365 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:64 .bss:0000000b CountMilliseconds |
||
1366 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:69 .data:00000002 CameraShutterCycleOnCount |
||
1367 | .bss:0000000d CameraShutterCycleCounter |
||
1368 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:71 .bss:0000000f CameraShutterCycle |
||
1369 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:75 .data:00000004 cnt_1ms.6 |
||
1370 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:72 .bss:00000011 cnt.7 |
||
1371 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:77 .bss:00000012 compass_active.8 |
||
1372 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:82 .text:00000000 __vector_18 |
||
1373 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:305 .text:00000216 SetDelay |
||
1374 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:321 .text:00000228 CheckDelay |
||
1375 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:340 .text:00000240 Delay_ms |
||
1376 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:361 .text:0000025a Delay_ms_Mess |
||
1377 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:391 .text:0000028a TIMER2_Init |
||
1378 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:447 .text:0000030a Timer_Init |
||
1379 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:475 .bss:00000019 tim_main |
||
1380 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:78 .bss:00000013 PulseOutput.0 |
||
1381 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:472 .bss:00000014 RemainingPulse.1 |
||
1382 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:473 .bss:00000016 ServoFrameTime.2 |
||
1383 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:474 .bss:00000018 ServoIndex.3 |
||
1384 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:479 .data:00000005 ServoNickOffset.4 |
||
1385 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:483 .data:00000007 ServoRollOffset.5 |
||
1386 | C:\Users\Arthur-P\AppData\Local\Temp/cccRbaaa.s:488 .text:00000338 __vector_9 |
||
1387 | |||
1388 | UNDEFINED SYMBOLS |
||
1389 | __do_copy_data |
||
1390 | __do_clear_bss |
||
1391 | SpektrumTimer |
||
1392 | PlatinenVersion |
||
1393 | NaviDataOkay |
||
1394 | EE_Parameter |
||
1395 | __udivmodhi4 |
||
1396 | KompassValue |
||
1397 | KompassStartwert |
||
1398 | __divmodhi4 |
||
1399 | KompassRichtung |
||
1400 | AdReady |
||
1401 | Parameter_UserParam8 |
||
1402 | Parameter_ServoNickControl |
||
1403 | IntegralNick |
||
1404 | __mulsi3 |
||
1405 | Parameter_ServoRollControl |
||
1406 | IntegralRoll |
||
1407 | PPM_in |
||
1408 | Parameter_Servo4 |
||
1409 | Parameter_Servo5 |
||
1410 | SenderOkay |