Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
66 | jan-hendri | 1 | 1 .file "main.c" |
2 | 2 __SREG__ = 0x3f |
||
3 | 3 __SP_H__ = 0x3e |
||
4 | 4 __SP_L__ = 0x3d |
||
5 | 5 __tmp_reg__ = 0 |
||
6 | 6 __zero_reg__ = 1 |
||
7 | 7 .global __do_copy_data |
||
8 | 8 .global __do_clear_bss |
||
9 | 11 .text |
||
10 | 12 .Ltext0: |
||
11 | 100 .global SetPWM |
||
12 | 102 SetPWM: |
||
13 | 103 .stabd 46,0,0 |
||
14 | 1:src/main.c **** /*####################################################################################### |
||
15 | 2:src/main.c **** Flight Control |
||
16 | 3:src/main.c **** #######################################################################################*/ |
||
17 | 4:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
18 | 5:src/main.c **** // + Regler für Brushless-Motoren |
||
19 | 6:src/main.c **** // + ATMEGA8 mit 8MHz |
||
20 | 7:src/main.c **** // + Nur für den privaten Gebrauch |
||
21 | 8:src/main.c **** // + Copyright (c) 12.2007 Holger Buss |
||
22 | 9:src/main.c **** // + www.MikroKopter.com |
||
23 | 10:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
24 | 11:src/main.c **** // + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation) |
||
25 | 12:src/main.c **** // + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulä |
||
26 | 13:src/main.c **** // + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikro |
||
27 | 14:src/main.c **** // + bzgl. der Nutzungsbedingungen aufzunehmen. |
||
28 | 15:src/main.c **** // + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platine |
||
29 | 16:src/main.c **** // + Verkauf von Luftbildaufnahmen, usw. |
||
30 | 17:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
31 | 18:src/main.c **** // + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
||
32 | 19:src/main.c **** // + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright |
||
33 | 20:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
34 | 21:src/main.c **** // + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
||
35 | 22:src/main.c **** // + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http: |
||
36 | 23:src/main.c **** // + eindeutig als Ursprung verlinkt werden |
||
37 | 24:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
38 | 25:src/main.c **** // + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
||
39 | 26:src/main.c **** // + Benutzung auf eigene Gefahr |
||
40 | 27:src/main.c **** // + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
||
41 | 28:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
42 | 29:src/main.c **** // + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www |
||
43 | 30:src/main.c **** // + mit unserer Zustimmung zulässig |
||
44 | 31:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
45 | 32:src/main.c **** // + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
||
46 | 33:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
47 | 34:src/main.c **** // + Redistributions of source code (with or without modifications) must retain the above copyright |
||
48 | 35:src/main.c **** // + this list of conditions and the following disclaimer. |
||
49 | 36:src/main.c **** // + * Neither the name of the copyright holders nor the names of contributors may be used to end |
||
50 | 37:src/main.c **** // + from this software without specific prior written permission. |
||
51 | 38:src/main.c **** // + * The use of this project (hardware, software, binary files, sources and documentation) is o |
||
52 | 39:src/main.c **** // + for non-commercial use (directly or indirectly) |
||
53 | 40:src/main.c **** // + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is |
||
54 | 41:src/main.c **** // + with our written permission |
||
55 | 42:src/main.c **** // + * If sources or documentations are redistributet on other webpages, out webpage (http://www. |
||
56 | 43:src/main.c **** // + clearly linked as origin |
||
57 | 44:src/main.c **** // + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
||
58 | 45:src/main.c **** // + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
59 | 46:src/main.c **** // + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
60 | 47:src/main.c **** // + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
||
61 | 48:src/main.c **** // + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
||
62 | 49:src/main.c **** // + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
||
63 | 50:src/main.c **** // + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
||
64 | 51:src/main.c **** // + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
||
65 | 52:src/main.c **** // + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// + CONTRACT, STRICT |
||
66 | 53:src/main.c **** // + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
||
67 | 54:src/main.c **** // + POSSIBILITY OF SUCH DAMAGE. |
||
68 | 55:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
69 | 56:src/main.c **** |
||
70 | 57:src/main.c **** #include "main.h" |
||
71 | 58:src/main.c **** |
||
72 | 59:src/main.c **** unsigned int PWM = 0; |
||
73 | 60:src/main.c **** unsigned int Strom = 0,RuheStrom; //ca. in 0,1A |
||
74 | 61:src/main.c **** unsigned char Strom_max = 0; |
||
75 | 62:src/main.c **** unsigned char Mittelstrom = 0; |
||
76 | 63:src/main.c **** unsigned int Drehzahl = 0; // in 100UPM 60 = 6000 |
||
77 | 64:src/main.c **** unsigned int KommutierDelay = 10; |
||
78 | 65:src/main.c **** unsigned int I2C_Timeout = 0; |
||
79 | 66:src/main.c **** unsigned int SIO_Timeout = 0; |
||
80 | 67:src/main.c **** unsigned int SollDrehzahl = 0; |
||
81 | 68:src/main.c **** unsigned int IstDrehzahl = 0; |
||
82 | 69:src/main.c **** unsigned int DrehZahlTabelle[256];//vorberechnete Werte zur Drehzahlerfassung |
||
83 | 70:src/main.c **** unsigned char ZeitFuerBerechnungen = 1; |
||
84 | 71:src/main.c **** unsigned char MotorAnwerfen = 0; |
||
85 | 72:src/main.c **** unsigned char MotorGestoppt = 1; |
||
86 | 73:src/main.c **** unsigned char MaxPWM = MAX_PWM; |
||
87 | 74:src/main.c **** unsigned int CntKommutierungen = 0; |
||
88 | 75:src/main.c **** unsigned int SIO_Drehzahl = 0; |
||
89 | 76:src/main.c **** unsigned char ZeitZumAdWandeln = 1; |
||
90 | 77:src/main.c **** unsigned char MotorAdresse = 1; |
||
91 | 78:src/main.c **** unsigned char PPM_Betrieb = 1; |
||
92 | 79:src/main.c **** |
||
93 | 80:src/main.c **** //############################################################################ |
||
94 | 81:src/main.c **** // |
||
95 | 82:src/main.c **** void SetPWM(void) |
||
96 | 83:src/main.c **** //############################################################################ |
||
97 | 84:src/main.c **** { |
||
98 | 105 .LM0: |
||
99 | 106 .LFBB1: |
||
100 | 107 /* prologue: frame size=0 */ |
||
101 | 108 /* prologue end (size=0) */ |
||
102 | 85:src/main.c **** unsigned char tmp_pwm; |
||
103 | 86:src/main.c **** tmp_pwm = PWM; |
||
104 | 110 .LM1: |
||
105 | 111 0000 2091 0000 lds r18,PWM |
||
106 | 87:src/main.c **** if(tmp_pwm > MaxPWM) // Strombegrenzung |
||
107 | 113 .LM2: |
||
108 | 114 0004 8091 0000 lds r24,MaxPWM |
||
109 | 115 0008 8217 cp r24,r18 |
||
110 | 116 000a 00F4 brsh .L2 |
||
111 | 88:src/main.c **** { |
||
112 | 89:src/main.c **** tmp_pwm = MaxPWM; |
||
113 | 90:src/main.c **** PORTC |= ROT; |
||
114 | 118 .LM3: |
||
115 | 119 000c AB9A sbi 53-0x20,3 |
||
116 | 120 000e 282F mov r18,r24 |
||
117 | 121 .L2: |
||
118 | 91:src/main.c **** } |
||
119 | 92:src/main.c **** if(Strom > MAX_STROM) // Strombegrenzung |
||
120 | 123 .LM4: |
||
121 | 124 0010 8091 0000 lds r24,Strom |
||
122 | 125 0014 9091 0000 lds r25,(Strom)+1 |
||
123 | 126 0018 893C cpi r24,201 |
||
124 | 127 001a 9105 cpc r25,__zero_reg__ |
||
125 | 128 001c 00F0 brlo .L4 |
||
126 | 93:src/main.c **** { |
||
127 | 94:src/main.c **** OCR1A = 0; OCR1B = 0; OCR2 = 0; |
||
128 | 130 .LM5: |
||
129 | 131 001e 1BBC out (74)+1-0x20,__zero_reg__ |
||
130 | 132 0020 1ABC out 74-0x20,__zero_reg__ |
||
131 | 133 0022 19BC out (72)+1-0x20,__zero_reg__ |
||
132 | 134 0024 18BC out 72-0x20,__zero_reg__ |
||
133 | 135 0026 13BC out 67-0x20,__zero_reg__ |
||
134 | 95:src/main.c **** PORTC |= ROT; |
||
135 | 137 .LM6: |
||
136 | 138 0028 AB9A sbi 53-0x20,3 |
||
137 | 96:src/main.c **** Strom--; |
||
138 | 140 .LM7: |
||
139 | 141 002a 0197 sbiw r24,1 |
||
140 | 142 002c 9093 0000 sts (Strom)+1,r25 |
||
141 | 143 0030 8093 0000 sts Strom,r24 |
||
142 | 144 0034 0895 ret |
||
143 | 145 .L4: |
||
144 | 97:src/main.c **** } |
||
145 | 98:src/main.c **** else |
||
146 | 99:src/main.c **** { |
||
147 | 100:src/main.c **** #ifdef _32KHZ |
||
148 | 101:src/main.c **** OCR1A = tmp_pwm; OCR1B = tmp_pwm; OCR2 = tmp_pwm; |
||
149 | 102:src/main.c **** #endif |
||
150 | 103:src/main.c **** |
||
151 | 104:src/main.c **** #ifdef _16KHZ |
||
152 | 105:src/main.c **** //OCR1A = 2 * (int)tmp_pwm; OCR1B = 2 * (int)tmp_pwm; OCR2 = tmp_pwm; |
||
153 | 106:src/main.c **** OCR1A = tmp_pwm; OCR1B = tmp_pwm; OCR2 = tmp_pwm; |
||
154 | 147 .LM8: |
||
155 | 148 0036 822F mov r24,r18 |
||
156 | 149 0038 9927 clr r25 |
||
157 | 150 003a 9BBD out (74)+1-0x20,r25 |
||
158 | 151 003c 8ABD out 74-0x20,r24 |
||
159 | 152 003e 99BD out (72)+1-0x20,r25 |
||
160 | 153 0040 88BD out 72-0x20,r24 |
||
161 | 154 0042 23BD out 67-0x20,r18 |
||
162 | 155 0044 0895 ret |
||
163 | 156 /* epilogue: frame size=0 */ |
||
164 | 157 /* epilogue: noreturn */ |
||
165 | 158 /* epilogue end (size=0) */ |
||
166 | 159 /* function SetPWM size 35 (35) */ |
||
167 | 164 .Lscope1: |
||
168 | 166 .stabd 78,0,0 |
||
169 | 168 .global PWM_Init |
||
170 | 170 PWM_Init: |
||
171 | 171 .stabd 46,0,0 |
||
172 | 107:src/main.c **** #endif |
||
173 | 108:src/main.c **** } |
||
174 | 109:src/main.c **** } |
||
175 | 110:src/main.c **** |
||
176 | 111:src/main.c **** //############################################################################ |
||
177 | 112:src/main.c **** // |
||
178 | 113:src/main.c **** void PWM_Init(void) |
||
179 | 114:src/main.c **** //############################################################################ |
||
180 | 115:src/main.c **** { |
||
181 | 173 .LM9: |
||
182 | 174 .LFBB2: |
||
183 | 175 /* prologue: frame size=0 */ |
||
184 | 176 /* prologue end (size=0) */ |
||
185 | 116:src/main.c **** PWM_OFF; |
||
186 | 178 .LM10: |
||
187 | 179 0046 91E0 ldi r25,lo8(1) |
||
188 | 180 0048 9FBD out 79-0x20,r25 |
||
189 | 181 004a 81E4 ldi r24,lo8(65) |
||
190 | 182 004c 85BD out 69-0x20,r24 |
||
191 | 183 004e 8EE0 ldi r24,lo8(14) |
||
192 | 184 0050 87BB out 55-0x20,r24 |
||
193 | 185 0052 88B3 in r24,56-0x20 |
||
194 | 186 0054 817F andi r24,lo8(-15) |
||
195 | 187 0056 88BB out 56-0x20,r24 |
||
196 | 117:src/main.c **** TCCR1B = (1 << CS10) | (0 << CS11) | (0 << CS12) | (0 << WGM12) | |
||
197 | 189 .LM11: |
||
198 | 190 0058 9EBD out 78-0x20,r25 |
||
199 | 191 /* epilogue: frame size=0 */ |
||
200 | 192 005a 0895 ret |
||
201 | 193 /* epilogue end (size=1) */ |
||
202 | 194 /* function PWM_Init size 11 (10) */ |
||
203 | 196 .Lscope2: |
||
204 | 198 .stabd 78,0,0 |
||
205 | 201 .global Wait |
||
206 | 203 Wait: |
||
207 | 204 .stabd 46,0,0 |
||
208 | 118:src/main.c **** (0 << WGM13) | (0<< ICES1) | (0 << ICNC1); |
||
209 | 119:src/main.c **** /* TCCR1B = (1 << CS10) | (0 << CS11) | (0 << CS12) | (1 << WGM12) | |
||
210 | 120:src/main.c **** (0 << WGM13) | (0<< ICES1) | (0 << ICNC1); |
||
211 | 121:src/main.c **** */ |
||
212 | 122:src/main.c **** } |
||
213 | 123:src/main.c **** |
||
214 | 124:src/main.c **** //############################################################################ |
||
215 | 125:src/main.c **** // |
||
216 | 126:src/main.c **** void Wait(unsigned char dauer) |
||
217 | 127:src/main.c **** //############################################################################ |
||
218 | 128:src/main.c **** { |
||
219 | 206 .LM12: |
||
220 | 207 .LFBB3: |
||
221 | 208 /* prologue: frame size=0 */ |
||
222 | 209 /* prologue end (size=0) */ |
||
223 | 129:src/main.c **** dauer = (unsigned char)TCNT0 + dauer; |
||
224 | 211 .LM13: |
||
225 | 212 005c 92B7 in r25,82-0x20 |
||
226 | 213 005e 980F add r25,r24 |
||
227 | 130:src/main.c **** while((TCNT0 - dauer) & 0x80); |
||
228 | 215 .LM14: |
||
229 | 216 0060 292F mov r18,r25 |
||
230 | 217 0062 3327 clr r19 |
||
231 | 218 .L11: |
||
232 | 220 .LM15: |
||
233 | 221 0064 82B7 in r24,82-0x20 |
||
234 | 222 0066 821B sub r24,r18 |
||
235 | 223 0068 87FD sbrc r24,7 |
||
236 | 224 006a 00C0 rjmp .L11 |
||
237 | 225 /* epilogue: frame size=0 */ |
||
238 | 226 006c 0895 ret |
||
239 | 227 /* epilogue end (size=1) */ |
||
240 | 228 /* function Wait size 9 (8) */ |
||
241 | 230 .Lscope3: |
||
242 | 232 .stabd 78,0,0 |
||
243 | 235 .global Delay |
||
244 | 237 Delay: |
||
245 | 238 .stabd 46,0,0 |
||
246 | 131:src/main.c **** } |
||
247 | 132:src/main.c **** |
||
248 | 133:src/main.c **** //############################################################################ |
||
249 | 134:src/main.c **** // |
||
250 | 135:src/main.c **** void Anwerfen(unsigned char pwm) |
||
251 | 136:src/main.c **** //############################################################################ |
||
252 | 137:src/main.c **** { |
||
253 | 138:src/main.c **** unsigned long timer = 300,i; |
||
254 | 139:src/main.c **** DISABLE_SENSE_INT; |
||
255 | 140:src/main.c **** PWM = 5; |
||
256 | 141:src/main.c **** SetPWM(); |
||
257 | 142:src/main.c **** Manuell(); |
||
258 | 143:src/main.c **** Delay_ms(200); |
||
259 | 144:src/main.c **** PWM = pwm; |
||
260 | 145:src/main.c **** while(1) |
||
261 | 146:src/main.c **** { |
||
262 | 147:src/main.c **** for(i=0;i<timer; i++) |
||
263 | 148:src/main.c **** { |
||
264 | 149:src/main.c **** if(!UebertragungAbgeschlossen) SendUart(); |
||
265 | 150:src/main.c **** else DatenUebertragung(); |
||
266 | 151:src/main.c **** Wait(100); // warten |
||
267 | 152:src/main.c **** } |
||
268 | 153:src/main.c **** timer-= timer/15+1; |
||
269 | 154:src/main.c **** if(timer < 25) { if(TEST_MANUELL) timer = 25; else return; } |
||
270 | 155:src/main.c **** |
||
271 | 156:src/main.c **** Manuell(); |
||
272 | 157:src/main.c **** Phase++; |
||
273 | 158:src/main.c **** Phase %= 6; |
||
274 | 159:src/main.c **** AdConvert(); |
||
275 | 160:src/main.c **** PWM = pwm; |
||
276 | 161:src/main.c **** SetPWM(); |
||
277 | 162:src/main.c **** if(SENSE) |
||
278 | 163:src/main.c **** { |
||
279 | 164:src/main.c **** PORTD ^= GRUEN; |
||
280 | 165:src/main.c **** } |
||
281 | 166:src/main.c **** } |
||
282 | 167:src/main.c **** } |
||
283 | 168:src/main.c **** |
||
284 | 169:src/main.c **** /* |
||
285 | 170:src/main.c **** #define SENSE_A ADMUX = 0; |
||
286 | 171:src/main.c **** #define SENSE_B ADMUX = 1; |
||
287 | 172:src/main.c **** #define SENSE_C ADMUX = 2; |
||
288 | 173:src/main.c **** |
||
289 | 174:src/main.c **** #define ClrSENSE ACSR |= 0x10 |
||
290 | 175:src/main.c **** #define SENSE ((ACSR & 0x10)) |
||
291 | 176:src/main.c **** #define SENSE_L (!(ACSR & 0x20)) |
||
292 | 177:src/main.c **** #define SENSE_H ((ACSR & 0x20)) |
||
293 | 178:src/main.c **** */ |
||
294 | 179:src/main.c **** |
||
295 | 180:src/main.c **** void RotBlink(unsigned char anz) |
||
296 | 181:src/main.c **** { |
||
297 | 182:src/main.c **** sei(); // Interrupts ein |
||
298 | 183:src/main.c **** while(anz--) |
||
299 | 184:src/main.c **** { |
||
300 | 185:src/main.c **** PORTC |= ROT; |
||
301 | 186:src/main.c **** Delay_ms(300); |
||
302 | 187:src/main.c **** PORTC &= ~ROT; |
||
303 | 188:src/main.c **** Delay_ms(300); |
||
304 | 189:src/main.c **** } |
||
305 | 190:src/main.c **** Delay_ms(1000); |
||
306 | 191:src/main.c **** } |
||
307 | 192:src/main.c **** |
||
308 | 193:src/main.c **** #define TEST_STROMGRENZE 120 |
||
309 | 194:src/main.c **** unsigned char DelayM(unsigned int timer) |
||
310 | 195:src/main.c **** { |
||
311 | 196:src/main.c **** while(timer--) |
||
312 | 197:src/main.c **** { |
||
313 | 198:src/main.c **** FastADConvert(); |
||
314 | 199:src/main.c **** if(Strom > (TEST_STROMGRENZE + RuheStrom)) |
||
315 | 200:src/main.c **** { |
||
316 | 201:src/main.c **** FETS_OFF; |
||
317 | 202:src/main.c **** return(1); |
||
318 | 203:src/main.c **** } |
||
319 | 204:src/main.c **** } |
||
320 | 205:src/main.c **** return(0); |
||
321 | 206:src/main.c **** } |
||
322 | 207:src/main.c **** |
||
323 | 208:src/main.c **** unsigned char Delay(unsigned int timer) |
||
324 | 209:src/main.c **** { |
||
325 | 240 .LM16: |
||
326 | 241 .LFBB4: |
||
327 | 242 /* prologue: frame size=0 */ |
||
328 | 243 /* prologue end (size=0) */ |
||
329 | 210:src/main.c **** while(timer--) |
||
330 | 211:src/main.c **** { |
||
331 | 212:src/main.c **** // if(SENSE_H) { PORTC |= ROT; } else { PORTC &= ~ROT;} |
||
332 | 213:src/main.c **** } |
||
333 | 214:src/main.c **** return(0); |
||
334 | 215:src/main.c **** } |
||
335 | 245 .LM17: |
||
336 | 246 006e 80E0 ldi r24,lo8(0) |
||
337 | 247 0070 90E0 ldi r25,hi8(0) |
||
338 | 248 /* epilogue: frame size=0 */ |
||
339 | 249 0072 0895 ret |
||
340 | 250 /* epilogue end (size=1) */ |
||
341 | 251 /* function Delay size 3 (2) */ |
||
342 | 253 .Lscope4: |
||
343 | 255 .stabd 78,0,0 |
||
344 | 257 .global SollwertErmittlung |
||
345 | 259 SollwertErmittlung: |
||
346 | 260 .stabd 46,0,0 |
||
347 | 216:src/main.c **** |
||
348 | 217:src/main.c **** /* |
||
349 | 218:src/main.c **** void ShowSense(void) |
||
350 | 219:src/main.c **** { |
||
351 | 220:src/main.c **** if(SENSE_H) { PORTC |= ROT; } else { PORTC &= ~ROT;} |
||
352 | 221:src/main.c **** |
||
353 | 222:src/main.c **** } |
||
354 | 223:src/main.c **** */ |
||
355 | 224:src/main.c **** #define HIGH_A_EIN PORTB |= 0x08 |
||
356 | 225:src/main.c **** #define HIGH_B_EIN PORTB |= 0x04 |
||
357 | 226:src/main.c **** #define HIGH_C_EIN PORTB |= 0x02 |
||
358 | 227:src/main.c **** #define LOW_A_EIN PORTD |= 0x08 |
||
359 | 228:src/main.c **** #define LOW_B_EIN PORTD |= 0x10 |
||
360 | 229:src/main.c **** #define LOW_C_EIN PORTD |= 0x20 |
||
361 | 230:src/main.c **** |
||
362 | 231:src/main.c **** void MotorTon(void) |
||
363 | 232:src/main.c **** //############################################################################ |
||
364 | 233:src/main.c **** { |
||
365 | 234:src/main.c **** unsigned char ADR_TAB[5] = {0,0,2,1,3}; |
||
366 | 235:src/main.c **** unsigned int timer = 300,i; |
||
367 | 236:src/main.c **** unsigned int t = 0; |
||
368 | 237:src/main.c **** unsigned char anz = 0,MosfetOkay = 0, grenze = 50; |
||
369 | 238:src/main.c **** |
||
370 | 239:src/main.c **** PORTC &= ~ROT; |
||
371 | 240:src/main.c **** Delay_ms(300 * ADR_TAB[MotorAdresse]); |
||
372 | 241:src/main.c **** DISABLE_SENSE_INT; |
||
373 | 242:src/main.c **** cli();//Globale Interrupts Ausschalten |
||
374 | 243:src/main.c **** uart_putchar('\n'); |
||
375 | 244:src/main.c **** STEUER_OFF; |
||
376 | 245:src/main.c **** Strom_max = 0; |
||
377 | 246:src/main.c **** DelayM(50); |
||
378 | 247:src/main.c **** RuheStrom = Strom_max; |
||
379 | 248:src/main.c **** // uart_putchar(RuheStrom + 'A'); |
||
380 | 249:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
381 | 250:src/main.c **** //+ High-Mosfets auf Kurzschluss testen |
||
382 | 251:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
383 | 252:src/main.c **** Strom = 0; |
||
384 | 253:src/main.c **** LOW_B_EIN; |
||
385 | 254:src/main.c **** HIGH_A_EIN; |
||
386 | 255:src/main.c **** if(DelayM(3)) |
||
387 | 256:src/main.c **** { |
||
388 | 257:src/main.c **** anz = 1; |
||
389 | 258:src/main.c **** uart_putchar('1'); |
||
390 | 259:src/main.c **** } |
||
391 | 260:src/main.c **** FETS_OFF; |
||
392 | 261:src/main.c **** Delay(1000); |
||
393 | 262:src/main.c **** Strom = 0; |
||
394 | 263:src/main.c **** LOW_A_EIN; |
||
395 | 264:src/main.c **** HIGH_B_EIN; |
||
396 | 265:src/main.c **** if(DelayM(3)) |
||
397 | 266:src/main.c **** { |
||
398 | 267:src/main.c **** anz = 2; |
||
399 | 268:src/main.c **** uart_putchar('2'); |
||
400 | 269:src/main.c **** } |
||
401 | 270:src/main.c **** FETS_OFF; |
||
402 | 271:src/main.c **** Delay(1000); |
||
403 | 272:src/main.c **** Strom = 0; |
||
404 | 273:src/main.c **** LOW_B_EIN; // Low C ein |
||
405 | 274:src/main.c **** HIGH_C_EIN; // High B ein |
||
406 | 275:src/main.c **** if(DelayM(3)) |
||
407 | 276:src/main.c **** { |
||
408 | 277:src/main.c **** anz = 3; |
||
409 | 278:src/main.c **** uart_putchar('3'); |
||
410 | 279:src/main.c **** } |
||
411 | 280:src/main.c **** FETS_OFF; |
||
412 | 281:src/main.c **** Delay(1000); |
||
413 | 282:src/main.c **** LOW_A_EIN; // Low A ein; und A gegen C |
||
414 | 283:src/main.c **** HIGH_C_EIN; // High C ein |
||
415 | 284:src/main.c **** if(DelayM(3)) |
||
416 | 285:src/main.c **** { |
||
417 | 286:src/main.c **** anz = 3; |
||
418 | 287:src/main.c **** uart_putchar('7'); |
||
419 | 288:src/main.c **** } |
||
420 | 289:src/main.c **** FETS_OFF; |
||
421 | 290:src/main.c **** DelayM(10000); |
||
422 | 291:src/main.c **** if(anz) while(1) RotBlink(anz); // bei Kurzschluss nicht starten |
||
423 | 292:src/main.c **** |
||
424 | 293:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
425 | 294:src/main.c **** //+ LOW-Mosfets auf Schalten und Kurzschluss testen |
||
426 | 295:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
427 | 296:src/main.c **** if(UDR == ' ') {t = 65535; grenze = 40; uart_putchar('_');} else t = 1000; // Ausführlicher Test |
||
428 | 297:src/main.c **** Strom = 0; |
||
429 | 298:src/main.c **** for(i=0;i<t;i++) |
||
430 | 299:src/main.c **** { |
||
431 | 300:src/main.c **** LOW_A_EIN; |
||
432 | 301:src/main.c **** DelayM(1); |
||
433 | 302:src/main.c **** FETS_OFF; |
||
434 | 303:src/main.c **** Delay(5); |
||
435 | 304:src/main.c **** HIGH_A_EIN; |
||
436 | 305:src/main.c **** DelayM(1); |
||
437 | 306:src/main.c **** FETS_OFF; |
||
438 | 307:src/main.c **** if(Strom > grenze + RuheStrom) {anz = 4; uart_putchar('4'); break;} |
||
439 | 308:src/main.c **** Delay(5); |
||
440 | 309:src/main.c **** } |
||
441 | 310:src/main.c **** Delay(10000); |
||
442 | 311:src/main.c **** |
||
443 | 312:src/main.c **** Strom = 0; |
||
444 | 313:src/main.c **** for(i=0;i<t;i++) |
||
445 | 314:src/main.c **** { |
||
446 | 315:src/main.c **** LOW_B_EIN; |
||
447 | 316:src/main.c **** DelayM(1); |
||
448 | 317:src/main.c **** FETS_OFF; |
||
449 | 318:src/main.c **** Delay(5); |
||
450 | 319:src/main.c **** HIGH_B_EIN; |
||
451 | 320:src/main.c **** DelayM(1); |
||
452 | 321:src/main.c **** FETS_OFF; |
||
453 | 322:src/main.c **** if(Strom > grenze + RuheStrom) {anz = 5; uart_putchar('5'); break;} |
||
454 | 323:src/main.c **** Delay(5); |
||
455 | 324:src/main.c **** } |
||
456 | 325:src/main.c **** |
||
457 | 326:src/main.c **** Strom = 0; |
||
458 | 327:src/main.c **** Delay(10000); |
||
459 | 328:src/main.c **** |
||
460 | 329:src/main.c **** for(i=0;i<t;i++) |
||
461 | 330:src/main.c **** { |
||
462 | 331:src/main.c **** LOW_C_EIN; |
||
463 | 332:src/main.c **** DelayM(1); |
||
464 | 333:src/main.c **** FETS_OFF; |
||
465 | 334:src/main.c **** Delay(5); |
||
466 | 335:src/main.c **** HIGH_C_EIN; |
||
467 | 336:src/main.c **** DelayM(1); |
||
468 | 337:src/main.c **** FETS_OFF; |
||
469 | 338:src/main.c **** if(Strom > grenze + RuheStrom) {anz = 6; uart_putchar('6'); break;} |
||
470 | 339:src/main.c **** Delay(5); |
||
471 | 340:src/main.c **** } |
||
472 | 341:src/main.c **** |
||
473 | 342:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
474 | 343:src/main.c **** //+ High-Mosfets auf Schalten testen |
||
475 | 344:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
476 | 345:src/main.c **** SENSE_A; |
||
477 | 346:src/main.c **** FETS_OFF; |
||
478 | 347:src/main.c **** LOW_B_EIN; // Low B ein |
||
479 | 348:src/main.c **** LOW_C_EIN; // Low C ein |
||
480 | 349:src/main.c **** Strom = 0; |
||
481 | 350:src/main.c **** #define TONDAUER 40000 |
||
482 | 351:src/main.c **** #define SOUND_E 2 |
||
483 | 352:src/main.c **** #define SOUND1_A 300 |
||
484 | 353:src/main.c **** #define SOUND2_A 330 |
||
485 | 354:src/main.c **** #define SOUND3_A 360 |
||
486 | 355:src/main.c **** |
||
487 | 356:src/main.c **** for(i=0; i< (TONDAUER / SOUND2_A) ; i++) |
||
488 | 357:src/main.c **** { |
||
489 | 358:src/main.c **** HIGH_A_EIN; // Test A |
||
490 | 359:src/main.c **** Delay(SOUND_E); |
||
491 | 360:src/main.c **** if(MessAD(0) > 50) { MosfetOkay |= 0x01; } else { MosfetOkay &= ~0x01;}; |
||
492 | 361:src/main.c **** PORTB = 0; |
||
493 | 362:src/main.c **** Delay(SOUND1_A); |
||
494 | 363:src/main.c **** } |
||
495 | 364:src/main.c **** FETS_OFF; |
||
496 | 365:src/main.c **** |
||
497 | 366:src/main.c **** LOW_A_EIN; // Low A ein |
||
498 | 367:src/main.c **** LOW_C_EIN; // Low C ein |
||
499 | 368:src/main.c **** for(i=0; i<(TONDAUER / SOUND1_A); i++) |
||
500 | 369:src/main.c **** { |
||
501 | 370:src/main.c **** HIGH_B_EIN; // Test B |
||
502 | 371:src/main.c **** Delay(SOUND_E); |
||
503 | 372:src/main.c **** if(MessAD(1) > 50) { MosfetOkay |= 0x02; } else { MosfetOkay &= ~0x02;}; |
||
504 | 373:src/main.c **** PORTB = 0; |
||
505 | 374:src/main.c **** Delay(SOUND1_A); |
||
506 | 375:src/main.c **** } |
||
507 | 376:src/main.c **** |
||
508 | 377:src/main.c **** FETS_OFF; |
||
509 | 378:src/main.c **** LOW_A_EIN; // Low A ein |
||
510 | 379:src/main.c **** LOW_B_EIN; // Low B ein |
||
511 | 380:src/main.c **** for(i=0; i<(TONDAUER / SOUND3_A); i++) |
||
512 | 381:src/main.c **** { |
||
513 | 382:src/main.c **** HIGH_C_EIN; // Test C |
||
514 | 383:src/main.c **** Delay(SOUND_E); |
||
515 | 384:src/main.c **** if(MessAD(2) > 50) { MosfetOkay |= 0x04; } else { MosfetOkay &= ~0x04;}; |
||
516 | 385:src/main.c **** PORTB = 0; |
||
517 | 386:src/main.c **** Delay(SOUND2_A); |
||
518 | 387:src/main.c **** } |
||
519 | 388:src/main.c **** FETS_OFF; |
||
520 | 389:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
521 | 390:src/main.c **** //+ Low-Mosfets auf Schalten testen |
||
522 | 391:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
523 | 392:src/main.c **** SENSE_B; |
||
524 | 393:src/main.c **** LOW_A_EIN; // Low A ein |
||
525 | 394:src/main.c **** for(i=0; i< (TONDAUER / SOUND2_A) ; i++) |
||
526 | 395:src/main.c **** { |
||
527 | 396:src/main.c **** HIGH_B_EIN; // Test B |
||
528 | 397:src/main.c **** Delay(SOUND_E); |
||
529 | 398:src/main.c **** if(MessAD(0) > 50) { MosfetOkay &= ~0x08;} else { MosfetOkay |= 0x08;}; |
||
530 | 399:src/main.c **** PORTB = 0; |
||
531 | 400:src/main.c **** Delay(SOUND2_A); |
||
532 | 401:src/main.c **** } |
||
533 | 402:src/main.c **** |
||
534 | 403:src/main.c **** //++++++++++++++++++++++++++++++++++++ |
||
535 | 404:src/main.c **** LOW_C_EIN; // Low C ein |
||
536 | 405:src/main.c **** for(i=0; i<(TONDAUER / SOUND1_A); i++) |
||
537 | 406:src/main.c **** { |
||
538 | 407:src/main.c **** HIGH_B_EIN; // Test B |
||
539 | 408:src/main.c **** Delay(SOUND_E); |
||
540 | 409:src/main.c **** if(MessAD(2) > 50) { MosfetOkay &= ~0x20;} else { MosfetOkay |= 0x20;}; |
||
541 | 410:src/main.c **** PORTB = 0; |
||
542 | 411:src/main.c **** Delay(SOUND3_A); |
||
543 | 412:src/main.c **** } |
||
544 | 413:src/main.c **** FETS_OFF; |
||
545 | 414:src/main.c **** //++++++++++++++++++++++++++++++++++++ |
||
546 | 415:src/main.c **** FETS_OFF; |
||
547 | 416:src/main.c **** LOW_B_EIN; // Low B ein |
||
548 | 417:src/main.c **** for(i=0; i<(TONDAUER / SOUND3_A); i++) |
||
549 | 418:src/main.c **** { |
||
550 | 419:src/main.c **** HIGH_C_EIN; // Test C |
||
551 | 420:src/main.c **** Delay(SOUND_E); |
||
552 | 421:src/main.c **** if(MessAD(1) > 50) { MosfetOkay &= ~0x10;} else { MosfetOkay |= 0x10;}; |
||
553 | 422:src/main.c **** PORTB = 0; |
||
554 | 423:src/main.c **** Delay(SOUND3_A); |
||
555 | 424:src/main.c **** } |
||
556 | 425:src/main.c **** FETS_OFF; |
||
557 | 426:src/main.c **** //++++++++++++++++++++++++++++++++++++ |
||
558 | 427:src/main.c **** |
||
559 | 428:src/main.c **** //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
560 | 429:src/main.c **** sei();//Globale Interrupts Einschalten |
||
561 | 430:src/main.c **** // Delay_ms(250 * MotorAdresse); |
||
562 | 431:src/main.c **** /* |
||
563 | 432:src/main.c **** LOW_A_EIN; // Low B ein |
||
564 | 433:src/main.c **** #define SOUND8_A 650 |
||
565 | 434:src/main.c **** for(i=0; i<(TONDAUER / SOUND8_A); i++) |
||
566 | 435:src/main.c **** { |
||
567 | 436:src/main.c **** HIGH_B_EIN; // Test B |
||
568 | 437:src/main.c **** Delay(SOUND_E); |
||
569 | 438:src/main.c **** PORTB = 0; |
||
570 | 439:src/main.c **** Delay(SOUND8_A); |
||
571 | 440:src/main.c **** } |
||
572 | 441:src/main.c **** */ |
||
573 | 442:src/main.c **** Delay_ms(300 * (4-ADR_TAB[MotorAdresse])); |
||
574 | 443:src/main.c **** if(!(MosfetOkay & 0x01)) { anz = 1; UDR='A'; } else |
||
575 | 444:src/main.c **** if(!(MosfetOkay & 0x02)) { anz = 2; UDR='B'; } else |
||
576 | 445:src/main.c **** if(!(MosfetOkay & 0x04)) { anz = 3; UDR='C'; } else |
||
577 | 446:src/main.c **** if(!(MosfetOkay & 0x08)) { anz = 4; UDR='a'; } else |
||
578 | 447:src/main.c **** if(!(MosfetOkay & 0x10)) { anz = 5; UDR='b'; } else |
||
579 | 448:src/main.c **** if(!(MosfetOkay & 0x20)) { anz = 6; UDR='c'; } |
||
580 | 449:src/main.c **** |
||
581 | 450:src/main.c **** if(anz) Delay_ms(1000); |
||
582 | 451:src/main.c **** |
||
583 | 452:src/main.c **** RotBlink(anz); |
||
584 | 453:src/main.c **** uart_putchar('.'); |
||
585 | 454:src/main.c **** } |
||
586 | 455:src/main.c **** |
||
587 | 456:src/main.c **** //############################################################################ |
||
588 | 457:src/main.c **** // |
||
589 | 458:src/main.c **** unsigned char SollwertErmittlung(void) |
||
590 | 459:src/main.c **** //############################################################################ |
||
591 | 460:src/main.c **** { |
||
592 | 262 .LM18: |
||
593 | 263 .LFBB5: |
||
594 | 264 /* prologue: frame size=0 */ |
||
595 | 265 /* prologue end (size=0) */ |
||
596 | 461:src/main.c **** static unsigned int sollwert = 0; |
||
597 | 462:src/main.c **** unsigned int ppm; |
||
598 | 463:src/main.c **** if(!I2C_Timeout) // bei Erreichen von 0 ist der Wert ungültig |
||
599 | 267 .LM19: |
||
600 | 268 0074 8091 0000 lds r24,I2C_Timeout |
||
601 | 269 0078 9091 0000 lds r25,(I2C_Timeout)+1 |
||
602 | 270 007c 892B or r24,r25 |
||
603 | 271 007e 01F0 breq .+2 |
||
604 | 272 0080 00C0 rjmp .L20 |
||
605 | 464:src/main.c **** { |
||
606 | 465:src/main.c **** if(SIO_Timeout) // es gibt gültige SIO-Daten |
||
607 | 274 .LM20: |
||
608 | 275 0082 8091 0000 lds r24,SIO_Timeout |
||
609 | 276 0086 9091 0000 lds r25,(SIO_Timeout)+1 |
||
610 | 277 008a 892B or r24,r25 |
||
611 | 278 008c 01F0 breq .L22 |
||
612 | 466:src/main.c **** { |
||
613 | 467:src/main.c **** sollwert = (MAX_PWM * (unsigned int) SIO_Sollwert) / 200; // skalieren auf 0-200 = 0 |
||
614 | 280 .LM21: |
||
615 | 281 008e 9091 0000 lds r25,SIO_Sollwert |
||
616 | 282 0092 8FEF ldi r24,lo8(-1) |
||
617 | 283 0094 989F mul r25,r24 |
||
618 | 284 0096 C001 movw r24,r0 |
||
619 | 285 0098 1124 clr r1 |
||
620 | 286 009a 68EC ldi r22,lo8(200) |
||
621 | 287 009c 70E0 ldi r23,hi8(200) |
||
622 | 288 009e 00D0 rcall __udivmodhi4 |
||
623 | 289 00a0 7093 0000 sts (sollwert.2390)+1,r23 |
||
624 | 290 00a4 6093 0000 sts sollwert.2390,r22 |
||
625 | 468:src/main.c **** PPM_Betrieb = 0; |
||
626 | 292 .LM22: |
||
627 | 293 00a8 1092 0000 sts PPM_Betrieb,__zero_reg__ |
||
628 | 469:src/main.c **** ICP_INT_DISABLE; |
||
629 | 295 .LM23: |
||
630 | 296 00ac 89B7 in r24,89-0x20 |
||
631 | 297 00ae 8F7D andi r24,lo8(-33) |
||
632 | 298 00b0 89BF out 89-0x20,r24 |
||
633 | 299 00b2 00C0 rjmp .L32 |
||
634 | 300 .L22: |
||
635 | 470:src/main.c **** PORTC &= ~ROT; |
||
636 | 471:src/main.c **** } |
||
637 | 472:src/main.c **** else |
||
638 | 473:src/main.c **** if(anz_ppm_werte > 20) // es gibt gültige PPM-Daten |
||
639 | 302 .LM24: |
||
640 | 303 00b4 8091 0000 lds r24,anz_ppm_werte |
||
641 | 304 00b8 8531 cpi r24,lo8(21) |
||
642 | 305 00ba 00F0 brlo .L25 |
||
643 | 474:src/main.c **** { |
||
644 | 475:src/main.c **** PPM_Betrieb = 1; |
||
645 | 307 .LM25: |
||
646 | 308 00bc 81E0 ldi r24,lo8(1) |
||
647 | 309 00be 8093 0000 sts PPM_Betrieb,r24 |
||
648 | 476:src/main.c **** ppm = PPM_Signal; |
||
649 | 311 .LM26: |
||
650 | 312 00c2 2091 0000 lds r18,PPM_Signal |
||
651 | 313 00c6 3091 0000 lds r19,(PPM_Signal)+1 |
||
652 | 477:src/main.c **** if(ppm > 300) ppm = 0; // ungültiges Signal |
||
653 | 315 .LM27: |
||
654 | 316 00ca 41E0 ldi r20,hi8(301) |
||
655 | 317 00cc 2D32 cpi r18,lo8(301) |
||
656 | 318 00ce 3407 cpc r19,r20 |
||
657 | 319 00d0 00F4 brsh .L27 |
||
658 | 478:src/main.c **** if(ppm > 200) ppm = 200; |
||
659 | 321 .LM28: |
||
660 | 322 00d2 293C cpi r18,201 |
||
661 | 323 00d4 3105 cpc r19,__zero_reg__ |
||
662 | 324 00d6 00F4 brsh .L29 |
||
663 | 479:src/main.c **** if(ppm <= MIN_PPM) sollwert = 0; |
||
664 | 326 .LM29: |
||
665 | 327 00d8 2B30 cpi r18,11 |
||
666 | 328 00da 3105 cpc r19,__zero_reg__ |
||
667 | 329 00dc 00F4 brsh .L31 |
||
668 | 330 .L27: |
||
669 | 331 00de 1092 0000 sts (sollwert.2390)+1,__zero_reg__ |
||
670 | 332 00e2 1092 0000 sts sollwert.2390,__zero_reg__ |
||
671 | 333 00e6 00C0 rjmp .L32 |
||
672 | 334 .L29: |
||
673 | 335 00e8 28EC ldi r18,lo8(200) |
||
674 | 336 00ea 30E0 ldi r19,hi8(200) |
||
675 | 337 .L31: |
||
676 | 480:src/main.c **** else |
||
677 | 481:src/main.c **** { |
||
678 | 482:src/main.c **** sollwert = (int) MIN_PWM + ((MAX_PWM - MIN_PWM) * (ppm - MIN_PPM)) / (190 - MIN |
||
679 | 339 .LM30: |
||
680 | 340 00ec 8CEF ldi r24,lo8(252) |
||
681 | 341 00ee 90E0 ldi r25,hi8(252) |
||
682 | 342 00f0 AC01 movw r20,r24 |
||
683 | 343 00f2 249F mul r18,r20 |
||
684 | 344 00f4 C001 movw r24,r0 |
||
685 | 345 00f6 259F mul r18,r21 |
||
686 | 346 00f8 900D add r25,r0 |
||
687 | 347 00fa 349F mul r19,r20 |
||
688 | 348 00fc 900D add r25,r0 |
||
689 | 349 00fe 1124 clr r1 |
||
690 | 350 0100 885D subi r24,lo8(-(-2520)) |
||
691 | 351 0102 9940 sbci r25,hi8(-(-2520)) |
||
692 | 352 0104 64EB ldi r22,lo8(180) |
||
693 | 353 0106 70E0 ldi r23,hi8(180) |
||
694 | 354 0108 00D0 rcall __udivmodhi4 |
||
695 | 355 010a 6D5F subi r22,lo8(-(3)) |
||
696 | 356 010c 7F4F sbci r23,hi8(-(3)) |
||
697 | 357 010e 7093 0000 sts (sollwert.2390)+1,r23 |
||
698 | 358 0112 6093 0000 sts sollwert.2390,r22 |
||
699 | 359 .L32: |
||
700 | 483:src/main.c **** } |
||
701 | 484:src/main.c **** PORTC &= ~ROT; |
||
702 | 361 .LM31: |
||
703 | 362 0116 AB98 cbi 53-0x20,3 |
||
704 | 363 0118 00C0 rjmp .L24 |
||
705 | 364 .L25: |
||
706 | 485:src/main.c **** } |
||
707 | 486:src/main.c **** else // Kein gültiger Sollwert |
||
708 | 487:src/main.c **** { |
||
709 | 488:src/main.c **** if(!TEST_SCHUB) { if(sollwert) sollwert--; } |
||
710 | 366 .LM32: |
||
711 | 367 011a 8091 0000 lds r24,sollwert.2390 |
||
712 | 368 011e 9091 0000 lds r25,(sollwert.2390)+1 |
||
713 | 369 0122 0097 sbiw r24,0 |
||
714 | 370 0124 01F0 breq .L33 |
||
715 | 371 0126 0197 sbiw r24,1 |
||
716 | 372 0128 9093 0000 sts (sollwert.2390)+1,r25 |
||
717 | 373 012c 8093 0000 sts sollwert.2390,r24 |
||
718 | 374 .L33: |
||
719 | 489:src/main.c **** PORTC |= ROT; |
||
720 | 376 .LM33: |
||
721 | 377 0130 AB9A sbi 53-0x20,3 |
||
722 | 378 0132 00C0 rjmp .L24 |
||
723 | 379 .L20: |
||
724 | 490:src/main.c **** } |
||
725 | 491:src/main.c **** } |
||
726 | 492:src/main.c **** else // I2C-Daten sind gültig |
||
727 | 493:src/main.c **** { |
||
728 | 494:src/main.c **** sollwert = I2C_RXBuffer; |
||
729 | 381 .LM34: |
||
730 | 382 0134 8091 0000 lds r24,I2C_RXBuffer |
||
731 | 383 0138 9927 clr r25 |
||
732 | 384 013a 9093 0000 sts (sollwert.2390)+1,r25 |
||
733 | 385 013e 8093 0000 sts sollwert.2390,r24 |
||
734 | 495:src/main.c **** PPM_Betrieb = 0; |
||
735 | 387 .LM35: |
||
736 | 388 0142 1092 0000 sts PPM_Betrieb,__zero_reg__ |
||
737 | 496:src/main.c **** PORTC &= ~ROT; |
||
738 | 390 .LM36: |
||
739 | 391 0146 AB98 cbi 53-0x20,3 |
||
740 | 497:src/main.c **** ICP_INT_DISABLE; |
||
741 | 393 .LM37: |
||
742 | 394 0148 89B7 in r24,89-0x20 |
||
743 | 395 014a 8F7D andi r24,lo8(-33) |
||
744 | 396 014c 89BF out 89-0x20,r24 |
||
745 | 397 .L24: |
||
746 | 498:src/main.c **** } |
||
747 | 499:src/main.c **** if(sollwert > MAX_PWM) sollwert = MAX_PWM; |
||
748 | 399 .LM38: |
||
749 | 400 014e 8091 0000 lds r24,sollwert.2390 |
||
750 | 401 0152 9091 0000 lds r25,(sollwert.2390)+1 |
||
751 | 402 0156 8F3F cpi r24,255 |
||
752 | 403 0158 9105 cpc r25,__zero_reg__ |
||
753 | 404 015a 01F0 breq .L35 |
||
754 | 405 015c 00F0 brlo .L35 |
||
755 | 406 015e 8FEF ldi r24,lo8(255) |
||
756 | 407 0160 90E0 ldi r25,hi8(255) |
||
757 | 408 0162 9093 0000 sts (sollwert.2390)+1,r25 |
||
758 | 409 0166 8093 0000 sts sollwert.2390,r24 |
||
759 | 410 .L35: |
||
760 | 411 016a 8091 0000 lds r24,sollwert.2390 |
||
761 | 500:src/main.c **** return(sollwert); |
||
762 | 501:src/main.c **** } |
||
763 | 413 .LM39: |
||
764 | 414 016e 9927 clr r25 |
||
765 | 415 /* epilogue: frame size=0 */ |
||
766 | 416 0170 0895 ret |
||
767 | 417 /* epilogue end (size=1) */ |
||
768 | 418 /* function SollwertErmittlung size 127 (126) */ |
||
769 | 424 .Lscope5: |
||
770 | 426 .stabd 78,0,0 |
||
771 | 428 .global DebugAusgaben |
||
772 | 430 DebugAusgaben: |
||
773 | 431 .stabd 46,0,0 |
||
774 | 502:src/main.c **** |
||
775 | 503:src/main.c **** void DebugAusgaben(void) |
||
776 | 504:src/main.c **** { |
||
777 | 433 .LM40: |
||
778 | 434 .LFBB6: |
||
779 | 435 /* prologue: frame size=0 */ |
||
780 | 436 /* prologue end (size=0) */ |
||
781 | 505:src/main.c **** DebugOut.Analog[0] = Strom; |
||
782 | 438 .LM41: |
||
783 | 439 0172 8091 0000 lds r24,Strom |
||
784 | 440 0176 9091 0000 lds r25,(Strom)+1 |
||
785 | 441 017a 9093 0000 sts (DebugOut+18)+1,r25 |
||
786 | 442 017e 8093 0000 sts DebugOut+18,r24 |
||
787 | 506:src/main.c **** DebugOut.Analog[1] = Mittelstrom; |
||
788 | 444 .LM42: |
||
789 | 445 0182 8091 0000 lds r24,Mittelstrom |
||
790 | 446 0186 9927 clr r25 |
||
791 | 447 0188 9093 0000 sts (DebugOut+20)+1,r25 |
||
792 | 448 018c 8093 0000 sts DebugOut+20,r24 |
||
793 | 507:src/main.c **** DebugOut.Analog[2] = SIO_Drehzahl; |
||
794 | 450 .LM43: |
||
795 | 451 0190 8091 0000 lds r24,SIO_Drehzahl |
||
796 | 452 0194 9091 0000 lds r25,(SIO_Drehzahl)+1 |
||
797 | 453 0198 9093 0000 sts (DebugOut+22)+1,r25 |
||
798 | 454 019c 8093 0000 sts DebugOut+22,r24 |
||
799 | 508:src/main.c **** DebugOut.Analog[3] = PPM_Signal; |
||
800 | 456 .LM44: |
||
801 | 457 01a0 8091 0000 lds r24,PPM_Signal |
||
802 | 458 01a4 9091 0000 lds r25,(PPM_Signal)+1 |
||
803 | 459 01a8 9093 0000 sts (DebugOut+24)+1,r25 |
||
804 | 460 01ac 8093 0000 sts DebugOut+24,r24 |
||
805 | 461 /* epilogue: frame size=0 */ |
||
806 | 462 01b0 0895 ret |
||
807 | 463 /* epilogue end (size=1) */ |
||
808 | 464 /* function DebugAusgaben size 32 (31) */ |
||
809 | 466 .Lscope6: |
||
810 | 468 .stabd 78,0,0 |
||
811 | 471 .global RotBlink |
||
812 | 473 RotBlink: |
||
813 | 474 .stabd 46,0,0 |
||
814 | 476 .LM45: |
||
815 | 477 .LFBB7: |
||
816 | 478 /* prologue: frame size=0 */ |
||
817 | 479 01b2 1F93 push r17 |
||
818 | 480 /* prologue end (size=1) */ |
||
819 | 481 01b4 182F mov r17,r24 |
||
820 | 483 .LM46: |
||
821 | 484 /* #APP */ |
||
822 | 485 01b6 7894 sei |
||
823 | 486 /* #NOAPP */ |
||
824 | 487 01b8 00C0 rjmp .L41 |
||
825 | 488 .L42: |
||
826 | 490 .LM47: |
||
827 | 491 01ba AB9A sbi 53-0x20,3 |
||
828 | 493 .LM48: |
||
829 | 494 01bc 8CE2 ldi r24,lo8(300) |
||
830 | 495 01be 91E0 ldi r25,hi8(300) |
||
831 | 496 01c0 00D0 rcall Delay_ms |
||
832 | 498 .LM49: |
||
833 | 499 01c2 AB98 cbi 53-0x20,3 |
||
834 | 501 .LM50: |
||
835 | 502 01c4 8CE2 ldi r24,lo8(300) |
||
836 | 503 01c6 91E0 ldi r25,hi8(300) |
||
837 | 504 01c8 00D0 rcall Delay_ms |
||
838 | 505 .L41: |
||
839 | 507 .LM51: |
||
840 | 508 01ca 1150 subi r17,1 |
||
841 | 509 01cc 00F4 brcc .L42 |
||
842 | 511 .LM52: |
||
843 | 512 01ce 88EE ldi r24,lo8(1000) |
||
844 | 513 01d0 93E0 ldi r25,hi8(1000) |
||
845 | 514 01d2 00D0 rcall Delay_ms |
||
846 | 515 /* epilogue: frame size=0 */ |
||
847 | 516 01d4 1F91 pop r17 |
||
848 | 517 01d6 0895 ret |
||
849 | 518 /* epilogue end (size=2) */ |
||
850 | 519 /* function RotBlink size 21 (18) */ |
||
851 | 521 .Lscope7: |
||
852 | 523 .stabd 78,0,0 |
||
853 | 526 .global DelayM |
||
854 | 528 DelayM: |
||
855 | 529 .stabd 46,0,0 |
||
856 | 531 .LM53: |
||
857 | 532 .LFBB8: |
||
858 | 533 /* prologue: frame size=0 */ |
||
859 | 534 01d8 CF93 push r28 |
||
860 | 535 01da DF93 push r29 |
||
861 | 536 /* prologue end (size=2) */ |
||
862 | 537 01dc EC01 movw r28,r24 |
||
863 | 538 01de 00C0 rjmp .L46 |
||
864 | 539 .L47: |
||
865 | 541 .LM54: |
||
866 | 542 01e0 00D0 rcall FastADConvert |
||
867 | 544 .LM55: |
||
868 | 545 01e2 8091 0000 lds r24,RuheStrom |
||
869 | 546 01e6 9091 0000 lds r25,(RuheStrom)+1 |
||
870 | 547 01ea 8858 subi r24,lo8(-(120)) |
||
871 | 548 01ec 9F4F sbci r25,hi8(-(120)) |
||
872 | 549 01ee 2091 0000 lds r18,Strom |
||
873 | 550 01f2 3091 0000 lds r19,(Strom)+1 |
||
874 | 551 01f6 8217 cp r24,r18 |
||
875 | 552 01f8 9307 cpc r25,r19 |
||
876 | 553 01fa 00F4 brsh .L46 |
||
877 | 555 .LM56: |
||
878 | 556 01fc 82B3 in r24,50-0x20 |
||
879 | 557 01fe 877C andi r24,lo8(-57) |
||
880 | 558 0200 82BB out 50-0x20,r24 |
||
881 | 559 0202 88B3 in r24,56-0x20 |
||
882 | 560 0204 817F andi r24,lo8(-15) |
||
883 | 561 0206 88BB out 56-0x20,r24 |
||
884 | 562 0208 81E0 ldi r24,lo8(1) |
||
885 | 563 020a 90E0 ldi r25,hi8(1) |
||
886 | 564 020c 00C0 rjmp .L49 |
||
887 | 565 .L46: |
||
888 | 567 .LM57: |
||
889 | 568 020e 2197 sbiw r28,1 |
||
890 | 569 0210 8FEF ldi r24,hi8(-1) |
||
891 | 570 0212 CF3F cpi r28,lo8(-1) |
||
892 | 571 0214 D807 cpc r29,r24 |
||
893 | 572 0216 01F4 brne .L47 |
||
894 | 573 0218 80E0 ldi r24,lo8(0) |
||
895 | 574 021a 90E0 ldi r25,hi8(0) |
||
896 | 575 .L49: |
||
897 | 576 /* epilogue: frame size=0 */ |
||
898 | 577 021c DF91 pop r29 |
||
899 | 578 021e CF91 pop r28 |
||
900 | 579 0220 0895 ret |
||
901 | 580 /* epilogue end (size=3) */ |
||
902 | 581 /* function DelayM size 37 (32) */ |
||
903 | 583 .Lscope8: |
||
904 | 585 .stabd 78,0,0 |
||
905 | 587 .global MotorTon |
||
906 | 589 MotorTon: |
||
907 | 590 .stabd 46,0,0 |
||
908 | 592 .LM58: |
||
909 | 593 .LFBB9: |
||
910 | 594 /* prologue: frame size=5 */ |
||
911 | 595 0222 8F92 push r8 |
||
912 | 596 0224 9F92 push r9 |
||
913 | 597 0226 BF92 push r11 |
||
914 | 598 0228 CF92 push r12 |
||
915 | 599 022a DF92 push r13 |
||
916 | 600 022c EF92 push r14 |
||
917 | 601 022e FF92 push r15 |
||
918 | 602 0230 0F93 push r16 |
||
919 | 603 0232 1F93 push r17 |
||
920 | 604 0234 CF93 push r28 |
||
921 | 605 0236 DF93 push r29 |
||
922 | 606 0238 CDB7 in r28,__SP_L__ |
||
923 | 607 023a DEB7 in r29,__SP_H__ |
||
924 | 608 023c 2597 sbiw r28,5 |
||
925 | 609 023e 0FB6 in __tmp_reg__,__SREG__ |
||
926 | 610 0240 F894 cli |
||
927 | 611 0242 DEBF out __SP_H__,r29 |
||
928 | 612 0244 0FBE out __SREG__,__tmp_reg__ |
||
929 | 613 0246 CDBF out __SP_L__,r28 |
||
930 | 614 /* prologue end (size=19) */ |
||
931 | 616 .LM59: |
||
932 | 617 0248 DE01 movw r26,r28 |
||
933 | 618 024a 1196 adiw r26,1 |
||
934 | 619 024c E0E0 ldi r30,lo8(C.8.2210) |
||
935 | 620 024e F0E0 ldi r31,hi8(C.8.2210) |
||
936 | 621 0250 85E0 ldi r24,lo8(5) |
||
937 | 622 .L55: |
||
938 | 624 .LM60: |
||
939 | 625 0252 0190 ld r0,Z+ |
||
940 | 626 0254 0D92 st X+,r0 |
||
941 | 627 0256 8150 subi r24,lo8(-(-1)) |
||
942 | 628 0258 01F4 brne .L55 |
||
943 | 630 .LM61: |
||
944 | 631 025a AB98 cbi 53-0x20,3 |
||
945 | 633 .LM62: |
||
946 | 634 025c 8091 0000 lds r24,MotorAdresse |
||
947 | 635 0260 FE01 movw r30,r28 |
||
948 | 636 0262 E80F add r30,r24 |
||
949 | 637 0264 F11D adc r31,__zero_reg__ |
||
950 | 638 0266 8181 ldd r24,Z+1 |
||
951 | 639 0268 9927 clr r25 |
||
952 | 640 026a 2CE2 ldi r18,lo8(300) |
||
953 | 641 026c 31E0 ldi r19,hi8(300) |
||
954 | 642 026e AC01 movw r20,r24 |
||
955 | 643 0270 429F mul r20,r18 |
||
956 | 644 0272 C001 movw r24,r0 |
||
957 | 645 0274 439F mul r20,r19 |
||
958 | 646 0276 900D add r25,r0 |
||
959 | 647 0278 529F mul r21,r18 |
||
960 | 648 027a 900D add r25,r0 |
||
961 | 649 027c 1124 clr r1 |
||
962 | 650 027e 00D0 rcall Delay_ms |
||
963 | 652 .LM63: |
||
964 | 653 0280 1092 0000 sts CompInterruptFreigabe,__zero_reg__ |
||
965 | 654 0284 4398 cbi 40-0x20,3 |
||
966 | 656 .LM64: |
||
967 | 657 /* #APP */ |
||
968 | 658 0286 F894 cli |
||
969 | 660 .LM65: |
||
970 | 661 /* #NOAPP */ |
||
971 | 662 0288 8AE0 ldi r24,lo8(10) |
||
972 | 663 028a 00D0 rcall uart_putchar |
||
973 | 665 .LM66: |
||
974 | 666 028c 82B3 in r24,50-0x20 |
||
975 | 667 028e 877C andi r24,lo8(-57) |
||
976 | 668 0290 82BB out 50-0x20,r24 |
||
977 | 669 0292 81E0 ldi r24,lo8(1) |
||
978 | 670 0294 8FBD out 79-0x20,r24 |
||
979 | 671 0296 81E4 ldi r24,lo8(65) |
||
980 | 672 0298 85BD out 69-0x20,r24 |
||
981 | 673 029a 8EE0 ldi r24,lo8(14) |
||
982 | 674 029c 87BB out 55-0x20,r24 |
||
983 | 675 029e 88B3 in r24,56-0x20 |
||
984 | 676 02a0 817F andi r24,lo8(-15) |
||
985 | 677 02a2 88BB out 56-0x20,r24 |
||
986 | 679 .LM67: |
||
987 | 680 02a4 1092 0000 sts Strom_max,__zero_reg__ |
||
988 | 682 .LM68: |
||
989 | 683 02a8 82E3 ldi r24,lo8(50) |
||
990 | 684 02aa 90E0 ldi r25,hi8(50) |
||
991 | 685 02ac 00D0 rcall DelayM |
||
992 | 687 .LM69: |
||
993 | 688 02ae 8091 0000 lds r24,Strom_max |
||
994 | 689 02b2 9927 clr r25 |
||
995 | 690 02b4 9093 0000 sts (RuheStrom)+1,r25 |
||
996 | 691 02b8 8093 0000 sts RuheStrom,r24 |
||
997 | 693 .LM70: |
||
998 | 694 02bc 1092 0000 sts (Strom)+1,__zero_reg__ |
||
999 | 695 02c0 1092 0000 sts Strom,__zero_reg__ |
||
1000 | 697 .LM71: |
||
1001 | 698 02c4 949A sbi 50-0x20,4 |
||
1002 | 700 .LM72: |
||
1003 | 701 02c6 C39A sbi 56-0x20,3 |
||
1004 | 703 .LM73: |
||
1005 | 704 02c8 83E0 ldi r24,lo8(3) |
||
1006 | 705 02ca 90E0 ldi r25,hi8(3) |
||
1007 | 706 02cc 00D0 rcall DelayM |
||
1008 | 707 02ce 8823 tst r24 |
||
1009 | 708 02d0 01F4 brne .L56 |
||
1010 | 709 02d2 BB24 clr r11 |
||
1011 | 710 02d4 00C0 rjmp .L58 |
||
1012 | 711 .L56: |
||
1013 | 713 .LM74: |
||
1014 | 714 02d6 81E3 ldi r24,lo8(49) |
||
1015 | 715 02d8 00D0 rcall uart_putchar |
||
1016 | 716 02da BB24 clr r11 |
||
1017 | 717 02dc B394 inc r11 |
||
1018 | 718 .L58: |
||
1019 | 720 .LM75: |
||
1020 | 721 02de 82B3 in r24,50-0x20 |
||
1021 | 722 02e0 877C andi r24,lo8(-57) |
||
1022 | 723 02e2 82BB out 50-0x20,r24 |
||
1023 | 724 02e4 88B3 in r24,56-0x20 |
||
1024 | 725 02e6 817F andi r24,lo8(-15) |
||
1025 | 726 02e8 88BB out 56-0x20,r24 |
||
1026 | 728 .LM76: |
||
1027 | 729 02ea 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1028 | 730 02ee 1092 0000 sts Strom,__zero_reg__ |
||
1029 | 732 .LM77: |
||
1030 | 733 02f2 939A sbi 50-0x20,3 |
||
1031 | 735 .LM78: |
||
1032 | 736 02f4 C29A sbi 56-0x20,2 |
||
1033 | 738 .LM79: |
||
1034 | 739 02f6 83E0 ldi r24,lo8(3) |
||
1035 | 740 02f8 90E0 ldi r25,hi8(3) |
||
1036 | 741 02fa 00D0 rcall DelayM |
||
1037 | 742 02fc 8823 tst r24 |
||
1038 | 743 02fe 01F0 breq .L59 |
||
1039 | 745 .LM80: |
||
1040 | 746 0300 82E3 ldi r24,lo8(50) |
||
1041 | 747 0302 00D0 rcall uart_putchar |
||
1042 | 748 0304 B2E0 ldi r27,lo8(2) |
||
1043 | 749 0306 BB2E mov r11,r27 |
||
1044 | 750 .L59: |
||
1045 | 752 .LM81: |
||
1046 | 753 0308 82B3 in r24,50-0x20 |
||
1047 | 754 030a 877C andi r24,lo8(-57) |
||
1048 | 755 030c 82BB out 50-0x20,r24 |
||
1049 | 756 030e 88B3 in r24,56-0x20 |
||
1050 | 757 0310 817F andi r24,lo8(-15) |
||
1051 | 758 0312 88BB out 56-0x20,r24 |
||
1052 | 760 .LM82: |
||
1053 | 761 0314 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1054 | 762 0318 1092 0000 sts Strom,__zero_reg__ |
||
1055 | 764 .LM83: |
||
1056 | 765 031c 949A sbi 50-0x20,4 |
||
1057 | 767 .LM84: |
||
1058 | 768 031e C19A sbi 56-0x20,1 |
||
1059 | 770 .LM85: |
||
1060 | 771 0320 83E0 ldi r24,lo8(3) |
||
1061 | 772 0322 90E0 ldi r25,hi8(3) |
||
1062 | 773 0324 00D0 rcall DelayM |
||
1063 | 774 0326 8823 tst r24 |
||
1064 | 775 0328 01F0 breq .L61 |
||
1065 | 777 .LM86: |
||
1066 | 778 032a 83E3 ldi r24,lo8(51) |
||
1067 | 779 032c 00D0 rcall uart_putchar |
||
1068 | 780 032e A3E0 ldi r26,lo8(3) |
||
1069 | 781 0330 BA2E mov r11,r26 |
||
1070 | 782 .L61: |
||
1071 | 784 .LM87: |
||
1072 | 785 0332 82B3 in r24,50-0x20 |
||
1073 | 786 0334 877C andi r24,lo8(-57) |
||
1074 | 787 0336 82BB out 50-0x20,r24 |
||
1075 | 788 0338 88B3 in r24,56-0x20 |
||
1076 | 789 033a 817F andi r24,lo8(-15) |
||
1077 | 790 033c 88BB out 56-0x20,r24 |
||
1078 | 792 .LM88: |
||
1079 | 793 033e 939A sbi 50-0x20,3 |
||
1080 | 795 .LM89: |
||
1081 | 796 0340 C19A sbi 56-0x20,1 |
||
1082 | 798 .LM90: |
||
1083 | 799 0342 83E0 ldi r24,lo8(3) |
||
1084 | 800 0344 90E0 ldi r25,hi8(3) |
||
1085 | 801 0346 00D0 rcall DelayM |
||
1086 | 802 0348 8823 tst r24 |
||
1087 | 803 034a 01F0 breq .L63 |
||
1088 | 805 .LM91: |
||
1089 | 806 034c 87E3 ldi r24,lo8(55) |
||
1090 | 807 034e 00D0 rcall uart_putchar |
||
1091 | 808 0350 F3E0 ldi r31,lo8(3) |
||
1092 | 809 0352 BF2E mov r11,r31 |
||
1093 | 810 .L63: |
||
1094 | 812 .LM92: |
||
1095 | 813 0354 82B3 in r24,50-0x20 |
||
1096 | 814 0356 877C andi r24,lo8(-57) |
||
1097 | 815 0358 82BB out 50-0x20,r24 |
||
1098 | 816 035a 88B3 in r24,56-0x20 |
||
1099 | 817 035c 817F andi r24,lo8(-15) |
||
1100 | 818 035e 88BB out 56-0x20,r24 |
||
1101 | 820 .LM93: |
||
1102 | 821 0360 80E1 ldi r24,lo8(10000) |
||
1103 | 822 0362 97E2 ldi r25,hi8(10000) |
||
1104 | 823 0364 00D0 rcall DelayM |
||
1105 | 825 .LM94: |
||
1106 | 826 0366 BB20 tst r11 |
||
1107 | 827 0368 01F0 breq .L65 |
||
1108 | 828 .L138: |
||
1109 | 829 036a 8B2D mov r24,r11 |
||
1110 | 830 036c 00D0 rcall RotBlink |
||
1111 | 831 036e 00C0 rjmp .L138 |
||
1112 | 832 .L65: |
||
1113 | 834 .LM95: |
||
1114 | 835 0370 8CB1 in r24,44-0x20 |
||
1115 | 836 0372 8032 cpi r24,lo8(32) |
||
1116 | 837 0374 01F0 breq .L67 |
||
1117 | 838 0376 E8EE ldi r30,lo8(1000) |
||
1118 | 839 0378 8E2E mov r8,r30 |
||
1119 | 840 037a E3E0 ldi r30,hi8(1000) |
||
1120 | 841 037c 9E2E mov r9,r30 |
||
1121 | 842 037e 82E3 ldi r24,lo8(50) |
||
1122 | 843 0380 00C0 rjmp .L69 |
||
1123 | 844 .L67: |
||
1124 | 845 0382 8FE5 ldi r24,lo8(95) |
||
1125 | 846 0384 00D0 rcall uart_putchar |
||
1126 | 847 0386 8824 clr r8 |
||
1127 | 848 0388 8A94 dec r8 |
||
1128 | 849 038a 982C mov r9,r8 |
||
1129 | 850 038c 88E2 ldi r24,lo8(40) |
||
1130 | 851 .L69: |
||
1131 | 853 .LM96: |
||
1132 | 854 038e 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1133 | 855 0392 1092 0000 sts Strom,__zero_reg__ |
||
1134 | 856 0396 00E0 ldi r16,lo8(0) |
||
1135 | 857 0398 10E0 ldi r17,hi8(0) |
||
1136 | 859 .LM97: |
||
1137 | 860 039a C82E mov r12,r24 |
||
1138 | 861 039c DD24 clr r13 |
||
1139 | 862 .L70: |
||
1140 | 864 .LM98: |
||
1141 | 865 039e 939A sbi 50-0x20,3 |
||
1142 | 867 .LM99: |
||
1143 | 868 03a0 81E0 ldi r24,lo8(1) |
||
1144 | 869 03a2 90E0 ldi r25,hi8(1) |
||
1145 | 870 03a4 00D0 rcall DelayM |
||
1146 | 872 .LM100: |
||
1147 | 873 03a6 82B3 in r24,50-0x20 |
||
1148 | 874 03a8 877C andi r24,lo8(-57) |
||
1149 | 875 03aa 82BB out 50-0x20,r24 |
||
1150 | 876 03ac 88B3 in r24,56-0x20 |
||
1151 | 877 03ae 817F andi r24,lo8(-15) |
||
1152 | 878 03b0 88BB out 56-0x20,r24 |
||
1153 | 880 .LM101: |
||
1154 | 881 03b2 C39A sbi 56-0x20,3 |
||
1155 | 883 .LM102: |
||
1156 | 884 03b4 81E0 ldi r24,lo8(1) |
||
1157 | 885 03b6 90E0 ldi r25,hi8(1) |
||
1158 | 886 03b8 00D0 rcall DelayM |
||
1159 | 888 .LM103: |
||
1160 | 889 03ba 82B3 in r24,50-0x20 |
||
1161 | 890 03bc 877C andi r24,lo8(-57) |
||
1162 | 891 03be 82BB out 50-0x20,r24 |
||
1163 | 892 03c0 88B3 in r24,56-0x20 |
||
1164 | 893 03c2 817F andi r24,lo8(-15) |
||
1165 | 894 03c4 88BB out 56-0x20,r24 |
||
1166 | 896 .LM104: |
||
1167 | 897 03c6 7601 movw r14,r12 |
||
1168 | 898 03c8 8091 0000 lds r24,RuheStrom |
||
1169 | 899 03cc 9091 0000 lds r25,(RuheStrom)+1 |
||
1170 | 900 03d0 8C0D add r24,r12 |
||
1171 | 901 03d2 9D1D adc r25,r13 |
||
1172 | 902 03d4 2091 0000 lds r18,Strom |
||
1173 | 903 03d8 3091 0000 lds r19,(Strom)+1 |
||
1174 | 904 03dc 8217 cp r24,r18 |
||
1175 | 905 03de 9307 cpc r25,r19 |
||
1176 | 906 03e0 00F4 brsh .L71 |
||
1177 | 907 03e2 84E3 ldi r24,lo8(52) |
||
1178 | 908 03e4 00D0 rcall uart_putchar |
||
1179 | 909 03e6 74E0 ldi r23,lo8(4) |
||
1180 | 910 03e8 B72E mov r11,r23 |
||
1181 | 911 03ea 00C0 rjmp .L73 |
||
1182 | 912 .L71: |
||
1183 | 914 .LM105: |
||
1184 | 915 03ec 0F5F subi r16,lo8(-(1)) |
||
1185 | 916 03ee 1F4F sbci r17,hi8(-(1)) |
||
1186 | 917 03f0 0815 cp r16,r8 |
||
1187 | 918 03f2 1905 cpc r17,r9 |
||
1188 | 919 03f4 01F4 brne .L70 |
||
1189 | 920 .L73: |
||
1190 | 922 .LM106: |
||
1191 | 923 03f6 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1192 | 924 03fa 1092 0000 sts Strom,__zero_reg__ |
||
1193 | 925 03fe 00E0 ldi r16,lo8(0) |
||
1194 | 926 0400 10E0 ldi r17,hi8(0) |
||
1195 | 927 .L74: |
||
1196 | 929 .LM107: |
||
1197 | 930 0402 949A sbi 50-0x20,4 |
||
1198 | 932 .LM108: |
||
1199 | 933 0404 81E0 ldi r24,lo8(1) |
||
1200 | 934 0406 90E0 ldi r25,hi8(1) |
||
1201 | 935 0408 00D0 rcall DelayM |
||
1202 | 937 .LM109: |
||
1203 | 938 040a 82B3 in r24,50-0x20 |
||
1204 | 939 040c 877C andi r24,lo8(-57) |
||
1205 | 940 040e 82BB out 50-0x20,r24 |
||
1206 | 941 0410 88B3 in r24,56-0x20 |
||
1207 | 942 0412 817F andi r24,lo8(-15) |
||
1208 | 943 0414 88BB out 56-0x20,r24 |
||
1209 | 945 .LM110: |
||
1210 | 946 0416 C29A sbi 56-0x20,2 |
||
1211 | 948 .LM111: |
||
1212 | 949 0418 81E0 ldi r24,lo8(1) |
||
1213 | 950 041a 90E0 ldi r25,hi8(1) |
||
1214 | 951 041c 00D0 rcall DelayM |
||
1215 | 953 .LM112: |
||
1216 | 954 041e 82B3 in r24,50-0x20 |
||
1217 | 955 0420 877C andi r24,lo8(-57) |
||
1218 | 956 0422 82BB out 50-0x20,r24 |
||
1219 | 957 0424 88B3 in r24,56-0x20 |
||
1220 | 958 0426 817F andi r24,lo8(-15) |
||
1221 | 959 0428 88BB out 56-0x20,r24 |
||
1222 | 961 .LM113: |
||
1223 | 962 042a 8091 0000 lds r24,RuheStrom |
||
1224 | 963 042e 9091 0000 lds r25,(RuheStrom)+1 |
||
1225 | 964 0432 8E0D add r24,r14 |
||
1226 | 965 0434 9F1D adc r25,r15 |
||
1227 | 966 0436 2091 0000 lds r18,Strom |
||
1228 | 967 043a 3091 0000 lds r19,(Strom)+1 |
||
1229 | 968 043e 8217 cp r24,r18 |
||
1230 | 969 0440 9307 cpc r25,r19 |
||
1231 | 970 0442 00F4 brsh .L75 |
||
1232 | 971 0444 85E3 ldi r24,lo8(53) |
||
1233 | 972 0446 00D0 rcall uart_putchar |
||
1234 | 973 0448 65E0 ldi r22,lo8(5) |
||
1235 | 974 044a B62E mov r11,r22 |
||
1236 | 975 044c 00C0 rjmp .L77 |
||
1237 | 976 .L75: |
||
1238 | 978 .LM114: |
||
1239 | 979 044e 0F5F subi r16,lo8(-(1)) |
||
1240 | 980 0450 1F4F sbci r17,hi8(-(1)) |
||
1241 | 981 0452 0815 cp r16,r8 |
||
1242 | 982 0454 1905 cpc r17,r9 |
||
1243 | 983 0456 01F4 brne .L74 |
||
1244 | 984 .L77: |
||
1245 | 986 .LM115: |
||
1246 | 987 0458 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1247 | 988 045c 1092 0000 sts Strom,__zero_reg__ |
||
1248 | 989 0460 00E0 ldi r16,lo8(0) |
||
1249 | 990 0462 10E0 ldi r17,hi8(0) |
||
1250 | 991 .L78: |
||
1251 | 993 .LM116: |
||
1252 | 994 0464 959A sbi 50-0x20,5 |
||
1253 | 996 .LM117: |
||
1254 | 997 0466 81E0 ldi r24,lo8(1) |
||
1255 | 998 0468 90E0 ldi r25,hi8(1) |
||
1256 | 999 046a 00D0 rcall DelayM |
||
1257 | 1001 .LM118: |
||
1258 | 1002 046c 82B3 in r24,50-0x20 |
||
1259 | 1003 046e 877C andi r24,lo8(-57) |
||
1260 | 1004 0470 82BB out 50-0x20,r24 |
||
1261 | 1005 0472 88B3 in r24,56-0x20 |
||
1262 | 1006 0474 817F andi r24,lo8(-15) |
||
1263 | 1007 0476 88BB out 56-0x20,r24 |
||
1264 | 1009 .LM119: |
||
1265 | 1010 0478 C19A sbi 56-0x20,1 |
||
1266 | 1012 .LM120: |
||
1267 | 1013 047a 81E0 ldi r24,lo8(1) |
||
1268 | 1014 047c 90E0 ldi r25,hi8(1) |
||
1269 | 1015 047e 00D0 rcall DelayM |
||
1270 | 1017 .LM121: |
||
1271 | 1018 0480 82B3 in r24,50-0x20 |
||
1272 | 1019 0482 877C andi r24,lo8(-57) |
||
1273 | 1020 0484 82BB out 50-0x20,r24 |
||
1274 | 1021 0486 88B3 in r24,56-0x20 |
||
1275 | 1022 0488 817F andi r24,lo8(-15) |
||
1276 | 1023 048a 88BB out 56-0x20,r24 |
||
1277 | 1025 .LM122: |
||
1278 | 1026 048c 8091 0000 lds r24,RuheStrom |
||
1279 | 1027 0490 9091 0000 lds r25,(RuheStrom)+1 |
||
1280 | 1028 0494 8E0D add r24,r14 |
||
1281 | 1029 0496 9F1D adc r25,r15 |
||
1282 | 1030 0498 2091 0000 lds r18,Strom |
||
1283 | 1031 049c 3091 0000 lds r19,(Strom)+1 |
||
1284 | 1032 04a0 8217 cp r24,r18 |
||
1285 | 1033 04a2 9307 cpc r25,r19 |
||
1286 | 1034 04a4 00F4 brsh .L79 |
||
1287 | 1035 04a6 86E3 ldi r24,lo8(54) |
||
1288 | 1036 04a8 00D0 rcall uart_putchar |
||
1289 | 1037 04aa 56E0 ldi r21,lo8(6) |
||
1290 | 1038 04ac B52E mov r11,r21 |
||
1291 | 1039 04ae 00C0 rjmp .L81 |
||
1292 | 1040 .L79: |
||
1293 | 1042 .LM123: |
||
1294 | 1043 04b0 0F5F subi r16,lo8(-(1)) |
||
1295 | 1044 04b2 1F4F sbci r17,hi8(-(1)) |
||
1296 | 1045 04b4 0815 cp r16,r8 |
||
1297 | 1046 04b6 1905 cpc r17,r9 |
||
1298 | 1047 04b8 01F4 brne .L78 |
||
1299 | 1048 .L81: |
||
1300 | 1050 .LM124: |
||
1301 | 1051 04ba 17B8 out 39-0x20,__zero_reg__ |
||
1302 | 1053 .LM125: |
||
1303 | 1054 04bc 82B3 in r24,50-0x20 |
||
1304 | 1055 04be 877C andi r24,lo8(-57) |
||
1305 | 1056 04c0 82BB out 50-0x20,r24 |
||
1306 | 1057 04c2 88B3 in r24,56-0x20 |
||
1307 | 1058 04c4 817F andi r24,lo8(-15) |
||
1308 | 1059 04c6 88BB out 56-0x20,r24 |
||
1309 | 1061 .LM126: |
||
1310 | 1062 04c8 949A sbi 50-0x20,4 |
||
1311 | 1064 .LM127: |
||
1312 | 1065 04ca 959A sbi 50-0x20,5 |
||
1313 | 1067 .LM128: |
||
1314 | 1068 04cc 1092 0000 sts (Strom)+1,__zero_reg__ |
||
1315 | 1069 04d0 1092 0000 sts Strom,__zero_reg__ |
||
1316 | 1070 04d4 00E0 ldi r16,lo8(0) |
||
1317 | 1071 04d6 10E0 ldi r17,hi8(0) |
||
1318 | 1072 04d8 FF24 clr r15 |
||
1319 | 1073 .L82: |
||
1320 | 1075 .LM129: |
||
1321 | 1076 04da C39A sbi 56-0x20,3 |
||
1322 | 1078 .LM130: |
||
1323 | 1079 04dc 80E0 ldi r24,lo8(0) |
||
1324 | 1080 04de 90E0 ldi r25,hi8(0) |
||
1325 | 1081 04e0 00D0 rcall MessAD |
||
1326 | 1082 04e2 C397 sbiw r24,51 |
||
1327 | 1083 04e4 04F0 brlt .L83 |
||
1328 | 1084 04e6 51E0 ldi r21,lo8(1) |
||
1329 | 1085 04e8 F52A or r15,r21 |
||
1330 | 1086 04ea 00C0 rjmp .L85 |
||
1331 | 1087 .L83: |
||
1332 | 1088 04ec 8EEF ldi r24,lo8(-2) |
||
1333 | 1089 04ee F822 and r15,r24 |
||
1334 | 1090 .L85: |
||
1335 | 1092 .LM131: |
||
1336 | 1093 04f0 18BA out 56-0x20,__zero_reg__ |
||
1337 | 1095 .LM132: |
||
1338 | 1096 04f2 0F5F subi r16,lo8(-(1)) |
||
1339 | 1097 04f4 1F4F sbci r17,hi8(-(1)) |
||
1340 | 1098 04f6 0937 cpi r16,121 |
||
1341 | 1099 04f8 1105 cpc r17,__zero_reg__ |
||
1342 | 1100 04fa 01F4 brne .L82 |
||
1343 | 1102 .LM133: |
||
1344 | 1103 04fc 82B3 in r24,50-0x20 |
||
1345 | 1104 04fe 877C andi r24,lo8(-57) |
||
1346 | 1105 0500 82BB out 50-0x20,r24 |
||
1347 | 1106 0502 88B3 in r24,56-0x20 |
||
1348 | 1107 0504 817F andi r24,lo8(-15) |
||
1349 | 1108 0506 88BB out 56-0x20,r24 |
||
1350 | 1110 .LM134: |
||
1351 | 1111 0508 939A sbi 50-0x20,3 |
||
1352 | 1113 .LM135: |
||
1353 | 1114 050a 959A sbi 50-0x20,5 |
||
1354 | 1115 050c 00E0 ldi r16,lo8(0) |
||
1355 | 1116 050e 10E0 ldi r17,hi8(0) |
||
1356 | 1117 .L87: |
||
1357 | 1119 .LM136: |
||
1358 | 1120 0510 C29A sbi 56-0x20,2 |
||
1359 | 1122 .LM137: |
||
1360 | 1123 0512 81E0 ldi r24,lo8(1) |
||
1361 | 1124 0514 90E0 ldi r25,hi8(1) |
||
1362 | 1125 0516 00D0 rcall MessAD |
||
1363 | 1126 0518 C397 sbiw r24,51 |
||
1364 | 1127 051a 04F0 brlt .L88 |
||
1365 | 1128 051c 42E0 ldi r20,lo8(2) |
||
1366 | 1129 051e F42A or r15,r20 |
||
1367 | 1130 0520 00C0 rjmp .L90 |
||
1368 | 1131 .L88: |
||
1369 | 1132 0522 5DEF ldi r21,lo8(-3) |
||
1370 | 1133 0524 F522 and r15,r21 |
||
1371 | 1134 .L90: |
||
1372 | 1136 .LM138: |
||
1373 | 1137 0526 18BA out 56-0x20,__zero_reg__ |
||
1374 | 1139 .LM139: |
||
1375 | 1140 0528 0F5F subi r16,lo8(-(1)) |
||
1376 | 1141 052a 1F4F sbci r17,hi8(-(1)) |
||
1377 | 1142 052c 0538 cpi r16,133 |
||
1378 | 1143 052e 1105 cpc r17,__zero_reg__ |
||
1379 | 1144 0530 01F4 brne .L87 |
||
1380 | 1146 .LM140: |
||
1381 | 1147 0532 82B3 in r24,50-0x20 |
||
1382 | 1148 0534 877C andi r24,lo8(-57) |
||
1383 | 1149 0536 82BB out 50-0x20,r24 |
||
1384 | 1150 0538 88B3 in r24,56-0x20 |
||
1385 | 1151 053a 817F andi r24,lo8(-15) |
||
1386 | 1152 053c 88BB out 56-0x20,r24 |
||
1387 | 1154 .LM141: |
||
1388 | 1155 053e 939A sbi 50-0x20,3 |
||
1389 | 1157 .LM142: |
||
1390 | 1158 0540 949A sbi 50-0x20,4 |
||
1391 | 1159 0542 00E0 ldi r16,lo8(0) |
||
1392 | 1160 0544 10E0 ldi r17,hi8(0) |
||
1393 | 1161 .L92: |
||
1394 | 1163 .LM143: |
||
1395 | 1164 0546 C19A sbi 56-0x20,1 |
||
1396 | 1166 .LM144: |
||
1397 | 1167 0548 82E0 ldi r24,lo8(2) |
||
1398 | 1168 054a 90E0 ldi r25,hi8(2) |
||
1399 | 1169 054c 00D0 rcall MessAD |
||
1400 | 1170 054e C397 sbiw r24,51 |
||
1401 | 1171 0550 04F0 brlt .L93 |
||
1402 | 1172 0552 84E0 ldi r24,lo8(4) |
||
1403 | 1173 0554 F82A or r15,r24 |
||
1404 | 1174 0556 00C0 rjmp .L95 |
||
1405 | 1175 .L93: |
||
1406 | 1176 0558 4BEF ldi r20,lo8(-5) |
||
1407 | 1177 055a F422 and r15,r20 |
||
1408 | 1178 .L95: |
||
1409 | 1180 .LM145: |
||
1410 | 1181 055c 18BA out 56-0x20,__zero_reg__ |
||
1411 | 1183 .LM146: |
||
1412 | 1184 055e 0F5F subi r16,lo8(-(1)) |
||
1413 | 1185 0560 1F4F sbci r17,hi8(-(1)) |
||
1414 | 1186 0562 0F36 cpi r16,111 |
||
1415 | 1187 0564 1105 cpc r17,__zero_reg__ |
||
1416 | 1188 0566 01F4 brne .L92 |
||
1417 | 1190 .LM147: |
||
1418 | 1191 0568 82B3 in r24,50-0x20 |
||
1419 | 1192 056a 877C andi r24,lo8(-57) |
||
1420 | 1193 056c 82BB out 50-0x20,r24 |
||
1421 | 1194 056e 88B3 in r24,56-0x20 |
||
1422 | 1195 0570 817F andi r24,lo8(-15) |
||
1423 | 1196 0572 88BB out 56-0x20,r24 |
||
1424 | 1198 .LM148: |
||
1425 | 1199 0574 81E0 ldi r24,lo8(1) |
||
1426 | 1200 0576 87B9 out 39-0x20,r24 |
||
1427 | 1202 .LM149: |
||
1428 | 1203 0578 939A sbi 50-0x20,3 |
||
1429 | 1204 057a 00E0 ldi r16,lo8(0) |
||
1430 | 1205 057c 10E0 ldi r17,hi8(0) |
||
1431 | 1206 .L97: |
||
1432 | 1208 .LM150: |
||
1433 | 1209 057e C29A sbi 56-0x20,2 |
||
1434 | 1211 .LM151: |
||
1435 | 1212 0580 80E0 ldi r24,lo8(0) |
||
1436 | 1213 0582 90E0 ldi r25,hi8(0) |
||
1437 | 1214 0584 00D0 rcall MessAD |
||
1438 | 1215 0586 C397 sbiw r24,51 |
||
1439 | 1216 0588 04F0 brlt .L98 |
||
1440 | 1217 058a 57EF ldi r21,lo8(-9) |
||
1441 | 1218 058c F522 and r15,r21 |
||
1442 | 1219 058e 00C0 rjmp .L100 |
||
1443 | 1220 .L98: |
||
1444 | 1221 0590 88E0 ldi r24,lo8(8) |
||
1445 | 1222 0592 F82A or r15,r24 |
||
1446 | 1223 .L100: |
||
1447 | 1225 .LM152: |
||
1448 | 1226 0594 18BA out 56-0x20,__zero_reg__ |
||
1449 | 1228 .LM153: |
||
1450 | 1229 0596 0F5F subi r16,lo8(-(1)) |
||
1451 | 1230 0598 1F4F sbci r17,hi8(-(1)) |
||
1452 | 1231 059a 0937 cpi r16,121 |
||
1453 | 1232 059c 1105 cpc r17,__zero_reg__ |
||
1454 | 1233 059e 01F4 brne .L97 |
||
1455 | 1235 .LM154: |
||
1456 | 1236 05a0 959A sbi 50-0x20,5 |
||
1457 | 1237 05a2 00E0 ldi r16,lo8(0) |
||
1458 | 1238 05a4 10E0 ldi r17,hi8(0) |
||
1459 | 1239 .L102: |
||
1460 | 1241 .LM155: |
||
1461 | 1242 05a6 C29A sbi 56-0x20,2 |
||
1462 | 1244 .LM156: |
||
1463 | 1245 05a8 82E0 ldi r24,lo8(2) |
||
1464 | 1246 05aa 90E0 ldi r25,hi8(2) |
||
1465 | 1247 05ac 00D0 rcall MessAD |
||
1466 | 1248 05ae C397 sbiw r24,51 |
||
1467 | 1249 05b0 04F0 brlt .L103 |
||
1468 | 1250 05b2 4FED ldi r20,lo8(-33) |
||
1469 | 1251 05b4 F422 and r15,r20 |
||
1470 | 1252 05b6 00C0 rjmp .L105 |
||
1471 | 1253 .L103: |
||
1472 | 1254 05b8 50E2 ldi r21,lo8(32) |
||
1473 | 1255 05ba F52A or r15,r21 |
||
1474 | 1256 .L105: |
||
1475 | 1258 .LM157: |
||
1476 | 1259 05bc 18BA out 56-0x20,__zero_reg__ |
||
1477 | 1261 .LM158: |
||
1478 | 1262 05be 0F5F subi r16,lo8(-(1)) |
||
1479 | 1263 05c0 1F4F sbci r17,hi8(-(1)) |
||
1480 | 1264 05c2 0538 cpi r16,133 |
||
1481 | 1265 05c4 1105 cpc r17,__zero_reg__ |
||
1482 | 1266 05c6 01F4 brne .L102 |
||
1483 | 1268 .LM159: |
||
1484 | 1269 05c8 82B3 in r24,50-0x20 |
||
1485 | 1270 05ca 877C andi r24,lo8(-57) |
||
1486 | 1271 05cc 82BB out 50-0x20,r24 |
||
1487 | 1272 05ce 88B3 in r24,56-0x20 |
||
1488 | 1273 05d0 817F andi r24,lo8(-15) |
||
1489 | 1274 05d2 88BB out 56-0x20,r24 |
||
1490 | 1276 .LM160: |
||
1491 | 1277 05d4 82B3 in r24,50-0x20 |
||
1492 | 1278 05d6 877C andi r24,lo8(-57) |
||
1493 | 1279 05d8 82BB out 50-0x20,r24 |
||
1494 | 1280 05da 88B3 in r24,56-0x20 |
||
1495 | 1281 05dc 817F andi r24,lo8(-15) |
||
1496 | 1282 05de 88BB out 56-0x20,r24 |
||
1497 | 1284 .LM161: |
||
1498 | 1285 05e0 949A sbi 50-0x20,4 |
||
1499 | 1286 05e2 00E0 ldi r16,lo8(0) |
||
1500 | 1287 05e4 10E0 ldi r17,hi8(0) |
||
1501 | 1288 .L107: |
||
1502 | 1290 .LM162: |
||
1503 | 1291 05e6 C19A sbi 56-0x20,1 |
||
1504 | 1293 .LM163: |
||
1505 | 1294 05e8 81E0 ldi r24,lo8(1) |
||
1506 | 1295 05ea 90E0 ldi r25,hi8(1) |
||
1507 | 1296 05ec 00D0 rcall MessAD |
||
1508 | 1297 05ee C397 sbiw r24,51 |
||
1509 | 1298 05f0 04F0 brlt .L108 |
||
1510 | 1299 05f2 8FEE ldi r24,lo8(-17) |
||
1511 | 1300 05f4 F822 and r15,r24 |
||
1512 | 1301 05f6 00C0 rjmp .L110 |
||
1513 | 1302 .L108: |
||
1514 | 1303 05f8 40E1 ldi r20,lo8(16) |
||
1515 | 1304 05fa F42A or r15,r20 |
||
1516 | 1305 .L110: |
||
1517 | 1307 .LM164: |
||
1518 | 1308 05fc 18BA out 56-0x20,__zero_reg__ |
||
1519 | 1310 .LM165: |
||
1520 | 1311 05fe 0F5F subi r16,lo8(-(1)) |
||
1521 | 1312 0600 1F4F sbci r17,hi8(-(1)) |
||
1522 | 1313 0602 0F36 cpi r16,111 |
||
1523 | 1314 0604 1105 cpc r17,__zero_reg__ |
||
1524 | 1315 0606 01F4 brne .L107 |
||
1525 | 1317 .LM166: |
||
1526 | 1318 0608 82B3 in r24,50-0x20 |
||
1527 | 1319 060a 877C andi r24,lo8(-57) |
||
1528 | 1320 060c 82BB out 50-0x20,r24 |
||
1529 | 1321 060e 88B3 in r24,56-0x20 |
||
1530 | 1322 0610 817F andi r24,lo8(-15) |
||
1531 | 1323 0612 88BB out 56-0x20,r24 |
||
1532 | 1325 .LM167: |
||
1533 | 1326 /* #APP */ |
||
1534 | 1327 0614 7894 sei |
||
1535 | 1329 .LM168: |
||
1536 | 1330 /* #NOAPP */ |
||
1537 | 1331 0616 8091 0000 lds r24,MotorAdresse |
||
1538 | 1332 061a FE01 movw r30,r28 |
||
1539 | 1333 061c E80F add r30,r24 |
||
1540 | 1334 061e F11D adc r31,__zero_reg__ |
||
1541 | 1335 0620 2181 ldd r18,Z+1 |
||
1542 | 1336 0622 84E0 ldi r24,lo8(4) |
||
1543 | 1337 0624 90E0 ldi r25,hi8(4) |
||
1544 | 1338 0626 821B sub r24,r18 |
||
1545 | 1339 0628 9109 sbc r25,__zero_reg__ |
||
1546 | 1340 062a 2CE2 ldi r18,lo8(300) |
||
1547 | 1341 062c 31E0 ldi r19,hi8(300) |
||
1548 | 1342 062e AC01 movw r20,r24 |
||
1549 | 1343 0630 429F mul r20,r18 |
||
1550 | 1344 0632 C001 movw r24,r0 |
||
1551 | 1345 0634 439F mul r20,r19 |
||
1552 | 1346 0636 900D add r25,r0 |
||
1553 | 1347 0638 529F mul r21,r18 |
||
1554 | 1348 063a 900D add r25,r0 |
||
1555 | 1349 063c 1124 clr r1 |
||
1556 | 1350 063e 00D0 rcall Delay_ms |
||
1557 | 1352 .LM169: |
||
1558 | 1353 0640 8F2D mov r24,r15 |
||
1559 | 1354 0642 9927 clr r25 |
||
1560 | 1355 0644 80FD sbrc r24,0 |
||
1561 | 1356 0646 00C0 rjmp .L112 |
||
1562 | 1357 0648 81E4 ldi r24,lo8(65) |
||
1563 | 1358 064a 8CB9 out 44-0x20,r24 |
||
1564 | 1359 064c BB24 clr r11 |
||
1565 | 1360 064e B394 inc r11 |
||
1566 | 1361 0650 00C0 rjmp .L114 |
||
1567 | 1362 .L112: |
||
1568 | 1364 .LM170: |
||
1569 | 1365 0652 81FD sbrc r24,1 |
||
1570 | 1366 0654 00C0 rjmp .L115 |
||
1571 | 1367 0656 82E4 ldi r24,lo8(66) |
||
1572 | 1368 0658 8CB9 out 44-0x20,r24 |
||
1573 | 1369 065a 42E0 ldi r20,lo8(2) |
||
1574 | 1370 065c B42E mov r11,r20 |
||
1575 | 1371 065e 00C0 rjmp .L114 |
||
1576 | 1372 .L115: |
||
1577 | 1374 .LM171: |
||
1578 | 1375 0660 82FD sbrc r24,2 |
||
1579 | 1376 0662 00C0 rjmp .L117 |
||
1580 | 1377 0664 83E4 ldi r24,lo8(67) |
||
1581 | 1378 0666 8CB9 out 44-0x20,r24 |
||
1582 | 1379 0668 33E0 ldi r19,lo8(3) |
||
1583 | 1380 066a B32E mov r11,r19 |
||
1584 | 1381 066c 00C0 rjmp .L114 |
||
1585 | 1382 .L117: |
||
1586 | 1384 .LM172: |
||
1587 | 1385 066e 83FD sbrc r24,3 |
||
1588 | 1386 0670 00C0 rjmp .L119 |
||
1589 | 1387 0672 81E6 ldi r24,lo8(97) |
||
1590 | 1388 0674 8CB9 out 44-0x20,r24 |
||
1591 | 1389 0676 24E0 ldi r18,lo8(4) |
||
1592 | 1390 0678 B22E mov r11,r18 |
||
1593 | 1391 067a 00C0 rjmp .L114 |
||
1594 | 1392 .L119: |
||
1595 | 1394 .LM173: |
||
1596 | 1395 067c 84FD sbrc r24,4 |
||
1597 | 1396 067e 00C0 rjmp .L121 |
||
1598 | 1397 0680 82E6 ldi r24,lo8(98) |
||
1599 | 1398 0682 8CB9 out 44-0x20,r24 |
||
1600 | 1399 0684 95E0 ldi r25,lo8(5) |
||
1601 | 1400 0686 B92E mov r11,r25 |
||
1602 | 1401 0688 00C0 rjmp .L114 |
||
1603 | 1402 .L121: |
||
1604 | 1404 .LM174: |
||
1605 | 1405 068a 85FD sbrc r24,5 |
||
1606 | 1406 068c 00C0 rjmp .L123 |
||
1607 | 1407 068e 83E6 ldi r24,lo8(99) |
||
1608 | 1408 0690 8CB9 out 44-0x20,r24 |
||
1609 | 1409 0692 86E0 ldi r24,lo8(6) |
||
1610 | 1410 0694 B82E mov r11,r24 |
||
1611 | 1411 0696 00C0 rjmp .L114 |
||
1612 | 1412 .L123: |
||
1613 | 1414 .LM175: |
||
1614 | 1415 0698 BB20 tst r11 |
||
1615 | 1416 069a 01F0 breq .L125 |
||
1616 | 1417 .L114: |
||
1617 | 1418 069c 88EE ldi r24,lo8(1000) |
||
1618 | 1419 069e 93E0 ldi r25,hi8(1000) |
||
1619 | 1420 06a0 00D0 rcall Delay_ms |
||
1620 | 1421 .L125: |
||
1621 | 1423 .LM176: |
||
1622 | 1424 06a2 8B2D mov r24,r11 |
||
1623 | 1425 06a4 00D0 rcall RotBlink |
||
1624 | 1427 .LM177: |
||
1625 | 1428 06a6 8EE2 ldi r24,lo8(46) |
||
1626 | 1429 06a8 00D0 rcall uart_putchar |
||
1627 | 1430 /* epilogue: frame size=5 */ |
||
1628 | 1431 06aa 2596 adiw r28,5 |
||
1629 | 1432 06ac 0FB6 in __tmp_reg__,__SREG__ |
||
1630 | 1433 06ae F894 cli |
||
1631 | 1434 06b0 DEBF out __SP_H__,r29 |
||
1632 | 1435 06b2 0FBE out __SREG__,__tmp_reg__ |
||
1633 | 1436 06b4 CDBF out __SP_L__,r28 |
||
1634 | 1437 06b6 DF91 pop r29 |
||
1635 | 1438 06b8 CF91 pop r28 |
||
1636 | 1439 06ba 1F91 pop r17 |
||
1637 | 1440 06bc 0F91 pop r16 |
||
1638 | 1441 06be FF90 pop r15 |
||
1639 | 1442 06c0 EF90 pop r14 |
||
1640 | 1443 06c2 DF90 pop r13 |
||
1641 | 1444 06c4 CF90 pop r12 |
||
1642 | 1445 06c6 BF90 pop r11 |
||
1643 | 1446 06c8 9F90 pop r9 |
||
1644 | 1447 06ca 8F90 pop r8 |
||
1645 | 1448 06cc 0895 ret |
||
1646 | 1449 /* epilogue end (size=18) */ |
||
1647 | 1450 /* function MotorTon size 607 (570) */ |
||
1648 | 1460 .Lscope9: |
||
1649 | 1462 .stabd 78,0,0 |
||
1650 | 1465 .global Anwerfen |
||
1651 | 1467 Anwerfen: |
||
1652 | 1468 .stabd 46,0,0 |
||
1653 | 1470 .LM178: |
||
1654 | 1471 .LFBB10: |
||
1655 | 1472 /* prologue: frame size=0 */ |
||
1656 | 1473 06ce AF92 push r10 |
||
1657 | 1474 06d0 BF92 push r11 |
||
1658 | 1475 06d2 CF92 push r12 |
||
1659 | 1476 06d4 DF92 push r13 |
||
1660 | 1477 06d6 EF92 push r14 |
||
1661 | 1478 06d8 FF92 push r15 |
||
1662 | 1479 06da 0F93 push r16 |
||
1663 | 1480 06dc 1F93 push r17 |
||
1664 | 1481 06de CF93 push r28 |
||
1665 | 1482 06e0 DF93 push r29 |
||
1666 | 1483 /* prologue end (size=10) */ |
||
1667 | 1484 06e2 182F mov r17,r24 |
||
1668 | 1486 .LM179: |
||
1669 | 1487 06e4 1092 0000 sts CompInterruptFreigabe,__zero_reg__ |
||
1670 | 1488 06e8 4398 cbi 40-0x20,3 |
||
1671 | 1490 .LM180: |
||
1672 | 1491 06ea 85E0 ldi r24,lo8(5) |
||
1673 | 1492 06ec 90E0 ldi r25,hi8(5) |
||
1674 | 1493 06ee 9093 0000 sts (PWM)+1,r25 |
||
1675 | 1494 06f2 8093 0000 sts PWM,r24 |
||
1676 | 1496 .LM181: |
||
1677 | 1497 06f6 00D0 rcall SetPWM |
||
1678 | 1499 .LM182: |
||
1679 | 1500 06f8 00D0 rcall Manuell |
||
1680 | 1502 .LM183: |
||
1681 | 1503 06fa 88EC ldi r24,lo8(200) |
||
1682 | 1504 06fc 90E0 ldi r25,hi8(200) |
||
1683 | 1505 06fe 00D0 rcall Delay_ms |
||
1684 | 1507 .LM184: |
||
1685 | 1508 0700 C12F mov r28,r17 |
||
1686 | 1509 0702 DD27 clr r29 |
||
1687 | 1510 0704 D093 0000 sts (PWM)+1,r29 |
||
1688 | 1511 0708 C093 0000 sts PWM,r28 |
||
1689 | 1512 070c 1CE2 ldi r17,lo8(300) |
||
1690 | 1513 070e A12E mov r10,r17 |
||
1691 | 1514 0710 11E0 ldi r17,hi8(300) |
||
1692 | 1515 0712 B12E mov r11,r17 |
||
1693 | 1516 0714 C12C mov r12,__zero_reg__ |
||
1694 | 1517 0716 D12C mov r13,__zero_reg__ |
||
1695 | 1518 .L160: |
||
1696 | 1520 .LM185: |
||
1697 | 1521 0718 EE24 clr r14 |
||
1698 | 1522 071a FF24 clr r15 |
||
1699 | 1523 071c 8701 movw r16,r14 |
||
1700 | 1524 071e 00C0 rjmp .L147 |
||
1701 | 1525 .L148: |
||
1702 | 1527 .LM186: |
||
1703 | 1528 0720 8091 0000 lds r24,UebertragungAbgeschlossen |
||
1704 | 1529 0724 8823 tst r24 |
||
1705 | 1530 0726 01F4 brne .L149 |
||
1706 | 1531 0728 00D0 rcall SendUart |
||
1707 | 1532 072a 00C0 rjmp .L151 |
||
1708 | 1533 .L149: |
||
1709 | 1535 .LM187: |
||
1710 | 1536 072c 00D0 rcall DatenUebertragung |
||
1711 | 1537 .L151: |
||
1712 | 1539 .LM188: |
||
1713 | 1540 072e 84E6 ldi r24,lo8(100) |
||
1714 | 1541 0730 00D0 rcall Wait |
||
1715 | 1543 .LM189: |
||
1716 | 1544 0732 0894 sec |
||
1717 | 1545 0734 E11C adc r14,__zero_reg__ |
||
1718 | 1546 0736 F11C adc r15,__zero_reg__ |
||
1719 | 1547 0738 011D adc r16,__zero_reg__ |
||
1720 | 1548 073a 111D adc r17,__zero_reg__ |
||
1721 | 1549 .L147: |
||
1722 | 1550 073c EA14 cp r14,r10 |
||
1723 | 1551 073e FB04 cpc r15,r11 |
||
1724 | 1552 0740 0C05 cpc r16,r12 |
||
1725 | 1553 0742 1D05 cpc r17,r13 |
||
1726 | 1554 0744 01F4 brne .L148 |
||
1727 | 1556 .LM190: |
||
1728 | 1557 0746 C601 movw r24,r12 |
||
1729 | 1558 0748 B501 movw r22,r10 |
||
1730 | 1559 074a 2FE0 ldi r18,lo8(15) |
||
1731 | 1560 074c 30E0 ldi r19,hi8(15) |
||
1732 | 1561 074e 40E0 ldi r20,hlo8(15) |
||
1733 | 1562 0750 50E0 ldi r21,hhi8(15) |
||
1734 | 1563 0752 00D0 rcall __udivmodsi4 |
||
1735 | 1564 0754 A21A sub r10,r18 |
||
1736 | 1565 0756 B30A sbc r11,r19 |
||
1737 | 1566 0758 C40A sbc r12,r20 |
||
1738 | 1567 075a D50A sbc r13,r21 |
||
1739 | 1568 075c 0894 sec |
||
1740 | 1569 075e A108 sbc r10,__zero_reg__ |
||
1741 | 1570 0760 B108 sbc r11,__zero_reg__ |
||
1742 | 1571 0762 C108 sbc r12,__zero_reg__ |
||
1743 | 1572 0764 D108 sbc r13,__zero_reg__ |
||
1744 | 1574 .LM191: |
||
1745 | 1575 0766 89E1 ldi r24,lo8(25) |
||
1746 | 1576 0768 A816 cp r10,r24 |
||
1747 | 1577 076a B104 cpc r11,__zero_reg__ |
||
1748 | 1578 076c C104 cpc r12,__zero_reg__ |
||
1749 | 1579 076e D104 cpc r13,__zero_reg__ |
||
1750 | 1580 0770 00F0 brlo .L156 |
||
1751 | 1582 .LM192: |
||
1752 | 1583 0772 00D0 rcall Manuell |
||
1753 | 1585 .LM193: |
||
1754 | 1586 0774 8091 0000 lds r24,Phase |
||
1755 | 1587 0778 8F5F subi r24,lo8(-(1)) |
||
1756 | 1588 077a 8093 0000 sts Phase,r24 |
||
1757 | 1590 .LM194: |
||
1758 | 1591 077e 8091 0000 lds r24,Phase |
||
1759 | 1592 0782 66E0 ldi r22,lo8(6) |
||
1760 | 1593 0784 00D0 rcall __udivmodqi4 |
||
1761 | 1594 0786 9093 0000 sts Phase,r25 |
||
1762 | 1596 .LM195: |
||
1763 | 1597 078a 00D0 rcall AdConvert |
||
1764 | 1599 .LM196: |
||
1765 | 1600 078c D093 0000 sts (PWM)+1,r29 |
||
1766 | 1601 0790 C093 0000 sts PWM,r28 |
||
1767 | 1603 .LM197: |
||
1768 | 1604 0794 00D0 rcall SetPWM |
||
1769 | 1606 .LM198: |
||
1770 | 1607 0796 449B sbis 40-0x20,4 |
||
1771 | 1608 0798 00C0 rjmp .L160 |
||
1772 | 1610 .LM199: |
||
1773 | 1611 079a 82B3 in r24,50-0x20 |
||
1774 | 1612 079c 8058 subi r24,lo8(-(-128)) |
||
1775 | 1613 079e 82BB out 50-0x20,r24 |
||
1776 | 1614 07a0 00C0 rjmp .L160 |
||
1777 | 1615 .L156: |
||
1778 | 1616 /* epilogue: frame size=0 */ |
||
1779 | 1617 07a2 DF91 pop r29 |
||
1780 | 1618 07a4 CF91 pop r28 |
||
1781 | 1619 07a6 1F91 pop r17 |
||
1782 | 1620 07a8 0F91 pop r16 |
||
1783 | 1621 07aa FF90 pop r15 |
||
1784 | 1622 07ac EF90 pop r14 |
||
1785 | 1623 07ae DF90 pop r13 |
||
1786 | 1624 07b0 CF90 pop r12 |
||
1787 | 1625 07b2 BF90 pop r11 |
||
1788 | 1626 07b4 AF90 pop r10 |
||
1789 | 1627 07b6 0895 ret |
||
1790 | 1628 /* epilogue end (size=11) */ |
||
1791 | 1629 /* function Anwerfen size 117 (96) */ |
||
1792 | 1635 .Lscope10: |
||
1793 | 1637 .stabd 78,0,0 |
||
1794 | 1639 .global main |
||
1795 | 1641 main: |
||
1796 | 1642 .stabd 46,0,0 |
||
1797 | 509:src/main.c **** } |
||
1798 | 510:src/main.c **** |
||
1799 | 511:src/main.c **** |
||
1800 | 512:src/main.c **** //############################################################################ |
||
1801 | 513:src/main.c **** //Hauptprogramm |
||
1802 | 514:src/main.c **** int main (void) |
||
1803 | 515:src/main.c **** //############################################################################ |
||
1804 | 516:src/main.c **** { |
||
1805 | 1644 .LM200: |
||
1806 | 1645 .LFBB11: |
||
1807 | 1646 /* prologue: frame size=0 */ |
||
1808 | 1647 07b8 C0E0 ldi r28,lo8(__stack - 0) |
||
1809 | 1648 07ba D0E0 ldi r29,hi8(__stack - 0) |
||
1810 | 1649 07bc DEBF out __SP_H__,r29 |
||
1811 | 1650 07be CDBF out __SP_L__,r28 |
||
1812 | 1651 /* prologue end (size=4) */ |
||
1813 | 517:src/main.c **** char altPhase = 0; |
||
1814 | 518:src/main.c **** int test = 0; |
||
1815 | 519:src/main.c **** unsigned int MinUpmPulse,Blink,TestschubTimer; |
||
1816 | 520:src/main.c **** unsigned int Blink2,MittelstromTimer,DrehzahlMessTimer,MotorGestopptTimer; |
||
1817 | 521:src/main.c **** |
||
1818 | 522:src/main.c **** DDRC = 0x08; |
||
1819 | 1653 .LM201: |
||
1820 | 1654 07c0 88E0 ldi r24,lo8(8) |
||
1821 | 1655 07c2 84BB out 52-0x20,r24 |
||
1822 | 523:src/main.c **** PORTC = 0x08; |
||
1823 | 1657 .LM202: |
||
1824 | 1658 07c4 85BB out 53-0x20,r24 |
||
1825 | 524:src/main.c **** DDRD = 0xBA; |
||
1826 | 1660 .LM203: |
||
1827 | 1661 07c6 8AEB ldi r24,lo8(-70) |
||
1828 | 1662 07c8 81BB out 49-0x20,r24 |
||
1829 | 525:src/main.c **** PORTD = 0x00; |
||
1830 | 1664 .LM204: |
||
1831 | 1665 07ca 12BA out 50-0x20,__zero_reg__ |
||
1832 | 526:src/main.c **** DDRB = 0x0E; |
||
1833 | 1667 .LM205: |
||
1834 | 1668 07cc 8EE0 ldi r24,lo8(14) |
||
1835 | 1669 07ce 87BB out 55-0x20,r24 |
||
1836 | 527:src/main.c **** PORTB = 0x31; |
||
1837 | 1671 .LM206: |
||
1838 | 1672 07d0 81E3 ldi r24,lo8(49) |
||
1839 | 1673 07d2 88BB out 56-0x20,r24 |
||
1840 | 528:src/main.c **** |
||
1841 | 529:src/main.c **** #if (MOTORADRESSE == 0) |
||
1842 | 530:src/main.c **** PORTB |= (ADR1 + ADR2); // Pullups für Adresswahl |
||
1843 | 1675 .LM207: |
||
1844 | 1676 07d4 88B3 in r24,56-0x20 |
||
1845 | 1677 07d6 806C ori r24,lo8(-64) |
||
1846 | 1678 07d8 88BB out 56-0x20,r24 |
||
1847 | 531:src/main.c **** for(test=0;test<500;test++); |
||
1848 | 532:src/main.c **** if (PINB & ADR1) |
||
1849 | 1680 .LM208: |
||
1850 | 1681 07da B69B sbis 54-0x20,6 |
||
1851 | 1682 07dc 00C0 rjmp .L162 |
||
1852 | 533:src/main.c **** { |
||
1853 | 534:src/main.c **** if (PINB & ADR2) MotorAdresse = 1; |
||
1854 | 1684 .LM209: |
||
1855 | 1685 07de B79B sbis 54-0x20,7 |
||
1856 | 1686 07e0 00C0 rjmp .L164 |
||
1857 | 1687 07e2 81E0 ldi r24,lo8(1) |
||
1858 | 1688 07e4 00C0 rjmp .L220 |
||
1859 | 1689 .L164: |
||
1860 | 535:src/main.c **** else MotorAdresse = 2; |
||
1861 | 1691 .LM210: |
||
1862 | 1692 07e6 82E0 ldi r24,lo8(2) |
||
1863 | 1693 07e8 00C0 rjmp .L220 |
||
1864 | 1694 .L162: |
||
1865 | 536:src/main.c **** } |
||
1866 | 537:src/main.c **** else |
||
1867 | 538:src/main.c **** { |
||
1868 | 539:src/main.c **** if (PINB & ADR2) MotorAdresse = 3; |
||
1869 | 1696 .LM211: |
||
1870 | 1697 07ea B79B sbis 54-0x20,7 |
||
1871 | 1698 07ec 00C0 rjmp .L167 |
||
1872 | 1699 07ee 83E0 ldi r24,lo8(3) |
||
1873 | 1700 07f0 00C0 rjmp .L220 |
||
1874 | 1701 .L167: |
||
1875 | 540:src/main.c **** else MotorAdresse = 4; |
||
1876 | 1703 .LM212: |
||
1877 | 1704 07f2 84E0 ldi r24,lo8(4) |
||
1878 | 1705 .L220: |
||
1879 | 1706 07f4 8093 0000 sts MotorAdresse,r24 |
||
1880 | 541:src/main.c **** } |
||
1881 | 542:src/main.c **** #else |
||
1882 | 543:src/main.c **** MotorAdresse = MOTORADRESSE; |
||
1883 | 544:src/main.c **** #endif |
||
1884 | 545:src/main.c **** |
||
1885 | 546:src/main.c **** UART_Init(); |
||
1886 | 1708 .LM213: |
||
1887 | 1709 07f8 00D0 rcall UART_Init |
||
1888 | 547:src/main.c **** Timer0_Init(); |
||
1889 | 1711 .LM214: |
||
1890 | 1712 07fa 00D0 rcall Timer0_Init |
||
1891 | 548:src/main.c **** sei();//Globale Interrupts Einschalten |
||
1892 | 1714 .LM215: |
||
1893 | 1715 /* #APP */ |
||
1894 | 1716 07fc 7894 sei |
||
1895 | 549:src/main.c **** |
||
1896 | 550:src/main.c **** // Am Blinken erkennt man die richtige Motoradresse |
||
1897 | 551:src/main.c **** /* |
||
1898 | 552:src/main.c **** for(test=0;test<5;test++) |
||
1899 | 553:src/main.c **** { |
||
1900 | 554:src/main.c **** if(test == MotorAdresse) PORTD |= GRUEN; |
||
1901 | 555:src/main.c **** Delay_ms(150); |
||
1902 | 556:src/main.c **** PORTD &= ~GRUEN; |
||
1903 | 557:src/main.c **** Delay_ms(250); |
||
1904 | 558:src/main.c **** } |
||
1905 | 559:src/main.c **** |
||
1906 | 560:src/main.c **** Delay_ms(500); |
||
1907 | 561:src/main.c **** */ |
||
1908 | 562:src/main.c **** // UART_Init(); // war doppelt |
||
1909 | 563:src/main.c **** PWM_Init(); |
||
1910 | 1718 .LM216: |
||
1911 | 1719 /* #NOAPP */ |
||
1912 | 1720 07fe 00D0 rcall PWM_Init |
||
1913 | 564:src/main.c **** |
||
1914 | 565:src/main.c **** InitIC2_Slave(0x50); |
||
1915 | 1722 .LM217: |
||
1916 | 1723 0800 80E5 ldi r24,lo8(80) |
||
1917 | 1724 0802 00D0 rcall InitIC2_Slave |
||
1918 | 566:src/main.c **** InitPPM(); |
||
1919 | 1726 .LM218: |
||
1920 | 1727 0804 00D0 rcall InitPPM |
||
1921 | 567:src/main.c **** |
||
1922 | 568:src/main.c **** Blink = SetDelay(101); |
||
1923 | 1729 .LM219: |
||
1924 | 1730 0806 85E6 ldi r24,lo8(101) |
||
1925 | 1731 0808 90E0 ldi r25,hi8(101) |
||
1926 | 1732 080a 00D0 rcall SetDelay |
||
1927 | 569:src/main.c **** Blink2 = SetDelay(102); |
||
1928 | 1734 .LM220: |
||
1929 | 1735 080c 86E6 ldi r24,lo8(102) |
||
1930 | 1736 080e 90E0 ldi r25,hi8(102) |
||
1931 | 1737 0810 00D0 rcall SetDelay |
||
1932 | 570:src/main.c **** MinUpmPulse = SetDelay(103); |
||
1933 | 1739 .LM221: |
||
1934 | 1740 0812 87E6 ldi r24,lo8(103) |
||
1935 | 1741 0814 90E0 ldi r25,hi8(103) |
||
1936 | 1742 0816 00D0 rcall SetDelay |
||
1937 | 1743 0818 EC01 movw r28,r24 |
||
1938 | 571:src/main.c **** MittelstromTimer = SetDelay(254); |
||
1939 | 1745 .LM222: |
||
1940 | 1746 081a 8EEF ldi r24,lo8(254) |
||
1941 | 1747 081c 90E0 ldi r25,hi8(254) |
||
1942 | 1748 081e 00D0 rcall SetDelay |
||
1943 | 1749 0820 6C01 movw r12,r24 |
||
1944 | 572:src/main.c **** DrehzahlMessTimer = SetDelay(1005); |
||
1945 | 1751 .LM223: |
||
1946 | 1752 0822 8DEE ldi r24,lo8(1005) |
||
1947 | 1753 0824 93E0 ldi r25,hi8(1005) |
||
1948 | 1754 0826 00D0 rcall SetDelay |
||
1949 | 1755 0828 8C01 movw r16,r24 |
||
1950 | 573:src/main.c **** TestschubTimer = SetDelay(1006); |
||
1951 | 1757 .LM224: |
||
1952 | 1758 082a 8EEE ldi r24,lo8(1006) |
||
1953 | 1759 082c 93E0 ldi r25,hi8(1006) |
||
1954 | 1760 082e 00D0 rcall SetDelay |
||
1955 | 1761 0830 00C0 rjmp .L169 |
||
1956 | 1762 .L170: |
||
1957 | 574:src/main.c **** while(!CheckDelay(MinUpmPulse)) |
||
1958 | 575:src/main.c **** { |
||
1959 | 576:src/main.c **** if(SollwertErmittlung()) break; |
||
1960 | 1764 .LM225: |
||
1961 | 1765 0832 00D0 rcall SollwertErmittlung |
||
1962 | 1766 0834 8823 tst r24 |
||
1963 | 1767 0836 01F4 brne .L171 |
||
1964 | 1768 .L169: |
||
1965 | 1770 .LM226: |
||
1966 | 1771 0838 CE01 movw r24,r28 |
||
1967 | 1772 083a 00D0 rcall CheckDelay |
||
1968 | 1773 083c 8823 tst r24 |
||
1969 | 1774 083e 01F0 breq .L170 |
||
1970 | 1775 .L171: |
||
1971 | 577:src/main.c **** } |
||
1972 | 578:src/main.c **** ; |
||
1973 | 579:src/main.c **** PORTD |= GRUEN; |
||
1974 | 1777 .LM227: |
||
1975 | 1778 0840 979A sbi 50-0x20,7 |
||
1976 | 580:src/main.c **** PWM = 0; |
||
1977 | 1780 .LM228: |
||
1978 | 1781 0842 1092 0000 sts (PWM)+1,__zero_reg__ |
||
1979 | 1782 0846 1092 0000 sts PWM,__zero_reg__ |
||
1980 | 581:src/main.c **** |
||
1981 | 582:src/main.c **** SetPWM(); |
||
1982 | 1784 .LM229: |
||
1983 | 1785 084a 00D0 rcall SetPWM |
||
1984 | 583:src/main.c **** |
||
1985 | 584:src/main.c **** SFIOR = 0x08; // Analog Comperator ein |
||
1986 | 1787 .LM230: |
||
1987 | 1788 084c 88E0 ldi r24,lo8(8) |
||
1988 | 1789 084e 80BF out 80-0x20,r24 |
||
1989 | 585:src/main.c **** ADMUX = 1; |
||
1990 | 1791 .LM231: |
||
1991 | 1792 0850 81E0 ldi r24,lo8(1) |
||
1992 | 1793 0852 87B9 out 39-0x20,r24 |
||
1993 | 586:src/main.c **** |
||
1994 | 587:src/main.c **** MinUpmPulse = SetDelay(10); |
||
1995 | 1795 .LM232: |
||
1996 | 1796 0854 8AE0 ldi r24,lo8(10) |
||
1997 | 1797 0856 90E0 ldi r25,hi8(10) |
||
1998 | 1798 0858 00D0 rcall SetDelay |
||
1999 | 1799 085a EC01 movw r28,r24 |
||
2000 | 588:src/main.c **** DebugOut.Analog[1] = 1; |
||
2001 | 1801 .LM233: |
||
2002 | 1802 085c 81E0 ldi r24,lo8(1) |
||
2003 | 1803 085e 90E0 ldi r25,hi8(1) |
||
2004 | 1804 0860 9093 0000 sts (DebugOut+20)+1,r25 |
||
2005 | 1805 0864 8093 0000 sts DebugOut+20,r24 |
||
2006 | 589:src/main.c **** PPM_Signal = 0; |
||
2007 | 1807 .LM234: |
||
2008 | 1808 0868 1092 0000 sts (PPM_Signal)+1,__zero_reg__ |
||
2009 | 1809 086c 1092 0000 sts PPM_Signal,__zero_reg__ |
||
2010 | 590:src/main.c **** |
||
2011 | 591:src/main.c **** if(!SollwertErmittlung()) MotorTon(); |
||
2012 | 1811 .LM235: |
||
2013 | 1812 0870 00D0 rcall SollwertErmittlung |
||
2014 | 1813 0872 8823 tst r24 |
||
2015 | 1814 0874 01F4 brne .L172 |
||
2016 | 1815 0876 00D0 rcall MotorTon |
||
2017 | 1816 .L172: |
||
2018 | 592:src/main.c **** //MotorTon(); |
||
2019 | 593:src/main.c **** PORTB = 0x31; // Pullups wieder einschalten |
||
2020 | 1818 .LM236: |
||
2021 | 1819 0878 81E3 ldi r24,lo8(49) |
||
2022 | 1820 087a 88BB out 56-0x20,r24 |
||
2023 | 1821 087c EE24 clr r14 |
||
2024 | 1822 .L222: |
||
2025 | 594:src/main.c **** |
||
2026 | 595:src/main.c **** // zum Test der Hardware; Motor dreht mit konstanter Drehzahl ohne Regelung |
||
2027 | 596:src/main.c **** if(TEST_MANUELL) Anwerfen(TEST_MANUELL); // kommt von dort nicht wieder |
||
2028 | 597:src/main.c **** |
||
2029 | 598:src/main.c **** while (1) |
||
2030 | 599:src/main.c **** { |
||
2031 | 600:src/main.c **** //ShowSense(); |
||
2032 | 601:src/main.c **** |
||
2033 | 602:src/main.c **** if(!TEST_SCHUB) PWM = SollwertErmittlung(); |
||
2034 | 1824 .LM237: |
||
2035 | 1825 087e 00D0 rcall SollwertErmittlung |
||
2036 | 1826 0880 9927 clr r25 |
||
2037 | 1827 0882 9093 0000 sts (PWM)+1,r25 |
||
2038 | 1828 0886 8093 0000 sts PWM,r24 |
||
2039 | 603:src/main.c **** //I2C_TXBuffer = PWM; // Antwort über I2C-Bus |
||
2040 | 604:src/main.c **** if(MANUELL_PWM) PWM = MANUELL_PWM; |
||
2041 | 605:src/main.c **** |
||
2042 | 606:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
2043 | 607:src/main.c **** if(Phase != altPhase) // es gab eine Kommutierung im Interrupt |
||
2044 | 1830 .LM238: |
||
2045 | 1831 088a 8091 0000 lds r24,Phase |
||
2046 | 1832 088e 8E15 cp r24,r14 |
||
2047 | 1833 0890 01F0 breq .L175 |
||
2048 | 608:src/main.c **** { |
||
2049 | 609:src/main.c **** MotorGestoppt = 0; |
||
2050 | 1835 .LM239: |
||
2051 | 1836 0892 1092 0000 sts MotorGestoppt,__zero_reg__ |
||
2052 | 610:src/main.c **** ZeitFuerBerechnungen = 0; // direkt nach einer Kommutierung ist Zeit |
||
2053 | 1838 .LM240: |
||
2054 | 1839 0896 1092 0000 sts ZeitFuerBerechnungen,__zero_reg__ |
||
2055 | 611:src/main.c **** MinUpmPulse = SetDelay(250); // Timeout, falls ein Motor stehen bleibt |
||
2056 | 1841 .LM241: |
||
2057 | 1842 089a 8AEF ldi r24,lo8(250) |
||
2058 | 1843 089c 90E0 ldi r25,hi8(250) |
||
2059 | 1844 089e 00D0 rcall SetDelay |
||
2060 | 1845 08a0 EC01 movw r28,r24 |
||
2061 | 612:src/main.c **** altPhase = Phase; |
||
2062 | 1847 .LM242: |
||
2063 | 1848 08a2 E090 0000 lds r14,Phase |
||
2064 | 1849 .L175: |
||
2065 | 613:src/main.c **** } |
||
2066 | 614:src/main.c **** // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
2067 | 615:src/main.c **** if(!PWM) // Sollwert == 0 |
||
2068 | 1851 .LM243: |
||
2069 | 1852 08a6 8091 0000 lds r24,PWM |
||
2070 | 1853 08aa 9091 0000 lds r25,(PWM)+1 |
||
2071 | 1854 08ae 892B or r24,r25 |
||
2072 | 1855 08b0 01F4 brne .L177 |
||
2073 | 616:src/main.c **** { |
||
2074 | 617:src/main.c **** MotorAnwerfen = 0; // kein Startversuch |
||
2075 | 1857 .LM244: |
||
2076 | 1858 08b2 1092 0000 sts MotorAnwerfen,__zero_reg__ |
||
2077 | 618:src/main.c **** ZeitFuerBerechnungen = 0; |
||
2078 | 1860 .LM245: |
||
2079 | 1861 08b6 1092 0000 sts ZeitFuerBerechnungen,__zero_reg__ |
||
2080 | 619:src/main.c **** // nach 1,5 Sekunden den Motor als gestoppt betrachten |
||
2081 | 620:src/main.c **** if(CheckDelay(MotorGestopptTimer)) |
||
2082 | 1863 .LM246: |
||
2083 | 1864 08ba C501 movw r24,r10 |
||
2084 | 1865 08bc 00D0 rcall CheckDelay |
||
2085 | 1866 08be 8823 tst r24 |
||
2086 | 1867 08c0 01F0 breq .L179 |
||
2087 | 621:src/main.c **** { |
||
2088 | 622:src/main.c **** DISABLE_SENSE_INT; |
||
2089 | 1869 .LM247: |
||
2090 | 1870 08c2 1092 0000 sts CompInterruptFreigabe,__zero_reg__ |
||
2091 | 1871 08c6 4398 cbi 40-0x20,3 |
||
2092 | 623:src/main.c **** MotorGestoppt = 1; |
||
2093 | 1873 .LM248: |
||
2094 | 1874 08c8 91E0 ldi r25,lo8(1) |
||
2095 | 1875 08ca 9093 0000 sts MotorGestoppt,r25 |
||
2096 | 624:src/main.c **** STEUER_OFF; |
||
2097 | 1877 .LM249: |
||
2098 | 1878 08ce 82B3 in r24,50-0x20 |
||
2099 | 1879 08d0 877C andi r24,lo8(-57) |
||
2100 | 1880 08d2 82BB out 50-0x20,r24 |
||
2101 | 1881 08d4 9FBD out 79-0x20,r25 |
||
2102 | 1882 08d6 81E4 ldi r24,lo8(65) |
||
2103 | 1883 08d8 85BD out 69-0x20,r24 |
||
2104 | 1884 08da 8EE0 ldi r24,lo8(14) |
||
2105 | 1885 08dc 87BB out 55-0x20,r24 |
||
2106 | 1886 08de 88B3 in r24,56-0x20 |
||
2107 | 1887 08e0 817F andi r24,lo8(-15) |
||
2108 | 1888 08e2 88BB out 56-0x20,r24 |
||
2109 | 1889 08e4 00C0 rjmp .L179 |
||
2110 | 1890 .L177: |
||
2111 | 625:src/main.c **** } |
||
2112 | 626:src/main.c **** } |
||
2113 | 627:src/main.c **** else |
||
2114 | 628:src/main.c **** { |
||
2115 | 629:src/main.c **** if(MotorGestoppt) MotorAnwerfen = 1; // Startversuch |
||
2116 | 1892 .LM250: |
||
2117 | 1893 08e6 8091 0000 lds r24,MotorGestoppt |
||
2118 | 1894 08ea 8823 tst r24 |
||
2119 | 1895 08ec 01F0 breq .L181 |
||
2120 | 1896 08ee 81E0 ldi r24,lo8(1) |
||
2121 | 1897 08f0 8093 0000 sts MotorAnwerfen,r24 |
||
2122 | 1898 .L181: |
||
2123 | 630:src/main.c **** MotorGestopptTimer = SetDelay(1500); |
||
2124 | 1900 .LM251: |
||
2125 | 1901 08f4 8CED ldi r24,lo8(1500) |
||
2126 | 1902 08f6 95E0 ldi r25,hi8(1500) |
||
2127 | 1903 08f8 00D0 rcall SetDelay |
||
2128 | 1904 08fa 5C01 movw r10,r24 |
||
2129 | 1905 .L179: |
||
2130 | 631:src/main.c **** } |
||
2131 | 632:src/main.c **** |
||
2132 | 633:src/main.c **** if(MotorGestoppt && !TEST_SCHUB) PWM = 0; |
||
2133 | 1907 .LM252: |
||
2134 | 1908 08fc 8091 0000 lds r24,MotorGestoppt |
||
2135 | 1909 0900 8823 tst r24 |
||
2136 | 1910 0902 01F0 breq .L183 |
||
2137 | 1911 0904 1092 0000 sts (PWM)+1,__zero_reg__ |
||
2138 | 1912 0908 1092 0000 sts PWM,__zero_reg__ |
||
2139 | 1913 .L183: |
||
2140 | 634:src/main.c **** SetPWM(); |
||
2141 | 1915 .LM253: |
||
2142 | 1916 090c 00D0 rcall SetPWM |
||
2143 | 635:src/main.c **** // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
2144 | 636:src/main.c **** if(!ZeitFuerBerechnungen++) |
||
2145 | 1918 .LM254: |
||
2146 | 1919 090e 8091 0000 lds r24,ZeitFuerBerechnungen |
||
2147 | 1920 0912 8F5F subi r24,lo8(-(1)) |
||
2148 | 1921 0914 8093 0000 sts ZeitFuerBerechnungen,r24 |
||
2149 | 1922 0918 8130 cpi r24,lo8(1) |
||
2150 | 1923 091a 01F0 breq .+2 |
||
2151 | 1924 091c 00C0 rjmp .L222 |
||
2152 | 637:src/main.c **** { |
||
2153 | 638:src/main.c **** if(MotorGestoppt) PORTD |= GRUEN; //else PORTD &= ~GRUEN; |
||
2154 | 1926 .LM255: |
||
2155 | 1927 091e 8091 0000 lds r24,MotorGestoppt |
||
2156 | 1928 0922 8111 cpse r24,__zero_reg__ |
||
2157 | 1929 0924 979A sbi 50-0x20,7 |
||
2158 | 1930 .L186: |
||
2159 | 639:src/main.c **** if(SIO_DEBUG) |
||
2160 | 640:src/main.c **** { |
||
2161 | 641:src/main.c **** DebugAusgaben(); // welche Werte sollen angezeigt werden? |
||
2162 | 642:src/main.c **** if(!UebertragungAbgeschlossen) SendUart(); |
||
2163 | 643:src/main.c **** else DatenUebertragung(); |
||
2164 | 644:src/main.c **** } |
||
2165 | 645:src/main.c **** // Berechnen des Mittleren Stroms zur (langsamen) Strombegrenzung |
||
2166 | 646:src/main.c **** if(CheckDelay(MittelstromTimer)) |
||
2167 | 1932 .LM256: |
||
2168 | 1933 0926 C601 movw r24,r12 |
||
2169 | 1934 0928 00D0 rcall CheckDelay |
||
2170 | 1935 092a 8823 tst r24 |
||
2171 | 1936 092c 01F0 breq .L188 |
||
2172 | 647:src/main.c **** { |
||
2173 | 648:src/main.c **** MittelstromTimer = SetDelay(50); // alle 50ms |
||
2174 | 1938 .LM257: |
||
2175 | 1939 092e 82E3 ldi r24,lo8(50) |
||
2176 | 1940 0930 90E0 ldi r25,hi8(50) |
||
2177 | 1941 0932 00D0 rcall SetDelay |
||
2178 | 1942 0934 6C01 movw r12,r24 |
||
2179 | 649:src/main.c **** if(Mittelstrom < Strom) Mittelstrom++;// Mittelwert des Stroms bilden |
||
2180 | 1944 .LM258: |
||
2181 | 1945 0936 8091 0000 lds r24,Mittelstrom |
||
2182 | 1946 093a 482F mov r20,r24 |
||
2183 | 1947 093c 5527 clr r21 |
||
2184 | 1948 093e 2091 0000 lds r18,Strom |
||
2185 | 1949 0942 3091 0000 lds r19,(Strom)+1 |
||
2186 | 1950 0946 4217 cp r20,r18 |
||
2187 | 1951 0948 5307 cpc r21,r19 |
||
2188 | 1952 094a 00F4 brsh .L190 |
||
2189 | 1953 094c 8F5F subi r24,lo8(-(1)) |
||
2190 | 1954 094e 00C0 rjmp .L221 |
||
2191 | 1955 .L190: |
||
2192 | 650:src/main.c **** else if(Mittelstrom > Strom) Mittelstrom--; |
||
2193 | 1957 .LM259: |
||
2194 | 1958 0950 2417 cp r18,r20 |
||
2195 | 1959 0952 3507 cpc r19,r21 |
||
2196 | 1960 0954 00F4 brsh .L192 |
||
2197 | 1961 0956 8150 subi r24,lo8(-(-1)) |
||
2198 | 1962 .L221: |
||
2199 | 1963 0958 8093 0000 sts Mittelstrom,r24 |
||
2200 | 1964 .L192: |
||
2201 | 651:src/main.c **** if(Strom > MAX_STROM) MaxPWM -= MaxPWM / 32; |
||
2202 | 1966 .LM260: |
||
2203 | 1967 095c 293C cpi r18,201 |
||
2204 | 1968 095e 3105 cpc r19,__zero_reg__ |
||
2205 | 1969 0960 00F0 brlo .L194 |
||
2206 | 1970 0962 8091 0000 lds r24,MaxPWM |
||
2207 | 1971 0966 982F mov r25,r24 |
||
2208 | 1972 0968 9295 swap r25 |
||
2209 | 1973 096a 9695 lsr r25 |
||
2210 | 1974 096c 9770 andi r25,0x7 |
||
2211 | 1975 096e 891B sub r24,r25 |
||
2212 | 1976 0970 8093 0000 sts MaxPWM,r24 |
||
2213 | 1977 .L194: |
||
2214 | 652:src/main.c **** if((Mittelstrom > LIMIT_STROM))// Strom am Limit? |
||
2215 | 1979 .LM261: |
||
2216 | 1980 0974 8091 0000 lds r24,Mittelstrom |
||
2217 | 1981 0978 9091 0000 lds r25,MaxPWM |
||
2218 | 1982 097c 8937 cpi r24,lo8(121) |
||
2219 | 1983 097e 00F0 brlo .L196 |
||
2220 | 653:src/main.c **** { |
||
2221 | 654:src/main.c **** if(MaxPWM) MaxPWM--;// dann die Maximale PWM herunterfahren |
||
2222 | 1985 .LM262: |
||
2223 | 1986 0980 9923 tst r25 |
||
2224 | 1987 0982 01F0 breq .L198 |
||
2225 | 1988 0984 9150 subi r25,lo8(-(-1)) |
||
2226 | 1989 0986 9093 0000 sts MaxPWM,r25 |
||
2227 | 1990 .L198: |
||
2228 | 655:src/main.c **** PORTC |= ROT; |
||
2229 | 1992 .LM263: |
||
2230 | 1993 098a AB9A sbi 53-0x20,3 |
||
2231 | 1994 098c 00C0 rjmp .L188 |
||
2232 | 1995 .L196: |
||
2233 | 656:src/main.c **** } |
||
2234 | 657:src/main.c **** else |
||
2235 | 658:src/main.c **** { |
||
2236 | 659:src/main.c **** if(MaxPWM < MAX_PWM) MaxPWM++; |
||
2237 | 1997 .LM264: |
||
2238 | 1998 098e 9F3F cpi r25,lo8(-1) |
||
2239 | 1999 0990 01F0 breq .L188 |
||
2240 | 2000 0992 9F5F subi r25,lo8(-(1)) |
||
2241 | 2001 0994 9093 0000 sts MaxPWM,r25 |
||
2242 | 2002 .L188: |
||
2243 | 660:src/main.c **** } |
||
2244 | 661:src/main.c **** } |
||
2245 | 662:src/main.c **** |
||
2246 | 663:src/main.c **** if(CheckDelay(DrehzahlMessTimer)) // Ist-Drehzahl bestimmen |
||
2247 | 2004 .LM265: |
||
2248 | 2005 0998 C801 movw r24,r16 |
||
2249 | 2006 099a 00D0 rcall CheckDelay |
||
2250 | 2007 099c 8823 tst r24 |
||
2251 | 2008 099e 01F0 breq .L201 |
||
2252 | 664:src/main.c **** { |
||
2253 | 665:src/main.c **** DrehzahlMessTimer = SetDelay(10); |
||
2254 | 2010 .LM266: |
||
2255 | 2011 09a0 8AE0 ldi r24,lo8(10) |
||
2256 | 2012 09a2 90E0 ldi r25,hi8(10) |
||
2257 | 2013 09a4 00D0 rcall SetDelay |
||
2258 | 2014 09a6 8C01 movw r16,r24 |
||
2259 | 666:src/main.c **** SIO_Drehzahl = CntKommutierungen;//(6 * CntKommutierungen) / (POLANZAHL / 2); |
||
2260 | 2016 .LM267: |
||
2261 | 2017 09a8 8091 0000 lds r24,CntKommutierungen |
||
2262 | 2018 09ac 9091 0000 lds r25,(CntKommutierungen)+1 |
||
2263 | 2019 09b0 9093 0000 sts (SIO_Drehzahl)+1,r25 |
||
2264 | 2020 09b4 8093 0000 sts SIO_Drehzahl,r24 |
||
2265 | 667:src/main.c **** CntKommutierungen = 0; |
||
2266 | 2022 .LM268: |
||
2267 | 2023 09b8 1092 0000 sts (CntKommutierungen)+1,__zero_reg__ |
||
2268 | 2024 09bc 1092 0000 sts CntKommutierungen,__zero_reg__ |
||
2269 | 668:src/main.c **** if(PPM_Timeout == 0) // keine PPM-Signale |
||
2270 | 2026 .LM269: |
||
2271 | 2027 09c0 8091 0000 lds r24,PPM_Timeout |
||
2272 | 2028 09c4 8823 tst r24 |
||
2273 | 2029 09c6 01F4 brne .L201 |
||
2274 | 669:src/main.c **** ZeitZumAdWandeln = 1; |
||
2275 | 2031 .LM270: |
||
2276 | 2032 09c8 81E0 ldi r24,lo8(1) |
||
2277 | 2033 09ca 8093 0000 sts ZeitZumAdWandeln,r24 |
||
2278 | 2034 .L201: |
||
2279 | 670:src/main.c **** } |
||
2280 | 671:src/main.c **** |
||
2281 | 672:src/main.c **** if(TEST_SCHUB) |
||
2282 | 673:src/main.c **** { |
||
2283 | 674:src/main.c **** if(CheckDelay(TestschubTimer)) |
||
2284 | 675:src/main.c **** { |
||
2285 | 676:src/main.c **** TestschubTimer = SetDelay(1500); |
||
2286 | 677:src/main.c **** switch(test) |
||
2287 | 678:src/main.c **** { |
||
2288 | 679:src/main.c **** case 0: PWM = 50; test++; break; |
||
2289 | 680:src/main.c **** case 1: PWM = 130; test++; break; |
||
2290 | 681:src/main.c **** case 2: PWM = 60; test++; break; |
||
2291 | 682:src/main.c **** case 3: PWM = 140; test++; break; |
||
2292 | 683:src/main.c **** case 4: PWM = 150; test = 0; break; |
||
2293 | 684:src/main.c **** default: test = 0; |
||
2294 | 685:src/main.c **** } |
||
2295 | 686:src/main.c **** } |
||
2296 | 687:src/main.c **** } |
||
2297 | 688:src/main.c **** // Motor Stehen geblieben |
||
2298 | 689:src/main.c **** if((CheckDelay(MinUpmPulse) && SIO_Drehzahl == 0) || MotorAnwerfen) |
||
2299 | 2036 .LM271: |
||
2300 | 2037 09ce CE01 movw r24,r28 |
||
2301 | 2038 09d0 00D0 rcall CheckDelay |
||
2302 | 2039 09d2 8823 tst r24 |
||
2303 | 2040 09d4 01F0 breq .L204 |
||
2304 | 2041 09d6 8091 0000 lds r24,SIO_Drehzahl |
||
2305 | 2042 09da 9091 0000 lds r25,(SIO_Drehzahl)+1 |
||
2306 | 2043 09de 892B or r24,r25 |
||
2307 | 2044 09e0 01F0 breq .L206 |
||
2308 | 2045 .L204: |
||
2309 | 2046 09e2 8091 0000 lds r24,MotorAnwerfen |
||
2310 | 2047 09e6 8823 tst r24 |
||
2311 | 2048 09e8 01F4 brne .+2 |
||
2312 | 2049 09ea 00C0 rjmp .L222 |
||
2313 | 2050 .L206: |
||
2314 | 690:src/main.c **** { |
||
2315 | 691:src/main.c **** MotorGestoppt = 1; |
||
2316 | 2052 .LM272: |
||
2317 | 2053 09ec FF24 clr r15 |
||
2318 | 2054 09ee F394 inc r15 |
||
2319 | 2055 09f0 F092 0000 sts MotorGestoppt,r15 |
||
2320 | 692:src/main.c **** DISABLE_SENSE_INT; |
||
2321 | 2057 .LM273: |
||
2322 | 2058 09f4 1092 0000 sts CompInterruptFreigabe,__zero_reg__ |
||
2323 | 2059 09f8 4398 cbi 40-0x20,3 |
||
2324 | 693:src/main.c **** MinUpmPulse = SetDelay(100); |
||
2325 | 2061 .LM274: |
||
2326 | 2062 09fa 84E6 ldi r24,lo8(100) |
||
2327 | 2063 09fc 90E0 ldi r25,hi8(100) |
||
2328 | 2064 09fe 00D0 rcall SetDelay |
||
2329 | 2065 0a00 EC01 movw r28,r24 |
||
2330 | 694:src/main.c **** if(MotorAnwerfen) |
||
2331 | 2067 .LM275: |
||
2332 | 2068 0a02 8091 0000 lds r24,MotorAnwerfen |
||
2333 | 2069 0a06 8823 tst r24 |
||
2334 | 2070 0a08 01F4 brne .+2 |
||
2335 | 2071 0a0a 00C0 rjmp .L222 |
||
2336 | 695:src/main.c **** { |
||
2337 | 696:src/main.c **** PORTC &= ~ROT; |
||
2338 | 2073 .LM276: |
||
2339 | 2074 0a0c AB98 cbi 53-0x20,3 |
||
2340 | 697:src/main.c **** MotorAnwerfen = 0; |
||
2341 | 2076 .LM277: |
||
2342 | 2077 0a0e 1092 0000 sts MotorAnwerfen,__zero_reg__ |
||
2343 | 698:src/main.c **** Anwerfen(10); |
||
2344 | 2079 .LM278: |
||
2345 | 2080 0a12 8AE0 ldi r24,lo8(10) |
||
2346 | 2081 0a14 00D0 rcall Anwerfen |
||
2347 | 699:src/main.c **** PORTD |= GRUEN; |
||
2348 | 2083 .LM279: |
||
2349 | 2084 0a16 979A sbi 50-0x20,7 |
||
2350 | 700:src/main.c **** MotorGestoppt = 0; |
||
2351 | 2086 .LM280: |
||
2352 | 2087 0a18 1092 0000 sts MotorGestoppt,__zero_reg__ |
||
2353 | 701:src/main.c **** Phase--; |
||
2354 | 2089 .LM281: |
||
2355 | 2090 0a1c 8091 0000 lds r24,Phase |
||
2356 | 2091 0a20 8150 subi r24,lo8(-(-1)) |
||
2357 | 2092 0a22 8093 0000 sts Phase,r24 |
||
2358 | 702:src/main.c **** PWM = 1; |
||
2359 | 2094 .LM282: |
||
2360 | 2095 0a26 81E0 ldi r24,lo8(1) |
||
2361 | 2096 0a28 90E0 ldi r25,hi8(1) |
||
2362 | 2097 0a2a 9093 0000 sts (PWM)+1,r25 |
||
2363 | 2098 0a2e 8093 0000 sts PWM,r24 |
||
2364 | 703:src/main.c **** SetPWM(); |
||
2365 | 2100 .LM283: |
||
2366 | 2101 0a32 00D0 rcall SetPWM |
||
2367 | 704:src/main.c **** SENSE_TOGGLE_INT; |
||
2368 | 2103 .LM284: |
||
2369 | 2104 0a34 88B1 in r24,40-0x20 |
||
2370 | 2105 0a36 8C7F andi r24,lo8(-4) |
||
2371 | 2106 0a38 88B9 out 40-0x20,r24 |
||
2372 | 705:src/main.c **** ENABLE_SENSE_INT; |
||
2373 | 2108 .LM285: |
||
2374 | 2109 0a3a F092 0000 sts CompInterruptFreigabe,r15 |
||
2375 | 2110 0a3e 88B1 in r24,40-0x20 |
||
2376 | 2111 0a40 8A60 ori r24,lo8(10) |
||
2377 | 2112 0a42 88B9 out 40-0x20,r24 |
||
2378 | 706:src/main.c **** MinUpmPulse = SetDelay(20); |
||
2379 | 2114 .LM286: |
||
2380 | 2115 0a44 84E1 ldi r24,lo8(20) |
||
2381 | 2116 0a46 90E0 ldi r25,hi8(20) |
||
2382 | 2117 0a48 00D0 rcall SetDelay |
||
2383 | 2118 0a4a EC01 movw r28,r24 |
||
2384 | 2119 .L208: |
||
2385 | 707:src/main.c **** while(!CheckDelay(MinUpmPulse)); // kurz Synchronisieren |
||
2386 | 2121 .LM287: |
||
2387 | 2122 0a4c CE01 movw r24,r28 |
||
2388 | 2123 0a4e 00D0 rcall CheckDelay |
||
2389 | 2124 0a50 8823 tst r24 |
||
2390 | 2125 0a52 01F0 breq .L208 |
||
2391 | 708:src/main.c **** PWM = 15; |
||
2392 | 2127 .LM288: |
||
2393 | 2128 0a54 8FE0 ldi r24,lo8(15) |
||
2394 | 2129 0a56 90E0 ldi r25,hi8(15) |
||
2395 | 2130 0a58 9093 0000 sts (PWM)+1,r25 |
||
2396 | 2131 0a5c 8093 0000 sts PWM,r24 |
||
2397 | 709:src/main.c **** SetPWM(); |
||
2398 | 2133 .LM289: |
||
2399 | 2134 0a60 00D0 rcall SetPWM |
||
2400 | 710:src/main.c **** MinUpmPulse = SetDelay(300); |
||
2401 | 2136 .LM290: |
||
2402 | 2137 0a62 8CE2 ldi r24,lo8(300) |
||
2403 | 2138 0a64 91E0 ldi r25,hi8(300) |
||
2404 | 2139 0a66 00D0 rcall SetDelay |
||
2405 | 2140 0a68 EC01 movw r28,r24 |
||
2406 | 2141 .L210: |
||
2407 | 711:src/main.c **** while(!CheckDelay(MinUpmPulse)); // kurz Durchstarten |
||
2408 | 2143 .LM291: |
||
2409 | 2144 0a6a CE01 movw r24,r28 |
||
2410 | 2145 0a6c 00D0 rcall CheckDelay |
||
2411 | 2146 0a6e 8823 tst r24 |
||
2412 | 2147 0a70 01F0 breq .L210 |
||
2413 | 712:src/main.c **** |
||
2414 | 713:src/main.c **** // Drehzahlmessung wieder aufsetzen |
||
2415 | 714:src/main.c **** DrehzahlMessTimer = SetDelay(50); |
||
2416 | 2149 .LM292: |
||
2417 | 2150 0a72 82E3 ldi r24,lo8(50) |
||
2418 | 2151 0a74 90E0 ldi r25,hi8(50) |
||
2419 | 2152 0a76 00D0 rcall SetDelay |
||
2420 | 2153 0a78 8C01 movw r16,r24 |
||
2421 | 2154 0a7a 87E0 ldi r24,lo8(7) |
||
2422 | 2155 0a7c E82E mov r14,r24 |
||
2423 | 2156 0a7e 00C0 rjmp .L222 |
||
2424 | 2157 /* epilogue: frame size=0 */ |
||
2425 | 2158 /* epilogue: noreturn */ |
||
2426 | 2159 /* epilogue end (size=0) */ |
||
2427 | 2160 /* function main size 358 (354) */ |
||
2428 | 2169 .Lscope11: |
||
2429 | 2171 .stabd 78,0,0 |
||
2430 | 2172 .global PWM |
||
2431 | 2173 .global PWM |
||
2432 | 2174 .section .bss |
||
2433 | 2177 PWM: |
||
2434 | 2178 0000 0000 .skip 2,0 |
||
2435 | 2179 .global Strom |
||
2436 | 2180 .global Strom |
||
2437 | 2183 Strom: |
||
2438 | 2184 0002 0000 .skip 2,0 |
||
2439 | 2185 .global Strom_max |
||
2440 | 2186 .global Strom_max |
||
2441 | 2189 Strom_max: |
||
2442 | 2190 0004 00 .skip 1,0 |
||
2443 | 2191 .global Mittelstrom |
||
2444 | 2192 .global Mittelstrom |
||
2445 | 2195 Mittelstrom: |
||
2446 | 2196 0005 00 .skip 1,0 |
||
2447 | 2197 .global Drehzahl |
||
2448 | 2198 .global Drehzahl |
||
2449 | 2201 Drehzahl: |
||
2450 | 2202 0006 0000 .skip 2,0 |
||
2451 | 2203 .global KommutierDelay |
||
2452 | 2204 .data |
||
2453 | 2207 KommutierDelay: |
||
2454 | 2208 0000 0A00 .word 10 |
||
2455 | 2209 .global I2C_Timeout |
||
2456 | 2210 .global I2C_Timeout |
||
2457 | 2211 .section .bss |
||
2458 | 2214 I2C_Timeout: |
||
2459 | 2215 0008 0000 .skip 2,0 |
||
2460 | 2216 .global SIO_Timeout |
||
2461 | 2217 .global SIO_Timeout |
||
2462 | 2220 SIO_Timeout: |
||
2463 | 2221 000a 0000 .skip 2,0 |
||
2464 | 2222 .global SollDrehzahl |
||
2465 | 2223 .global SollDrehzahl |
||
2466 | 2226 SollDrehzahl: |
||
2467 | 2227 000c 0000 .skip 2,0 |
||
2468 | 2228 .global IstDrehzahl |
||
2469 | 2229 .global IstDrehzahl |
||
2470 | 2232 IstDrehzahl: |
||
2471 | 2233 000e 0000 .skip 2,0 |
||
2472 | 2234 .global ZeitFuerBerechnungen |
||
2473 | 2235 .data |
||
2474 | 2238 ZeitFuerBerechnungen: |
||
2475 | 2239 0002 01 .byte 1 |
||
2476 | 2240 .global MotorAnwerfen |
||
2477 | 2241 .global MotorAnwerfen |
||
2478 | 2242 .section .bss |
||
2479 | 2245 MotorAnwerfen: |
||
2480 | 2246 0010 00 .skip 1,0 |
||
2481 | 2247 .global MotorGestoppt |
||
2482 | 2248 .data |
||
2483 | 2251 MotorGestoppt: |
||
2484 | 2252 0003 01 .byte 1 |
||
2485 | 2253 .global MaxPWM |
||
2486 | 2256 MaxPWM: |
||
2487 | 2257 0004 FF .byte -1 |
||
2488 | 2258 .global CntKommutierungen |
||
2489 | 2259 .global CntKommutierungen |
||
2490 | 2260 .section .bss |
||
2491 | 2263 CntKommutierungen: |
||
2492 | 2264 0011 0000 .skip 2,0 |
||
2493 | 2265 .global SIO_Drehzahl |
||
2494 | 2266 .global SIO_Drehzahl |
||
2495 | 2269 SIO_Drehzahl: |
||
2496 | 2270 0013 0000 .skip 2,0 |
||
2497 | 2271 .global ZeitZumAdWandeln |
||
2498 | 2272 .data |
||
2499 | 2275 ZeitZumAdWandeln: |
||
2500 | 2276 0005 01 .byte 1 |
||
2501 | 2277 .global MotorAdresse |
||
2502 | 2280 MotorAdresse: |
||
2503 | 2281 0006 01 .byte 1 |
||
2504 | 2282 .global PPM_Betrieb |
||
2505 | 2285 PPM_Betrieb: |
||
2506 | 2286 0007 01 .byte 1 |
||
2507 | 2287 .lcomm sollwert.2390,2 |
||
2508 | 2290 C.8.2210: |
||
2509 | 2291 0008 00 .byte 0 |
||
2510 | 2292 0009 00 .byte 0 |
||
2511 | 2293 000a 02 .byte 2 |
||
2512 | 2294 000b 01 .byte 1 |
||
2513 | 2295 000c 03 .byte 3 |
||
2514 | 2296 .comm RuheStrom,2,1 |
||
2515 | 2297 .comm DrehZahlTabelle,512,1 |
||
2516 | 2320 .text |
||
2517 | 2322 .Letext0: |
||
2518 | 2323 /* File "src/main.c": code 1357 = 0x054d (1282), prologues 36, epilogues 39 */ |
||
2519 | DEFINED SYMBOLS |
||
2520 | *ABS*:00000000 main.c |
||
2521 | /tmp/ccPB1ogc.s:2 *ABS*:0000003f __SREG__ |
||
2522 | /tmp/ccPB1ogc.s:3 *ABS*:0000003e __SP_H__ |
||
2523 | /tmp/ccPB1ogc.s:4 *ABS*:0000003d __SP_L__ |
||
2524 | /tmp/ccPB1ogc.s:5 *ABS*:00000000 __tmp_reg__ |
||
2525 | /tmp/ccPB1ogc.s:6 *ABS*:00000001 __zero_reg__ |
||
2526 | /tmp/ccPB1ogc.s:102 .text:00000000 SetPWM |
||
2527 | /tmp/ccPB1ogc.s:2177 .bss:00000000 PWM |
||
2528 | /tmp/ccPB1ogc.s:2256 .data:00000004 MaxPWM |
||
2529 | /tmp/ccPB1ogc.s:2183 .bss:00000002 Strom |
||
2530 | /tmp/ccPB1ogc.s:170 .text:00000046 PWM_Init |
||
2531 | /tmp/ccPB1ogc.s:203 .text:0000005c Wait |
||
2532 | /tmp/ccPB1ogc.s:237 .text:0000006e Delay |
||
2533 | /tmp/ccPB1ogc.s:259 .text:00000074 SollwertErmittlung |
||
2534 | /tmp/ccPB1ogc.s:2214 .bss:00000008 I2C_Timeout |
||
2535 | /tmp/ccPB1ogc.s:2220 .bss:0000000a SIO_Timeout |
||
2536 | .bss:00000015 sollwert.2390 |
||
2537 | /tmp/ccPB1ogc.s:2285 .data:00000007 PPM_Betrieb |
||
2538 | /tmp/ccPB1ogc.s:430 .text:00000172 DebugAusgaben |
||
2539 | /tmp/ccPB1ogc.s:2195 .bss:00000005 Mittelstrom |
||
2540 | /tmp/ccPB1ogc.s:2269 .bss:00000013 SIO_Drehzahl |
||
2541 | /tmp/ccPB1ogc.s:473 .text:000001b2 RotBlink |
||
2542 | /tmp/ccPB1ogc.s:528 .text:000001d8 DelayM |
||
2543 | *COM*:00000002 RuheStrom |
||
2544 | /tmp/ccPB1ogc.s:589 .text:00000222 MotorTon |
||
2545 | /tmp/ccPB1ogc.s:2290 .data:00000008 C.8.2210 |
||
2546 | /tmp/ccPB1ogc.s:2280 .data:00000006 MotorAdresse |
||
2547 | /tmp/ccPB1ogc.s:2189 .bss:00000004 Strom_max |
||
2548 | /tmp/ccPB1ogc.s:1467 .text:000006ce Anwerfen |
||
2549 | /tmp/ccPB1ogc.s:1641 .text:000007b8 main |
||
2550 | /tmp/ccPB1ogc.s:2251 .data:00000003 MotorGestoppt |
||
2551 | /tmp/ccPB1ogc.s:2238 .data:00000002 ZeitFuerBerechnungen |
||
2552 | /tmp/ccPB1ogc.s:2245 .bss:00000010 MotorAnwerfen |
||
2553 | /tmp/ccPB1ogc.s:2263 .bss:00000011 CntKommutierungen |
||
2554 | /tmp/ccPB1ogc.s:2275 .data:00000005 ZeitZumAdWandeln |
||
2555 | /tmp/ccPB1ogc.s:2201 .bss:00000006 Drehzahl |
||
2556 | /tmp/ccPB1ogc.s:2207 .data:00000000 KommutierDelay |
||
2557 | /tmp/ccPB1ogc.s:2226 .bss:0000000c SollDrehzahl |
||
2558 | /tmp/ccPB1ogc.s:2232 .bss:0000000e IstDrehzahl |
||
2559 | *COM*:00000200 DrehZahlTabelle |
||
2560 | |||
2561 | UNDEFINED SYMBOLS |
||
2562 | __do_copy_data |
||
2563 | __do_clear_bss |
||
2564 | SIO_Sollwert |
||
2565 | __udivmodhi4 |
||
2566 | anz_ppm_werte |
||
2567 | PPM_Signal |
||
2568 | I2C_RXBuffer |
||
2569 | DebugOut |
||
2570 | Delay_ms |
||
2571 | FastADConvert |
||
2572 | CompInterruptFreigabe |
||
2573 | uart_putchar |
||
2574 | MessAD |
||
2575 | Manuell |
||
2576 | UebertragungAbgeschlossen |
||
2577 | SendUart |
||
2578 | DatenUebertragung |
||
2579 | __udivmodsi4 |
||
2580 | Phase |
||
2581 | __udivmodqi4 |
||
2582 | AdConvert |
||
2583 | __stack |
||
2584 | UART_Init |
||
2585 | Timer0_Init |
||
2586 | InitIC2_Slave |
||
2587 | InitPPM |
||
2588 | SetDelay |
||
2589 | CheckDelay |
||
2590 | PPM_Timeout |