From 538bd24ac19de02488516cd2e9b46716ea22b231 Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Fri, 3 May 2013 16:09:54 +0000 Subject: [PATCH] 20130503-181002 --- Leuchtklotz/Leuchtklotz.atsuo | Bin 10752 -> 10752 bytes Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf | Bin 13224 -> 13706 bytes Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.hex | 53 +- Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss | 497 ++++++++++++++---- Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map | 48 +- .../Leuchtklotz/Debug/Leuchtklotz.srec | 53 +- Leuchtklotz/Leuchtklotz/Leuchtklotz.c | 2 +- 7 files changed, 506 insertions(+), 147 deletions(-) diff --git a/Leuchtklotz/Leuchtklotz.atsuo b/Leuchtklotz/Leuchtklotz.atsuo index dc41aa0af02bcc86a0e05a794f9cab0b6e6fde1b..df06c873e30d10a5eff87b0a7bb9f9f0d5bb4bcc 100644 GIT binary patch delta 316 zcmZn&X$aYn!@}l}EEN*zzPX4ckdc>Bnt_2q2#Eg!!Q_i9Dx1HshOlsmA&E>b;W|Ir zSdj832gqN6vE8Gj3hF- zM6HE!!{k5?@69gi9842m=Fy5D@iB2vN4&mTK64?Aj7^qnqD8h^)D&fyM*_qpL za*5mp9u}Ys2eNF5ygw5!BO6di6iImU7sU_`F=T-fr4SB&B!SIeltP#}1d&80m#DQc z9+(`+;l0^Kor6i`ZBltebL+A=+l|ILDlN;-aYNODe76tiy-AD=43i5qbp#WD5)i;~ MpcKg91DX*G09-YMkN^Mx diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.elf index 50224cd16b9c92797e418277dc25cdd98f474f91..598d7b2059c16dfd94d99e6202781f2a4d33d2d5 100644 GIT binary patch delta 2914 zcmZuz4NTN!7=PdYeelg4A7bKhUl77^$VX=85W!q5V`zn@rho`2h-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tklotz/Debug/Leuchtklotz.hex @@ -2,7 +2,7 @@ :100010001AC019C018C017C016C015C014C013C02C :1000200012C011C010C00FC00EC011241FBECFEDF2 :10003000CDBF20E0A0E6B0E001C01D92A336B2071C -:10004000E1F7BAD0BEC0DCCF6770772780FF06C06B +:10004000E1F78FD194C1DCCF6770772780FF06C0BE :1000500098B3987F98BB98B3962B98BB81FF0DC03F :1000600098B3977C98BB98B39B01220F331F220F44 :10007000331F220F331F292B28BB82FF06C092B3E8 @@ -15,16 +15,43 @@ :1000E000C301BC01CC15DD050CF46260CE15DF0543 :1000F0000CF46460C401A8DF2196CF3FD10561F7FD :10010000DF91CF911F910F91FF90EF90DF90CF90F3 -:10011000BF90AF909F908F907F906F90089560E018 -:1001200070E08FE090E090DFB7990EC080916200A0 -:100130008F5F809362002FE78AE196E02150804034 -:100140009040E1F700C00000B6990EC080916000B9 -:100150008F5F809360002FE78AE196E02150804016 -:100160009040E1F700C0000086990EC080916100C8 -:100170008F5F809361002FE78AE196E021508040F5 -:100180009040E1F700C000002091610040916000C4 -:100190006091620030E050E070E08FE090E084DF3A -:1001A000C3CF88B3806C88BB969A8FE493EC019799 -:1001B000F1F700C0000008958FE387BB81BBF1DF3A -:0601C000AEDFF894FFCF52 +:10011000BF90AF909F908F907F906F9008952F9297 +:100120003F924F925F926F927F928F929F92AF9287 +:10013000BF92CF92DF92EF92FF920F931F93CF93D4 +:10014000DF938C014B016A013901E12CF12C312C38 +:10015000212C2CC0C42DD52DB401C80175DF2196EA +:10016000CF3FD105C9F71E141F044CF4C32DD22D67 +:10017000B601C80169DF2196CE15DF05C9F78FEFFB +:10018000A81AB80AA614B70429F409C0A12CB12CE6 +:100190004E2C5F2C8FEFE816F104E4F2E4CF8FEFE2 +:1001A000E81AF80A8FEFE816F10421F01614170484 +:1001B0006CF3F5CFDF91CF911F910F91FF90EF90EE +:1001C000DF90CF90BF90AF909F908F907F906F9077 +:1001D0005F904F903F902F90089566E070E085E02B +:1001E00090E032DF2FE788E391E02150804090409B +:1001F000E1F700C0000060E070E085E090E024DFFF +:100200002FE784E89EE1215080409040E1F700C054 +:10021000000066E070E08FE090E016DF8FE493EC82 +:100220000197F1F700C0000060E070E08FE090E01F +:100230000BDF9FE72AE186E0915020408040E1F704 +:1002400000C0000066E070E08FE090E0FDDE9FE718 +:1002500028E381E0915020408040E1F700C0000099 +:1002600060E070E08FE090E0EFDE9FE72AE186E05B +:10027000915020408040E1F700C0000066E070E04F +:100280008FE090E0E1DE9FEB24ED81E09150204093 +:100290008040E1F700C0000060E070E08FE090E097 +:1002A000D3DE9FEF28E08DE3915020408040E1F7BE +:1002B00000C0000024E130E047E050E066E070E07C +:1002C0008FE090E02CDF089560E070E08FE090E038 +:1002D000BBDEB7990EC0809162008F5F8093620091 +:1002E0002FE78AE196E0215080409040E1F700C07E +:1002F0000000B6990EC0809160008F5F809360000F +:100300002FE78AE196E0215080409040E1F700C05D +:10031000000086990EC0809161008F5F809361001C +:100320002FE78AE196E0215080409040E1F700C03D +:10033000000020916100409160006091620030E017 +:1003400050E070E08FE090E0AFDEC3CF88B3806C08 +:1003500088BB969A8FE493EC0197F1F700C00000F8 +:1003600008958FE387BB81BBF1DF37DFADDFF89402 +:02037000FFCFBD :00000001FF diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss index 9f8134e..352dc01 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.lss @@ -3,33 +3,33 @@ Leuchtklotz.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000001c6 00000000 00000000 00000094 2**1 + 0 .text 00000372 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000000 00800060 000001c6 0000025a 2**0 + 1 .data 00000000 00800060 00000372 00000406 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000003 00800060 00800060 0000025a 2**0 + 2 .bss 00000003 00800060 00800060 00000406 2**0 ALLOC - 3 .stab 000006b4 00000000 00000000 0000025c 2**2 + 3 .stab 000006b4 00000000 00000000 00000408 2**2 CONTENTS, READONLY, DEBUGGING - 4 .stabstr 00000082 00000000 00000000 00000910 2**0 + 4 .stabstr 00000082 00000000 00000000 00000abc 2**0 CONTENTS, READONLY, DEBUGGING - 5 .comment 0000002f 00000000 00000000 00000992 2**0 + 5 .comment 0000002f 00000000 00000000 00000b3e 2**0 CONTENTS, READONLY - 6 .debug_aranges 00000068 00000000 00000000 000009c1 2**0 + 6 .debug_aranges 00000068 00000000 00000000 00000b6d 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_info 00000f11 00000000 00000000 00000a29 2**0 + 7 .debug_info 00000f1a 00000000 00000000 00000bd5 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_abbrev 000001dd 00000000 00000000 0000193a 2**0 + 8 .debug_abbrev 000001dd 00000000 00000000 00001aef 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_line 000003f7 00000000 00000000 00001b17 2**0 + 9 .debug_line 000003f8 00000000 00000000 00001ccc 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_frame 00000158 00000000 00000000 00001f10 2**2 + 10 .debug_frame 00000158 00000000 00000000 000020c4 2**2 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 00000182 00000000 00000000 00002068 2**0 + 11 .debug_str 00000182 00000000 00000000 0000221c 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_loc 000005fd 00000000 00000000 000021ea 2**0 + 12 .debug_loc 000005fd 00000000 00000000 0000239e 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_ranges 000000b8 00000000 00000000 000027e7 2**0 + 13 .debug_ranges 000000b8 00000000 00000000 0000299b 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: @@ -76,8 +76,8 @@ Disassembly of section .text: 3c: a3 36 cpi r26, 0x63 ; 99 3e: b2 07 cpc r27, r18 40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop> - 42: ba d0 rcall .+372 ; 0x1b8
- 44: be c0 rjmp .+380 ; 0x1c2 <_exit> + 42: 8f d1 rcall .+798 ; 0x362
+ 44: 94 c1 rjmp .+808 ; 0x36e <_exit> 00000046 <__bad_interrupt>: 46: dc cf rjmp .-72 ; 0x0 <__vectors> @@ -295,151 +295,454 @@ Disassembly of section .text: 11a: 6f 90 pop r6 11c: 08 95 ret -0000011e : - 11e: 60 e0 ldi r22, 0x00 ; 0 - 120: 70 e0 ldi r23, 0x00 ; 0 +0000011e : + 11e: 2f 92 push r2 + 120: 3f 92 push r3 } for (int i=0;i<80;i++) { rgbl(LED2, 0, 0, 0); } for (int i=0;i<80;i++) - 122: 8f e0 ldi r24, 0x0F ; 15 - 124: 90 e0 ldi r25, 0x00 ; 0 - 126: 90 df rcall .-224 ; 0x48 + 122: 4f 92 push r4 + 124: 5f 92 push r5 + 126: 6f 92 push r6 { rgbl(LED2, 200, 10, 0); } for (int i=0;i<80;i++) { rgbl(LED2, 0, 0, 0); - 128: b7 99 sbic 0x16, 7 ; 22 - 12a: 0e c0 rjmp .+28 ; 0x148 - 12c: 80 91 62 00 lds r24, 0x0062 - 130: 8f 5f subi r24, 0xFF ; 255 - 132: 80 93 62 00 sts 0x0062, r24 - 136: 2f e7 ldi r18, 0x7F ; 127 - 138: 8a e1 ldi r24, 0x1A ; 26 - 13a: 96 e0 ldi r25, 0x06 ; 6 + 128: 7f 92 push r7 + 12a: 8f 92 push r8 + 12c: 9f 92 push r9 + 12e: af 92 push r10 + 130: bf 92 push r11 + 132: cf 92 push r12 + 134: df 92 push r13 + 136: ef 92 push r14 + 138: ff 92 push r15 + 13a: 0f 93 push r16 } for (int i=0;i<80;i++) { rgbl(LED2, 200, 10, 0); } for (int i=0;i<80;i++) - 13c: 21 50 subi r18, 0x01 ; 1 + 13c: 1f 93 push r17 } void programCop() { while(1) { for (int i=0;i<80;i++) - 13e: 80 40 sbci r24, 0x00 ; 0 - 140: 90 40 sbci r25, 0x00 ; 0 - 142: e1 f7 brne .-8 ; 0x13c + 13e: cf 93 push r28 + 140: df 93 push r29 + 142: 8c 01 movw r16, r24 + } + ledg(led,rgb); + } +} + +void fade(int led, int from, int to, int dur) { + 144: 4b 01 movw r8, r22 + 146: 6a 01 movw r12, r20 + 148: 39 01 movw r6, r18 + for (int i=0;i<0xFF;i++) + 14a: e1 2c mov r14, r1 + 14c: f1 2c mov r15, r1 + for(int k=0;k + +void fade(int led, int from, int to, int dur) { + for (int i=0;i<0xFF;i++) + { + for(int k=0;k + +void fade(int led, int from, int to, int dur) { + for (int i=0;i<0xFF;i++) + { + for(int k=0;k + { + ledg(led,from); + } + for (int j=0;j + 16c: c3 2d mov r28, r3 + 16e: d2 2d mov r29, r2 + { + ledg(led,to); + 170: b6 01 movw r22, r12 + 172: c8 01 movw r24, r16 + 174: 69 df rcall .-302 ; 0x48 + for(int k=0;k +} + +void fade(int led, int from, int to, int dur) { + for (int i=0;i<0xFF;i++) + { + for(int k=0;k + 18a: 09 c0 rjmp .+18 ; 0x19e + 18c: a1 2c mov r10, r1 + 18e: b1 2c mov r11, r1 + for (int j=i;j<0xFF;j++) + 190: 4e 2c mov r4, r14 + 192: 5f 2c mov r5, r15 + 194: 8f ef ldi r24, 0xFF ; 255 + 196: e8 16 cp r14, r24 + 198: f1 04 cpc r15, r1 + 19a: e4 f2 brlt .-72 ; 0x154 + 19c: e4 cf rjmp .-56 ; 0x166 + ledg(led,rgb); + } +} + +void fade(int led, int from, int to, int dur) { + for (int i=0;i<0xFF;i++) + 19e: 8f ef ldi r24, 0xFF ; 255 + 1a0: e8 1a sub r14, r24 + 1a2: f8 0a sbc r15, r24 + 1a4: 8f ef ldi r24, 0xFF ; 255 + 1a6: e8 16 cp r14, r24 + 1a8: f1 04 cpc r15, r1 + 1aa: 21 f0 breq .+8 ; 0x1b4 + { + for(int k=0;k + 1b2: f5 cf rjmp .-22 ; 0x19e + { + ledg(led,to); + } + } + } +} + 1b4: df 91 pop r29 + 1b6: cf 91 pop r28 + 1b8: 1f 91 pop r17 + 1ba: 0f 91 pop r16 + 1bc: ff 90 pop r15 + 1be: ef 90 pop r14 + 1c0: df 90 pop r13 + 1c2: cf 90 pop r12 + 1c4: bf 90 pop r11 + 1c6: af 90 pop r10 + 1c8: 9f 90 pop r9 + 1ca: 8f 90 pop r8 + 1cc: 7f 90 pop r7 + 1ce: 6f 90 pop r6 + 1d0: 5f 90 pop r5 + 1d2: 4f 90 pop r4 + 1d4: 3f 90 pop r3 + 1d6: 2f 90 pop r2 + 1d8: 08 95 ret + +000001da : + +void initleds() { + ledg(LED1 | LED3, CYAN); + 1da: 66 e0 ldi r22, 0x06 ; 6 + 1dc: 70 e0 ldi r23, 0x00 ; 0 + 1de: 85 e0 ldi r24, 0x05 ; 5 + 1e0: 90 e0 ldi r25, 0x00 ; 0 + 1e2: 32 df rcall .-412 ; 0x48 #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); - 144: 00 c0 rjmp .+0 ; 0x146 - 146: 00 00 nop + 1e4: 2f e7 ldi r18, 0x7F ; 127 + 1e6: 88 e3 ldi r24, 0x38 ; 56 + 1e8: 91 e0 ldi r25, 0x01 ; 1 + 1ea: 21 50 subi r18, 0x01 ; 1 + 1ec: 80 40 sbci r24, 0x00 ; 0 + 1ee: 90 40 sbci r25, 0x00 ; 0 + 1f0: e1 f7 brne .-8 ; 0x1ea + 1f2: 00 c0 rjmp .+0 ; 0x1f4 + 1f4: 00 00 nop + _delay_ms(20); + ledg(LED1 | LED3, BLACK); + 1f6: 60 e0 ldi r22, 0x00 ; 0 + 1f8: 70 e0 ldi r23, 0x00 ; 0 + 1fa: 85 e0 ldi r24, 0x05 ; 5 + 1fc: 90 e0 ldi r25, 0x00 ; 0 + 1fe: 24 df rcall .-440 ; 0x48 + 200: 2f e7 ldi r18, 0x7F ; 127 + 202: 84 e8 ldi r24, 0x84 ; 132 + 204: 9e e1 ldi r25, 0x1E ; 30 + 206: 21 50 subi r18, 0x01 ; 1 + 208: 80 40 sbci r24, 0x00 ; 0 + 20a: 90 40 sbci r25, 0x00 ; 0 + 20c: e1 f7 brne .-8 ; 0x206 + 20e: 00 c0 rjmp .+0 ; 0x210 + 210: 00 00 nop + _delay_ms(500); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + 212: 66 e0 ldi r22, 0x06 ; 6 + 214: 70 e0 ldi r23, 0x00 ; 0 + 216: 8f e0 ldi r24, 0x0F ; 15 + 218: 90 e0 ldi r25, 0x00 ; 0 + 21a: 16 df rcall .-468 ; 0x48 + 21c: 8f e4 ldi r24, 0x4F ; 79 + 21e: 93 ec ldi r25, 0xC3 ; 195 + 220: 01 97 sbiw r24, 0x01 ; 1 + 222: f1 f7 brne .-4 ; 0x220 + 224: 00 c0 rjmp .+0 ; 0x226 + 226: 00 00 nop + _delay_ms(10); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 228: 60 e0 ldi r22, 0x00 ; 0 + 22a: 70 e0 ldi r23, 0x00 ; 0 + 22c: 8f e0 ldi r24, 0x0F ; 15 + 22e: 90 e0 ldi r25, 0x00 ; 0 + 230: 0b df rcall .-490 ; 0x48 + 232: 9f e7 ldi r25, 0x7F ; 127 + 234: 2a e1 ldi r18, 0x1A ; 26 + 236: 86 e0 ldi r24, 0x06 ; 6 + 238: 91 50 subi r25, 0x01 ; 1 + 23a: 20 40 sbci r18, 0x00 ; 0 + 23c: 80 40 sbci r24, 0x00 ; 0 + 23e: e1 f7 brne .-8 ; 0x238 + 240: 00 c0 rjmp .+0 ; 0x242 + 242: 00 00 nop + _delay_ms(100); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + 244: 66 e0 ldi r22, 0x06 ; 6 + 246: 70 e0 ldi r23, 0x00 ; 0 + 248: 8f e0 ldi r24, 0x0F ; 15 + 24a: 90 e0 ldi r25, 0x00 ; 0 + 24c: fd de rcall .-518 ; 0x48 + 24e: 9f e7 ldi r25, 0x7F ; 127 + 250: 28 e3 ldi r18, 0x38 ; 56 + 252: 81 e0 ldi r24, 0x01 ; 1 + 254: 91 50 subi r25, 0x01 ; 1 + 256: 20 40 sbci r18, 0x00 ; 0 + 258: 80 40 sbci r24, 0x00 ; 0 + 25a: e1 f7 brne .-8 ; 0x254 + 25c: 00 c0 rjmp .+0 ; 0x25e + 25e: 00 00 nop + _delay_ms(20); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 260: 60 e0 ldi r22, 0x00 ; 0 + 262: 70 e0 ldi r23, 0x00 ; 0 + 264: 8f e0 ldi r24, 0x0F ; 15 + 266: 90 e0 ldi r25, 0x00 ; 0 + 268: ef de rcall .-546 ; 0x48 + 26a: 9f e7 ldi r25, 0x7F ; 127 + 26c: 2a e1 ldi r18, 0x1A ; 26 + 26e: 86 e0 ldi r24, 0x06 ; 6 + 270: 91 50 subi r25, 0x01 ; 1 + 272: 20 40 sbci r18, 0x00 ; 0 + 274: 80 40 sbci r24, 0x00 ; 0 + 276: e1 f7 brne .-8 ; 0x270 + 278: 00 c0 rjmp .+0 ; 0x27a + 27a: 00 00 nop + _delay_ms(100); + ledg(LED1 | LED2 | LED3 | LED4, CYAN); + 27c: 66 e0 ldi r22, 0x06 ; 6 + 27e: 70 e0 ldi r23, 0x00 ; 0 + 280: 8f e0 ldi r24, 0x0F ; 15 + 282: 90 e0 ldi r25, 0x00 ; 0 + 284: e1 de rcall .-574 ; 0x48 + 286: 9f eb ldi r25, 0xBF ; 191 + 288: 24 ed ldi r18, 0xD4 ; 212 + 28a: 81 e0 ldi r24, 0x01 ; 1 + 28c: 91 50 subi r25, 0x01 ; 1 + 28e: 20 40 sbci r18, 0x00 ; 0 + 290: 80 40 sbci r24, 0x00 ; 0 + 292: e1 f7 brne .-8 ; 0x28c + 294: 00 c0 rjmp .+0 ; 0x296 + 296: 00 00 nop + _delay_ms(30); + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 298: 60 e0 ldi r22, 0x00 ; 0 + 29a: 70 e0 ldi r23, 0x00 ; 0 + 29c: 8f e0 ldi r24, 0x0F ; 15 + 29e: 90 e0 ldi r25, 0x00 ; 0 + 2a0: d3 de rcall .-602 ; 0x48 + 2a2: 9f ef ldi r25, 0xFF ; 255 + 2a4: 28 e0 ldi r18, 0x08 ; 8 + 2a6: 8d e3 ldi r24, 0x3D ; 61 + 2a8: 91 50 subi r25, 0x01 ; 1 + 2aa: 20 40 sbci r18, 0x00 ; 0 + 2ac: 80 40 sbci r24, 0x00 ; 0 + 2ae: e1 f7 brne .-8 ; 0x2a8 + 2b0: 00 c0 rjmp .+0 ; 0x2b2 + 2b2: 00 00 nop + _delay_ms(1000); + fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 20); + 2b4: 24 e1 ldi r18, 0x14 ; 20 + 2b6: 30 e0 ldi r19, 0x00 ; 0 + 2b8: 47 e0 ldi r20, 0x07 ; 7 + 2ba: 50 e0 ldi r21, 0x00 ; 0 + 2bc: 66 e0 ldi r22, 0x06 ; 6 + 2be: 70 e0 ldi r23, 0x00 ; 0 + 2c0: 8f e0 ldi r24, 0x0F ; 15 + 2c2: 90 e0 ldi r25, 0x00 ; 0 + 2c4: 2c df rcall .-424 ; 0x11e + 2c6: 08 95 ret + +000002c8 : + +volatile uint8_t rgb_r = 0; +volatile uint8_t rgb_b = 0; +volatile uint8_t rgb_g = 0; +void programColorFull() { + ledg(LED1 | LED2 | LED3 | LED4, BLACK); + 2c8: 60 e0 ldi r22, 0x00 ; 0 + 2ca: 70 e0 ldi r23, 0x00 ; 0 + 2cc: 8f e0 ldi r24, 0x0F ; 15 + 2ce: 90 e0 ldi r25, 0x00 ; 0 + 2d0: bb de rcall .-650 ; 0x48 while(1) { if(!(PINB & (1< rgb_r++; + 2d6: 80 91 62 00 lds r24, 0x0062 + 2da: 8f 5f subi r24, 0xFF ; 255 + 2dc: 80 93 62 00 sts 0x0062, r24 + 2e0: 2f e7 ldi r18, 0x7F ; 127 + 2e2: 8a e1 ldi r24, 0x1A ; 26 + 2e4: 96 e0 ldi r25, 0x06 ; 6 + 2e6: 21 50 subi r18, 0x01 ; 1 + 2e8: 80 40 sbci r24, 0x00 ; 0 + 2ea: 90 40 sbci r25, 0x00 ; 0 + 2ec: e1 f7 brne .-8 ; 0x2e6 + 2ee: 00 c0 rjmp .+0 ; 0x2f0 + 2f0: 00 00 nop _delay_ms(100); } if(!(PINB & (1< + 2f2: b6 99 sbic 0x16, 6 ; 22 + 2f4: 0e c0 rjmp .+28 ; 0x312 rgb_g++; - 14c: 80 91 60 00 lds r24, 0x0060 - 150: 8f 5f subi r24, 0xFF ; 255 - 152: 80 93 60 00 sts 0x0060, r24 - 156: 2f e7 ldi r18, 0x7F ; 127 - 158: 8a e1 ldi r24, 0x1A ; 26 - 15a: 96 e0 ldi r25, 0x06 ; 6 - 15c: 21 50 subi r18, 0x01 ; 1 - 15e: 80 40 sbci r24, 0x00 ; 0 - 160: 90 40 sbci r25, 0x00 ; 0 - 162: e1 f7 brne .-8 ; 0x15c - 164: 00 c0 rjmp .+0 ; 0x166 - 166: 00 00 nop + 2f6: 80 91 60 00 lds r24, 0x0060 + 2fa: 8f 5f subi r24, 0xFF ; 255 + 2fc: 80 93 60 00 sts 0x0060, r24 + 300: 2f e7 ldi r18, 0x7F ; 127 + 302: 8a e1 ldi r24, 0x1A ; 26 + 304: 96 e0 ldi r25, 0x06 ; 6 + 306: 21 50 subi r18, 0x01 ; 1 + 308: 80 40 sbci r24, 0x00 ; 0 + 30a: 90 40 sbci r25, 0x00 ; 0 + 30c: e1 f7 brne .-8 ; 0x306 + 30e: 00 c0 rjmp .+0 ; 0x310 + 310: 00 00 nop _delay_ms(100); } if(!(PIND & (1< + 312: 86 99 sbic 0x10, 6 ; 16 + 314: 0e c0 rjmp .+28 ; 0x332 rgb_b++; - 16c: 80 91 61 00 lds r24, 0x0061 - 170: 8f 5f subi r24, 0xFF ; 255 - 172: 80 93 61 00 sts 0x0061, r24 - 176: 2f e7 ldi r18, 0x7F ; 127 - 178: 8a e1 ldi r24, 0x1A ; 26 - 17a: 96 e0 ldi r25, 0x06 ; 6 - 17c: 21 50 subi r18, 0x01 ; 1 - 17e: 80 40 sbci r24, 0x00 ; 0 - 180: 90 40 sbci r25, 0x00 ; 0 - 182: e1 f7 brne .-8 ; 0x17c - 184: 00 c0 rjmp .+0 ; 0x186 - 186: 00 00 nop + 316: 80 91 61 00 lds r24, 0x0061 + 31a: 8f 5f subi r24, 0xFF ; 255 + 31c: 80 93 61 00 sts 0x0061, r24 + 320: 2f e7 ldi r18, 0x7F ; 127 + 322: 8a e1 ldi r24, 0x1A ; 26 + 324: 96 e0 ldi r25, 0x06 ; 6 + 326: 21 50 subi r18, 0x01 ; 1 + 328: 80 40 sbci r24, 0x00 ; 0 + 32a: 90 40 sbci r25, 0x00 ; 0 + 32c: e1 f7 brne .-8 ; 0x326 + 32e: 00 c0 rjmp .+0 ; 0x330 + 330: 00 00 nop _delay_ms(100); } rgbl(LED1 | LED2 | LED3 | LED4, rgb_r, rgb_g, rgb_b); - 188: 20 91 61 00 lds r18, 0x0061 - 18c: 40 91 60 00 lds r20, 0x0060 - 190: 60 91 62 00 lds r22, 0x0062 - 194: 30 e0 ldi r19, 0x00 ; 0 - 196: 50 e0 ldi r21, 0x00 ; 0 - 198: 70 e0 ldi r23, 0x00 ; 0 - 19a: 8f e0 ldi r24, 0x0F ; 15 - 19c: 90 e0 ldi r25, 0x00 ; 0 - 19e: 84 df rcall .-248 ; 0xa8 + 332: 20 91 61 00 lds r18, 0x0061 + 336: 40 91 60 00 lds r20, 0x0060 + 33a: 60 91 62 00 lds r22, 0x0062 + 33e: 30 e0 ldi r19, 0x00 ; 0 + 340: 50 e0 ldi r21, 0x00 ; 0 + 342: 70 e0 ldi r23, 0x00 ; 0 + 344: 8f e0 ldi r24, 0x0F ; 15 + 346: 90 e0 ldi r25, 0x00 ; 0 + 348: af de rcall .-674 ; 0xa8 } - 1a0: c3 cf rjmp .-122 ; 0x128 + 34a: c3 cf rjmp .-122 ; 0x2d2 -000001a2 : +0000034c : } void initschalter() { PORTB |= ((1< - 1b2: 00 c0 rjmp .+0 ; 0x1b4 - 1b4: 00 00 nop - 1b6: 08 95 ret + 352: 96 9a sbi 0x12, 6 ; 18 + 354: 8f e4 ldi r24, 0x4F ; 79 + 356: 93 ec ldi r25, 0xC3 ; 195 + 358: 01 97 sbiw r24, 0x01 ; 1 + 35a: f1 f7 brne .-4 ; 0x358 + 35c: 00 c0 rjmp .+0 ; 0x35e + 35e: 00 00 nop + 360: 08 95 ret -000001b8
: +00000362
: } } int main(void) { DDRB = 0b00111111; - 1b8: 8f e3 ldi r24, 0x3F ; 63 - 1ba: 87 bb out 0x17, r24 ; 23 + 362: 8f e3 ldi r24, 0x3F ; 63 + 364: 87 bb out 0x17, r24 ; 23 DDRD = 0b00111111; - 1bc: 81 bb out 0x11, r24 ; 17 + 366: 81 bb out 0x11, r24 ; 17 initschalter(); - 1be: f1 df rcall .-30 ; 0x1a2 - //initleds(); + 368: f1 df rcall .-30 ; 0x34c + initleds(); + 36a: 37 df rcall .-402 ; 0x1da while(1) { programColorFull(); - 1c0: ae df rcall .-164 ; 0x11e + 36c: ad df rcall .-166 ; 0x2c8 -000001c2 <_exit>: - 1c2: f8 94 cli +0000036e <_exit>: + 36e: f8 94 cli -000001c4 <__stop_program>: - 1c4: ff cf rjmp .-2 ; 0x1c4 <__stop_program> +00000370 <__stop_program>: + 370: ff cf rjmp .-2 ; 0x370 <__stop_program> diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map index 6072e44..5d03803 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.map @@ -9,9 +9,6 @@ Discarded input sections .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o .text 0x00000000 0x0 Leuchtklotz.o - .text.fade 0x00000000 0xbc Leuchtklotz.o - .text.initleds - 0x00000000 0xee Leuchtklotz.o .text.programRainbow 0x00000000 0x80 Leuchtklotz.o .text.programWarnYellow @@ -158,7 +155,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .rela.plt *(.rela.plt) -.text 0x00000000 0x1c6 +.text 0x00000000 0x372 *(.vectors) .vectors 0x00000000 0x2a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o 0x00000000 __vector_default @@ -239,19 +236,24 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 0x00000048 ledg .text.rgbl 0x000000a8 0x76 Leuchtklotz.o 0x000000a8 rgbl + .text.fade 0x0000011e 0xbc Leuchtklotz.o + 0x0000011e fade + .text.initleds + 0x000001da 0xee Leuchtklotz.o + 0x000001da initleds .text.programColorFull - 0x0000011e 0x84 Leuchtklotz.o - 0x0000011e programColorFull + 0x000002c8 0x84 Leuchtklotz.o + 0x000002c8 programColorFull .text.initschalter - 0x000001a2 0x16 Leuchtklotz.o - 0x000001a2 initschalter - .text.main 0x000001b8 0xa Leuchtklotz.o - 0x000001b8 main - 0x000001c2 . = ALIGN (0x2) + 0x0000034c 0x16 Leuchtklotz.o + 0x0000034c initschalter + .text.main 0x00000362 0xc Leuchtklotz.o + 0x00000362 main + 0x0000036e . = ALIGN (0x2) *(.fini9) - .fini9 0x000001c2 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) - 0x000001c2 _exit - 0x000001c2 exit + .fini9 0x0000036e 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) + 0x0000036e _exit + 0x0000036e exit *(.fini9) *(.fini8) *(.fini8) @@ -270,11 +272,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.fini1) *(.fini1) *(.fini0) - .fini0 0x000001c2 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) + .fini0 0x0000036e 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) *(.fini0) - 0x000001c6 _etext = . + 0x00000372 _etext = . -.data 0x00800060 0x0 load address 0x000001c6 +.data 0x00800060 0x0 load address 0x00000372 0x00800060 PROVIDE (__data_start, .) *(.data) .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o @@ -299,8 +301,8 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.bss*) *(COMMON) 0x00800063 PROVIDE (__bss_end, .) - 0x000001c6 __data_load_start = LOADADDR (.data) - 0x000001c6 __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x00000372 __data_load_start = LOADADDR (.data) + 0x00000372 __data_load_end = (__data_load_start + SIZEOF (.data)) .noinit 0x00800063 0x0 0x00800063 PROVIDE (__noinit_start, .) @@ -373,18 +375,18 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0xf11 +.debug_info 0x00000000 0xf1a *(.debug_info) - .debug_info 0x00000000 0xf11 Leuchtklotz.o + .debug_info 0x00000000 0xf1a Leuchtklotz.o *(.gnu.linkonce.wi.*) .debug_abbrev 0x00000000 0x1dd *(.debug_abbrev) .debug_abbrev 0x00000000 0x1dd Leuchtklotz.o -.debug_line 0x00000000 0x3f7 +.debug_line 0x00000000 0x3f8 *(.debug_line) - .debug_line 0x00000000 0x3f7 Leuchtklotz.o + .debug_line 0x00000000 0x3f8 Leuchtklotz.o .debug_frame 0x00000000 0x158 *(.debug_frame) diff --git a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec index b01c240..c8cb3e7 100644 --- a/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec +++ b/Leuchtklotz/Leuchtklotz/Debug/Leuchtklotz.srec @@ -3,7 +3,7 @@ S113000014C021C020C01FC01EC01DC01CC01BC006 S11300101AC019C018C017C016C015C014C013C028 S113002012C011C010C00FC00EC011241FBECFEDEE S1130030CDBF20E0A0E6B0E001C01D92A336B20718 -S1130040E1F7BAD0BEC0DCCF6770772780FF06C067 +S1130040E1F78FD194C1DCCF6770772780FF06C0BA S113005098B3987F98BB98B3962B98BB81FF0DC03B S113006098B3977C98BB98B39B01220F331F220F40 S1130070331F220F331F292B28BB82FF06C092B3E4 @@ -16,16 +16,43 @@ S11300D001E010E0612C712CC801CA15DB050CF09D S11300E0C301BC01CC15DD050CF46260CE15DF053F S11300F00CF46460C401A8DF2196CF3FD10561F7F9 S1130100DF91CF911F910F91FF90EF90DF90CF90EF -S1130110BF90AF909F908F907F906F90089560E014 -S113012070E08FE090E090DFB7990EC0809162009C -S11301308F5F809362002FE78AE196E02150804030 -S11301409040E1F700C00000B6990EC080916000B5 -S11301508F5F809360002FE78AE196E02150804012 -S11301609040E1F700C0000086990EC080916100C4 -S11301708F5F809361002FE78AE196E021508040F1 -S11301809040E1F700C000002091610040916000C0 -S11301906091620030E050E070E08FE090E084DF36 -S11301A0C3CF88B3806C88BB969A8FE493EC019795 -S11301B0F1F700C0000008958FE387BB81BBF1DF36 -S10901C0AEDFF894FFCF4E +S1130110BF90AF909F908F907F906F9008952F9293 +S11301203F924F925F926F927F928F929F92AF9283 +S1130130BF92CF92DF92EF92FF920F931F93CF93D0 +S1130140DF938C014B016A013901E12CF12C312C34 +S1130150212C2CC0C42DD52DB401C80175DF2196E6 +S1130160CF3FD105C9F71E141F044CF4C32DD22D63 +S1130170B601C80169DF2196CE15DF05C9F78FEFF7 +S1130180A81AB80AA614B70429F409C0A12CB12CE2 +S11301904E2C5F2C8FEFE816F104E4F2E4CF8FEFDE +S11301A0E81AF80A8FEFE816F10421F01614170480 +S11301B06CF3F5CFDF91CF911F910F91FF90EF90EA +S11301C0DF90CF90BF90AF909F908F907F906F9073 +S11301D05F904F903F902F90089566E070E085E027 +S11301E090E032DF2FE788E391E021508040904097 +S11301F0E1F700C0000060E070E085E090E024DFFB +S11302002FE784E89EE1215080409040E1F700C050 +S1130210000066E070E08FE090E016DF8FE493EC7E +S11302200197F1F700C0000060E070E08FE090E01B +S11302300BDF9FE72AE186E0915020408040E1F700 +S113024000C0000066E070E08FE090E0FDDE9FE714 +S113025028E381E0915020408040E1F700C0000095 +S113026060E070E08FE090E0EFDE9FE72AE186E057 +S1130270915020408040E1F700C0000066E070E04B +S11302808FE090E0E1DE9FEB24ED81E0915020408F +S11302908040E1F700C0000060E070E08FE090E093 +S11302A0D3DE9FEF28E08DE3915020408040E1F7BA +S11302B000C0000024E130E047E050E066E070E078 +S11302C08FE090E02CDF089560E070E08FE090E034 +S11302D0BBDEB7990EC0809162008F5F809362008D +S11302E02FE78AE196E0215080409040E1F700C07A +S11302F00000B6990EC0809160008F5F809360000B +S11303002FE78AE196E0215080409040E1F700C059 +S1130310000086990EC0809161008F5F8093610018 +S11303202FE78AE196E0215080409040E1F700C039 +S1130330000020916100409160006091620030E013 +S113034050E070E08FE090E0AFDEC3CF88B3806C04 +S113035088BB969A8FE493EC0197F1F700C00000F4 +S113036008958FE387BB81BBF1DF37DFADDFF894FE +S1050370FFCFB9 S9030000FC diff --git a/Leuchtklotz/Leuchtklotz/Leuchtklotz.c b/Leuchtklotz/Leuchtklotz/Leuchtklotz.c index cbda3ad..fa74e1b 100644 --- a/Leuchtklotz/Leuchtklotz/Leuchtklotz.c +++ b/Leuchtklotz/Leuchtklotz/Leuchtklotz.c @@ -219,7 +219,7 @@ int main(void) DDRB = 0b00111111; DDRD = 0b00111111; initschalter(); - //initleds(); + initleds(); while(1) { programColorFull();