diff --git a/BackupFiles/Laminator-Usb.BK1 b/BackupFiles/Laminator-Usb.BK1 index 38f301d..14b399c 100644 Binary files a/BackupFiles/Laminator-Usb.BK1 and b/BackupFiles/Laminator-Usb.BK1 differ diff --git a/BackupFiles/Laminator-Usb.BK2 b/BackupFiles/Laminator-Usb.BK2 index c3f4336..018d3f1 100644 Binary files a/BackupFiles/Laminator-Usb.BK2 and b/BackupFiles/Laminator-Usb.BK2 differ diff --git a/BackupFiles/Laminator-Usb.BK3 b/BackupFiles/Laminator-Usb.BK3 index 470c012..38f301d 100644 Binary files a/BackupFiles/Laminator-Usb.BK3 and b/BackupFiles/Laminator-Usb.BK3 differ diff --git a/BackupFiles/Laminator-Usb.BK4 b/BackupFiles/Laminator-Usb.BK4 index de6bae4..c3f4336 100644 Binary files a/BackupFiles/Laminator-Usb.BK4 and b/BackupFiles/Laminator-Usb.BK4 differ diff --git a/BackupFiles/Laminator-Usb.BK5 b/BackupFiles/Laminator-Usb.BK5 index a55e6f0..470c012 100644 Binary files a/BackupFiles/Laminator-Usb.BK5 and b/BackupFiles/Laminator-Usb.BK5 differ diff --git a/Laminator-Usb.T3000 b/Laminator-Usb.T3000 index 018d3f1..3f8d160 100644 Binary files a/Laminator-Usb.T3000 and b/Laminator-Usb.T3000 differ diff --git a/USBLaminator/USBLaminator.atsuo b/USBLaminator/USBLaminator.atsuo index e57d351..1b12e60 100644 Binary files a/USBLaminator/USBLaminator.atsuo and b/USBLaminator/USBLaminator.atsuo differ diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.d b/USBLaminator/USBLaminator/Debug/USBLaminator.d index 5c3faba..8a37b49 100644 --- a/USBLaminator/USBLaminator/Debug/USBLaminator.d +++ b/USBLaminator/USBLaminator/Debug/USBLaminator.d @@ -10,8 +10,9 @@ USBLaminator.d USBLaminator.o: .././USBLaminator.cpp .././peripheral.h \ 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/include/avr/version.h \ 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/include/avr/fuse.h \ 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/include/avr/lock.h \ - .././io/hardware/portb.hpp .././io/hardware/portc.hpp .././io/Led.hpp \ - .././io/hardware/pin.hpp .././io/SSR.hpp \ + .././io/hardware/portb.hpp .././io/hardware/portc.hpp \ + .././io/hardware/portd.hpp .././io/Led.hpp .././io/hardware/pin.hpp \ + .././io/SSR.hpp \ 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/include/util/delay.h \ 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/include/util/delay_basic.h \ 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/include/math.h \ @@ -46,6 +47,8 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8- .././io/hardware/portc.hpp: +.././io/hardware/portd.hpp: + .././io/Led.hpp: .././io/hardware/pin.hpp: diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.elf b/USBLaminator/USBLaminator/Debug/USBLaminator.elf index c6609ed..704955c 100644 Binary files a/USBLaminator/USBLaminator/Debug/USBLaminator.elf and b/USBLaminator/USBLaminator/Debug/USBLaminator.elf differ diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.hex b/USBLaminator/USBLaminator/Debug/USBLaminator.hex index efbccad..9be1ff0 100644 --- a/USBLaminator/USBLaminator/Debug/USBLaminator.hex +++ b/USBLaminator/USBLaminator/Debug/USBLaminator.hex @@ -1,53 +1,71 @@ :100000000C942B000C9453000C9453000C9453004C -:100010000C9453000C9453000C94FE000C94530069 +:100010000C9453000C9453000C9451010C94530015 :100020000C9453000C9453000C9453000C94530004 :100030000C9453000C9453000C9453000C945300F4 :100040000C9453000C9453000C9453000C945300E4 -:100050000C945300530111241FBECFE5D4E0DEBF42 -:10006000CDBF10E0A0E6B0E0E2EDF2E002C0059006 -:100070000D92A03CB107D9F720E0A0ECB0E001C0A0 -:100080001D92A33CB207E1F710E0C6E5D0E004C042 -:100090002297FE010E946301C435D107C9F70E946F -:1000A000FB000C9467010C940000CF93C49ABC9A97 +:100050000C945300A80111241FBECFE5D4E0DEBFED +:10006000CDBF11E0A0E6B0E0ECE7F3E002C0059000 +:100070000D92A833B107D9F721E0A8E3B1E001C0A0 +:100080001D92AB33B207E1F710E0C6E5D0E004C043 +:100090002297FE010E94B801C435D107C9F70E941A +:1000A0004E010C94BC010C940000CF93C49ABC9AEE :1000B000AA98A29AAB98A39AAC98A49AAD98A59A3C :1000C000AE98A69AAF98A79AE1E6F0E083E2C39AC9 :1000D000BB9A5D9BFECF8CB9C398BB9A819181116D -:1000E000F6CFAA98A29AAB98A39AAC98A49AAD9886 -:1000F000A59AAE98A69AAF98A79A20E030E041E082 -:1001000050E0CA01022E02C0880F991F0A94E2F73C -:10011000A82FA17080FF02C0AA9AA29AF82FF270AD -:1001200081FF02C0AB9AA39AE82FE47082FF02C05D -:10013000AC9AA49A782F787083FF02C0AD9AA59AE2 -:10014000682F607184FF02C0AE9AA69A982F9072B1 -:1001500085FF02C0AF9AA79A8FE7BAE1C6E0815047 -:10016000B040C040E1F700C00000AA2311F0AA98F7 -:10017000A29AFF2311F0AB98A39AEE2311F0AC984A -:10018000A49A772311F0AD98A59A662311F0AE9842 -:10019000A69A992311F0AF98A79A2F5F3F4F263068 -:1001A000310509F0AECFAA98A29AAB98A39AAC9861 -:1001B000A49AAD98A59AAE98A69AAF98A79A1FBC94 -:1001C0008EB58B608EBD1DBC1CBC17BC16BC81E6F9 -:1001D0008BBD88EA8ABD19BC18BC89B7806189BF0C -:1001E0007894C498BC9AC39ABB9AC398BB9AC29A93 -:1001F000BA9ACF9108950E945500FFCF1F920F9297 -:100200000FB60F9211248F939F9395B384E08927A3 -:1002100085BB9F918F910F900FBE0F901F901895E7 -:10022000CF93DF931F92CDB7DEB76983BC9ABB9A99 -:10023000BA9AC498BC9AC398BB9AC298BA9A81E8F1 -:1002400089B988E08AB986E880BDE3EBF0E085E50E -:10025000C39ABB9A5D9BFECF8CB9C398BB9A819120 -:100260008111F6CF0F90DF91CF910895BC9ABB9A80 -:10027000BA9AC498BC9AC398BB9AC298BA9A08957D -:10028000A29AA39AA49AA59AA69AA79AAA98A29A79 -:10029000AB98A39AAC98A49AAD98A59AAE98A69A52 -:1002A000AF98A79A089582EC90E00E94360181EC05 -:1002B00090E00E94400160E080EC90E00E9410011C -:1002C0000895EE0FFF1F0590F491E02D0994F89426 -:0202D000FFCF5E -:1002D2002323232320426567696E20426F6F747562 -:1002E2007020232323232323232323232323232392 -:1002F20023232323232323232323232323232323CC -:1003020023232323232323232323232323232323BB -:1003120023232323232323232323232323232323AB -:100322000A005561727420646F6E65210D0A000027 +:1000E000F6CFEEE9F0E083E2C39ABB9A5D9BFECFC8 +:1000F0008CB9C398BB9A81918111F6CFAA98A29A24 +:10010000AB98A39AAC98A49AAD98A59AAE98A69AE3 +:10011000AF98A79A20E030E041E050E0CA01022EFB +:1001200002C0880F991F0A94E2F7A82FA17080FFE0 +:1001300002C0AA9AA29AF82FF27081FF02C0AB9A6D +:10014000A39AE82FE47082FF02C0AC9AA49A782F99 +:10015000787083FF02C0AD9AA59A682F607184FF02 +:1001600002C0AE9AA69A982F907285FF02C0AF9AED +:10017000A79A8FEFB1EEC4E08150B040C040E1F7E4 +:1001800000C00000AA2311F0AA98A29AFF2311F040 +:10019000AB98A39AEE2311F0AC98A49A772311F0B0 +:1001A000AD98A59A662311F0AE98A69A992311F0FE +:1001B000AF98A79A2F5F3F4F2630310509F0AECF99 +:1001C000AA98A29AAB98A39AAC98A49AAD98A59A2B +:1001D000AE98A69AAF98A79AEDEAF0E083E2C39AA8 +:1001E000BB9A5D9BFECF8CB9C398BB9A819181115C +:1001F000F6CF1FBC8EB58B608EBD1DBC1CBC17BC62 +:1002000016BC81E68BBD88EA8ABD19BC18BC89B7CB +:10021000806189BF7894ECEBF0E083E2C39ABB9AEB +:100220005D9BFECF8CB9C398BB9A81918111F6CFAB +:1002300025C0C39ABB9A5D9BFECF8CB9C398BB9A6D +:1002400081918111F6CFE2EDF0E083E2C39ABB9A8F +:100250005D9BFECF8CB9C398BB9A81918111F6CF7B +:1002600015C0C39ABB9A5D9BFECF8CB9C398BB9A4D +:1002700081918111F6CFC29ABA9A0EC0C498BC9AE5 +:10028000C39ABB9AE2EEF0E083E2D3CFC398BB9A65 +:10029000EFEEF0E083E2E5CFCF9108950E945500A4 +:1002A000FFCF1F920F920FB60F9211248F939F933F +:1002B00095B384E0892785BB9F918F910F900FBEE6 +:1002C0000F901F901895CF93DF931F92CDB7DEB795 +:1002D0006983BC9ABB9ABA9AC498BC9AC398BB9AD1 +:1002E000C298BA9A1BB888E08AB986EA80BD10BC69 +:1002F00089E189B9ECE2F1E085E5C39ABB9A5D9B9F +:10030000FECF8CB9C398BB9A81918111F6CF0F9023 +:10031000DF91CF910895BC9ABB9ABA9AC498BC9ABF +:10032000C398BB9AC298BA9A0895A29AA39AA49A1B +:10033000A59AA69AA79AAA98A29AAB98A39AAC98BB +:10034000A49AAD98A59AAE98A69AAF98A79A089540 +:100350008AE391E00E948B0189E391E00E9495017C +:1003600060E088E391E00E9463010895EE0FFF1FB3 +:0C0370000590F491E02D0994F894FFCF63 +:10037C002323232320426567696E20426F6F7475B7 +:10038C0070202323232323232323232323232323E7 +:10039C002323232323232323232323232323232321 +:1003AC0023232323232323232323230A002320541F +:1003BC00657374204F75747075740A00232053652F +:1003CC007475702054696D65720A002323204F7573 +:1003DC007470757420496E697420446F6E65210ABF +:1003EC00002320536574757020427574746F6E0A07 +:1003FC000023205365747570204144430A00232365 +:10040C00232320456E6420426F6F74757020232364 +:10041C0023232323232323232323232323232323A0 +:10042C002323232323232323232323232323232390 +:10043C002323232323232323230A005561727420AF +:08044C00646F6E65210A0000D7 :00000001FF diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.lss b/USBLaminator/USBLaminator/Debug/USBLaminator.lss index fe58c73..bf54133 100644 --- a/USBLaminator/USBLaminator/Debug/USBLaminator.lss +++ b/USBLaminator/USBLaminator/Debug/USBLaminator.lss @@ -3,33 +3,33 @@ USBLaminator.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 000002d2 00000000 00000000 00000094 2**1 + 0 .text 0000037c 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000060 00800060 000002d2 00000366 2**0 + 1 .data 000000d8 00800060 0000037c 00000410 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .bss 00000003 008000c0 008000c0 000003c6 2**0 + 2 .bss 00000003 00800138 00800138 000004e8 2**0 ALLOC - 3 .stab 000006cc 00000000 00000000 000003c8 2**2 + 3 .stab 000006cc 00000000 00000000 000004e8 2**2 CONTENTS, READONLY, DEBUGGING - 4 .stabstr 00000082 00000000 00000000 00000a94 2**0 + 4 .stabstr 00000082 00000000 00000000 00000bb4 2**0 CONTENTS, READONLY, DEBUGGING - 5 .comment 0000002f 00000000 00000000 00000b16 2**0 + 5 .comment 0000002f 00000000 00000000 00000c36 2**0 CONTENTS, READONLY - 6 .debug_aranges 00000050 00000000 00000000 00000b45 2**0 + 6 .debug_aranges 00000050 00000000 00000000 00000c65 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_info 000030ea 00000000 00000000 00000b95 2**0 + 7 .debug_info 00003a03 00000000 00000000 00000cb5 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_abbrev 000003fb 00000000 00000000 00003c7f 2**0 + 8 .debug_abbrev 000003fb 00000000 00000000 000046b8 2**0 CONTENTS, READONLY, DEBUGGING - 9 .debug_line 000003ef 00000000 00000000 0000407a 2**0 + 9 .debug_line 0000048c 00000000 00000000 00004ab3 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_frame 000000b0 00000000 00000000 0000446c 2**2 + 10 .debug_frame 000000b0 00000000 00000000 00004f40 2**2 CONTENTS, READONLY, DEBUGGING - 11 .debug_str 00001103 00000000 00000000 0000451c 2**0 + 11 .debug_str 00001252 00000000 00000000 00004ff0 2**0 CONTENTS, READONLY, DEBUGGING - 12 .debug_loc 00000301 00000000 00000000 0000561f 2**0 + 12 .debug_loc 0000055f 00000000 00000000 00006242 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_ranges 00000040 00000000 00000000 00005920 2**0 + 13 .debug_ranges 00000040 00000000 00000000 000067a1 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: @@ -41,7 +41,7 @@ Disassembly of section .text: c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> 10: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> 14: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> - 18: 0c 94 fe 00 jmp 0x1fc ; 0x1fc <__vector_6> + 18: 0c 94 51 01 jmp 0x2a2 ; 0x2a2 <__vector_6> 1c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> 20: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> 24: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> @@ -58,7 +58,7 @@ Disassembly of section .text: 50: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> 00000054 <__ctors_start>: - 54: 53 01 movw r10, r6 + 54: a8 01 movw r20, r16 00000056 <__ctors_end>: 56: 11 24 eor r1, r1 @@ -69,29 +69,29 @@ Disassembly of section .text: 60: cd bf out 0x3d, r28 ; 61 00000062 <__do_copy_data>: - 62: 10 e0 ldi r17, 0x00 ; 0 + 62: 11 e0 ldi r17, 0x01 ; 1 64: a0 e6 ldi r26, 0x60 ; 96 66: b0 e0 ldi r27, 0x00 ; 0 - 68: e2 ed ldi r30, 0xD2 ; 210 - 6a: f2 e0 ldi r31, 0x02 ; 2 + 68: ec e7 ldi r30, 0x7C ; 124 + 6a: f3 e0 ldi r31, 0x03 ; 3 6c: 02 c0 rjmp .+4 ; 0x72 <__do_copy_data+0x10> 6e: 05 90 lpm r0, Z+ 70: 0d 92 st X+, r0 - 72: a0 3c cpi r26, 0xC0 ; 192 + 72: a8 33 cpi r26, 0x38 ; 56 74: b1 07 cpc r27, r17 76: d9 f7 brne .-10 ; 0x6e <__do_copy_data+0xc> 00000078 <__do_clear_bss>: - 78: 20 e0 ldi r18, 0x00 ; 0 - 7a: a0 ec ldi r26, 0xC0 ; 192 - 7c: b0 e0 ldi r27, 0x00 ; 0 + 78: 21 e0 ldi r18, 0x01 ; 1 + 7a: a8 e3 ldi r26, 0x38 ; 56 + 7c: b1 e0 ldi r27, 0x01 ; 1 7e: 01 c0 rjmp .+2 ; 0x82 <.do_clear_bss_start> 00000080 <.do_clear_bss_loop>: 80: 1d 92 st X+, r1 00000082 <.do_clear_bss_start>: - 82: a3 3c cpi r26, 0xC3 ; 195 + 82: ab 33 cpi r26, 0x3B ; 59 84: b2 07 cpc r27, r18 86: e1 f7 brne .-8 ; 0x80 <.do_clear_bss_loop> @@ -102,12 +102,12 @@ Disassembly of section .text: 8e: 04 c0 rjmp .+8 ; 0x98 <__do_global_ctors+0x10> 90: 22 97 sbiw r28, 0x02 ; 2 92: fe 01 movw r30, r28 - 94: 0e 94 63 01 call 0x2c6 ; 0x2c6 <__tablejump__> + 94: 0e 94 b8 01 call 0x370 ; 0x370 <__tablejump__> 98: c4 35 cpi r28, 0x54 ; 84 9a: d1 07 cpc r29, r17 9c: c9 f7 brne .-14 ; 0x90 <__do_global_ctors+0x8> - 9e: 0e 94 fb 00 call 0x1f6 ; 0x1f6
- a2: 0c 94 67 01 jmp 0x2ce ; 0x2ce <_exit> + 9e: 0e 94 4e 01 call 0x29c ; 0x29c
+ a2: 0c 94 bc 01 jmp 0x378 ; 0x378 <_exit> 000000a6 <__bad_interrupt>: a6: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> @@ -222,7 +222,7 @@ namespace avrlib { ca: f0 e0 ldi r31, 0x00 ; 0 init(); this->led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } void send(const char *text) { while (*text) @@ -241,8 +241,8 @@ namespace avrlib { static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } d0: bb 9a sbi 0x17, 3 ; 23 - UCSRB = /*(1<led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } void send(const char *text) { while (*text) dc: 81 91 ld r24, Z+ de: 81 11 cpse r24, r1 e0: f6 cf rjmp .-20 ; 0xce <_Z5setupv+0x24> + e2: ee e9 ldi r30, 0x9E ; 158 + e4: f0 e0 ldi r31, 0x00 ; 0 + e6: 83 e2 ldi r24, 0x23 ; 35 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + e8: c3 9a sbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + ea: bb 9a sbi 0x17, 3 ; 23 + UBRRH = 0; + UBRRL = (F_CPU / (baudrate * 16L) - 1); + } + uint8_t uart_putchar(uint8_t c) { + led.on(led.YELLOW); + loop_until_bit_is_set(UCSRA, UDRE); //Ausgabe des Zeichens + ec: 5d 9b sbis 0x0b, 5 ; 11 + ee: fe cf rjmp .-4 ; 0xec <_Z5setupv+0x42> + UDR = c; + f0: 8c b9 out 0x0c, r24 ; 12 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + f2: c3 98 cbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + f4: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + f6: 81 91 ld r24, Z+ + f8: 81 11 cpse r24, r1 + fa: f6 cf rjmp .-20 ; 0xe8 <_Z5setupv+0x3e> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - e2: aa 98 cbi 0x15, 2 ; 21 + fc: aa 98 cbi 0x15, 2 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - e4: a2 9a sbi 0x14, 2 ; 20 + fe: a2 9a sbi 0x14, 2 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - e6: ab 98 cbi 0x15, 3 ; 21 + 100: ab 98 cbi 0x15, 3 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - e8: a3 9a sbi 0x14, 3 ; 20 + 102: a3 9a sbi 0x14, 3 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - ea: ac 98 cbi 0x15, 4 ; 21 + 104: ac 98 cbi 0x15, 4 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - ec: a4 9a sbi 0x14, 4 ; 20 + 106: a4 9a sbi 0x14, 4 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - ee: ad 98 cbi 0x15, 5 ; 21 + 108: ad 98 cbi 0x15, 5 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - f0: a5 9a sbi 0x14, 5 ; 20 + 10a: a5 9a sbi 0x14, 5 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - f2: ae 98 cbi 0x15, 6 ; 21 + 10c: ae 98 cbi 0x15, 6 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - f4: a6 9a sbi 0x14, 6 ; 20 + 10e: a6 9a sbi 0x14, 6 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - f6: af 98 cbi 0x15, 7 ; 21 + 110: af 98 cbi 0x15, 7 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - f8: a7 9a sbi 0x14, 7 ; 20 - fa: 20 e0 ldi r18, 0x00 ; 0 - fc: 30 e0 ldi r19, 0x00 ; 0 + 112: a7 9a sbi 0x14, 7 ; 20 + 114: 20 e0 ldi r18, 0x00 ; 0 + 116: 30 e0 ldi r19, 0x00 ; 0 } } void test() { off(); for (uint8_t i=0;i<6;i++) { on((1< - 108: 88 0f add r24, r24 - 10a: 99 1f adc r25, r25 - 10c: 0a 94 dec r0 - 10e: e2 f7 brpl .-8 ; 0x108 <_Z5setupv+0x5e> + 118: 41 e0 ldi r20, 0x01 ; 1 + 11a: 50 e0 ldi r21, 0x00 ; 0 + 11c: ca 01 movw r24, r20 + 11e: 02 2e mov r0, r18 + 120: 02 c0 rjmp .+4 ; 0x126 <_Z5setupv+0x7c> + 122: 88 0f add r24, r24 + 124: 99 1f adc r25, r25 + 126: 0a 94 dec r0 + 128: e2 f7 brpl .-8 ; 0x122 <_Z5setupv+0x78> if(ausg & OUT6) { out6::make_low(); } } void on(uint8_t ausg = 255) { if(ausg & OUT1) { - 110: a8 2f mov r26, r24 - 112: a1 70 andi r26, 0x01 ; 1 - 114: 80 ff sbrs r24, 0 - 116: 02 c0 rjmp .+4 ; 0x11c <_Z5setupv+0x72> + 12a: a8 2f mov r26, r24 + 12c: a1 70 andi r26, 0x01 ; 1 + 12e: 80 ff sbrs r24, 0 + 130: 02 c0 rjmp .+4 ; 0x136 <_Z5setupv+0x8c> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 118: aa 9a sbi 0x15, 2 ; 21 + 132: aa 9a sbi 0x15, 2 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 11a: a2 9a sbi 0x14, 2 ; 20 + 134: a2 9a sbi 0x14, 2 ; 20 out1::make_high(); } if(ausg & OUT2) { - 11c: f8 2f mov r31, r24 - 11e: f2 70 andi r31, 0x02 ; 2 - 120: 81 ff sbrs r24, 1 - 122: 02 c0 rjmp .+4 ; 0x128 <_Z5setupv+0x7e> + 136: f8 2f mov r31, r24 + 138: f2 70 andi r31, 0x02 ; 2 + 13a: 81 ff sbrs r24, 1 + 13c: 02 c0 rjmp .+4 ; 0x142 <_Z5setupv+0x98> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 124: ab 9a sbi 0x15, 3 ; 21 + 13e: ab 9a sbi 0x15, 3 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 126: a3 9a sbi 0x14, 3 ; 20 + 140: a3 9a sbi 0x14, 3 ; 20 out2::make_high(); } if(ausg & OUT3) { - 128: e8 2f mov r30, r24 - 12a: e4 70 andi r30, 0x04 ; 4 - 12c: 82 ff sbrs r24, 2 - 12e: 02 c0 rjmp .+4 ; 0x134 <_Z5setupv+0x8a> + 142: e8 2f mov r30, r24 + 144: e4 70 andi r30, 0x04 ; 4 + 146: 82 ff sbrs r24, 2 + 148: 02 c0 rjmp .+4 ; 0x14e <_Z5setupv+0xa4> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 130: ac 9a sbi 0x15, 4 ; 21 + 14a: ac 9a sbi 0x15, 4 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 132: a4 9a sbi 0x14, 4 ; 20 + 14c: a4 9a sbi 0x14, 4 ; 20 out3::make_high(); } if(ausg & OUT4) { - 134: 78 2f mov r23, r24 - 136: 78 70 andi r23, 0x08 ; 8 - 138: 83 ff sbrs r24, 3 - 13a: 02 c0 rjmp .+4 ; 0x140 <_Z5setupv+0x96> + 14e: 78 2f mov r23, r24 + 150: 78 70 andi r23, 0x08 ; 8 + 152: 83 ff sbrs r24, 3 + 154: 02 c0 rjmp .+4 ; 0x15a <_Z5setupv+0xb0> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 13c: ad 9a sbi 0x15, 5 ; 21 + 156: ad 9a sbi 0x15, 5 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 13e: a5 9a sbi 0x14, 5 ; 20 + 158: a5 9a sbi 0x14, 5 ; 20 out4::make_high(); } if(ausg & OUT5) { - 140: 68 2f mov r22, r24 - 142: 60 71 andi r22, 0x10 ; 16 - 144: 84 ff sbrs r24, 4 - 146: 02 c0 rjmp .+4 ; 0x14c <_Z5setupv+0xa2> + 15a: 68 2f mov r22, r24 + 15c: 60 71 andi r22, 0x10 ; 16 + 15e: 84 ff sbrs r24, 4 + 160: 02 c0 rjmp .+4 ; 0x166 <_Z5setupv+0xbc> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 148: ae 9a sbi 0x15, 6 ; 21 + 162: ae 9a sbi 0x15, 6 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 14a: a6 9a sbi 0x14, 6 ; 20 + 164: a6 9a sbi 0x14, 6 ; 20 out5::make_high(); } if(ausg & OUT6) { - 14c: 98 2f mov r25, r24 - 14e: 90 72 andi r25, 0x20 ; 32 - 150: 85 ff sbrs r24, 5 - 152: 02 c0 rjmp .+4 ; 0x158 <_Z5setupv+0xae> + 166: 98 2f mov r25, r24 + 168: 90 72 andi r25, 0x20 ; 32 + 16a: 85 ff sbrs r24, 5 + 16c: 02 c0 rjmp .+4 ; 0x172 <_Z5setupv+0xc8> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 154: af 9a sbi 0x15, 7 ; 21 + 16e: af 9a sbi 0x15, 7 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 156: a7 9a sbi 0x14, 7 ; 20 + 170: a7 9a sbi 0x14, 7 ; 20 #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); - 158: 8f e7 ldi r24, 0x7F ; 127 - 15a: ba e1 ldi r27, 0x1A ; 26 - 15c: c6 e0 ldi r28, 0x06 ; 6 - 15e: 81 50 subi r24, 0x01 ; 1 - 160: b0 40 sbci r27, 0x00 ; 0 - 162: c0 40 sbci r28, 0x00 ; 0 - 164: e1 f7 brne .-8 ; 0x15e <_Z5setupv+0xb4> - 166: 00 c0 rjmp .+0 ; 0x168 <_Z5setupv+0xbe> - 168: 00 00 nop + 172: 8f ef ldi r24, 0xFF ; 255 + 174: b1 ee ldi r27, 0xE1 ; 225 + 176: c4 e0 ldi r28, 0x04 ; 4 + 178: 81 50 subi r24, 0x01 ; 1 + 17a: b0 40 sbci r27, 0x00 ; 0 + 17c: c0 40 sbci r28, 0x00 ; 0 + 17e: e1 f7 brne .-8 ; 0x178 <_Z5setupv+0xce> + 180: 00 c0 rjmp .+0 ; 0x182 <_Z5setupv+0xd8> + 182: 00 00 nop public: SSR() { init(); } void off(uint8_t ausg = 255) { if(ausg & OUT1) { - 16a: aa 23 and r26, r26 - 16c: 11 f0 breq .+4 ; 0x172 <_Z5setupv+0xc8> + 184: aa 23 and r26, r26 + 186: 11 f0 breq .+4 ; 0x18c <_Z5setupv+0xe2> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 16e: aa 98 cbi 0x15, 2 ; 21 + 188: aa 98 cbi 0x15, 2 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 170: a2 9a sbi 0x14, 2 ; 20 + 18a: a2 9a sbi 0x14, 2 ; 20 out1::make_low(); } if(ausg & OUT2) { - 172: ff 23 and r31, r31 - 174: 11 f0 breq .+4 ; 0x17a <_Z5setupv+0xd0> + 18c: ff 23 and r31, r31 + 18e: 11 f0 breq .+4 ; 0x194 <_Z5setupv+0xea> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 176: ab 98 cbi 0x15, 3 ; 21 + 190: ab 98 cbi 0x15, 3 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 178: a3 9a sbi 0x14, 3 ; 20 + 192: a3 9a sbi 0x14, 3 ; 20 out2::make_low(); } if(ausg & OUT3) { - 17a: ee 23 and r30, r30 - 17c: 11 f0 breq .+4 ; 0x182 <_Z5setupv+0xd8> + 194: ee 23 and r30, r30 + 196: 11 f0 breq .+4 ; 0x19c <_Z5setupv+0xf2> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 17e: ac 98 cbi 0x15, 4 ; 21 + 198: ac 98 cbi 0x15, 4 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 180: a4 9a sbi 0x14, 4 ; 20 + 19a: a4 9a sbi 0x14, 4 ; 20 out3::make_low(); } if(ausg & OUT4) { - 182: 77 23 and r23, r23 - 184: 11 f0 breq .+4 ; 0x18a <_Z5setupv+0xe0> + 19c: 77 23 and r23, r23 + 19e: 11 f0 breq .+4 ; 0x1a4 <_Z5setupv+0xfa> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 186: ad 98 cbi 0x15, 5 ; 21 + 1a0: ad 98 cbi 0x15, 5 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 188: a5 9a sbi 0x14, 5 ; 20 + 1a2: a5 9a sbi 0x14, 5 ; 20 out4::make_low(); } if(ausg & OUT5) { - 18a: 66 23 and r22, r22 - 18c: 11 f0 breq .+4 ; 0x192 <_Z5setupv+0xe8> + 1a4: 66 23 and r22, r22 + 1a6: 11 f0 breq .+4 ; 0x1ac <_Z5setupv+0x102> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 18e: ae 98 cbi 0x15, 6 ; 21 + 1a8: ae 98 cbi 0x15, 6 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 190: a6 9a sbi 0x14, 6 ; 20 + 1aa: a6 9a sbi 0x14, 6 ; 20 out5::make_low(); } if(ausg & OUT6) { - 192: 99 23 and r25, r25 - 194: 11 f0 breq .+4 ; 0x19a <_Z5setupv+0xf0> + 1ac: 99 23 and r25, r25 + 1ae: 11 f0 breq .+4 ; 0x1b4 <_Z5setupv+0x10a> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 196: af 98 cbi 0x15, 7 ; 21 + 1b0: af 98 cbi 0x15, 7 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 198: a7 9a sbi 0x14, 7 ; 20 - 19a: 2f 5f subi r18, 0xFF ; 255 - 19c: 3f 4f sbci r19, 0xFF ; 255 + 1b2: a7 9a sbi 0x14, 7 ; 20 + 1b4: 2f 5f subi r18, 0xFF ; 255 + 1b6: 3f 4f sbci r19, 0xFF ; 255 out6::toggle(); } } void test() { off(); for (uint8_t i=0;i<6;i++) { - 19e: 26 30 cpi r18, 0x06 ; 6 - 1a0: 31 05 cpc r19, r1 - 1a2: 09 f0 breq .+2 ; 0x1a6 <_Z5setupv+0xfc> - 1a4: ae cf rjmp .-164 ; 0x102 <_Z5setupv+0x58> + 1b8: 26 30 cpi r18, 0x06 ; 6 + 1ba: 31 05 cpc r19, r1 + 1bc: 09 f0 breq .+2 ; 0x1c0 <_Z5setupv+0x116> + 1be: ae cf rjmp .-164 ; 0x11c <_Z5setupv+0x72> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1a6: aa 98 cbi 0x15, 2 ; 21 + 1c0: aa 98 cbi 0x15, 2 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1a8: a2 9a sbi 0x14, 2 ; 20 + 1c2: a2 9a sbi 0x14, 2 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1aa: ab 98 cbi 0x15, 3 ; 21 + 1c4: ab 98 cbi 0x15, 3 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1ac: a3 9a sbi 0x14, 3 ; 20 + 1c6: a3 9a sbi 0x14, 3 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1ae: ac 98 cbi 0x15, 4 ; 21 + 1c8: ac 98 cbi 0x15, 4 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1b0: a4 9a sbi 0x14, 4 ; 20 + 1ca: a4 9a sbi 0x14, 4 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1b2: ad 98 cbi 0x15, 5 ; 21 + 1cc: ad 98 cbi 0x15, 5 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1b4: a5 9a sbi 0x14, 5 ; 20 + 1ce: a5 9a sbi 0x14, 5 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1b6: ae 98 cbi 0x15, 6 ; 21 + 1d0: ae 98 cbi 0x15, 6 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1b8: a6 9a sbi 0x14, 6 ; 20 + 1d2: a6 9a sbi 0x14, 6 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 1ba: af 98 cbi 0x15, 7 ; 21 + 1d4: af 98 cbi 0x15, 7 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 1bc: a7 9a sbi 0x14, 7 ; 20 + 1d6: a7 9a sbi 0x14, 7 ; 20 + 1d8: ed ea ldi r30, 0xAD ; 173 + 1da: f0 e0 ldi r31, 0x00 ; 0 + 1dc: 83 e2 ldi r24, 0x23 ; 35 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 1de: c3 9a sbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 1e0: bb 9a sbi 0x17, 3 ; 23 + UBRRH = 0; + UBRRL = (F_CPU / (baudrate * 16L) - 1); + } + uint8_t uart_putchar(uint8_t c) { + led.on(led.YELLOW); + loop_until_bit_is_set(UCSRA, UDRE); //Ausgabe des Zeichens + 1e2: 5d 9b sbis 0x0b, 5 ; 11 + 1e4: fe cf rjmp .-4 ; 0x1e2 <_Z5setupv+0x138> + UDR = c; + 1e6: 8c b9 out 0x0c, r24 ; 12 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 1e8: c3 98 cbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 1ea: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + 1ec: 81 91 ld r24, Z+ + 1ee: 81 11 cpse r24, r1 + 1f0: f6 cf rjmp .-20 ; 0x1de <_Z5setupv+0x134> // Timer Period: 0,1 s // Timer1 Overflow Interrupt: Off // Input Capture Interrupt: Off // Compare A Match Interrupt: On // Compare B Match Interrupt: Off TCCR1A = 0; - 1be: 1f bc out 0x2f, r1 ; 47 + 1f2: 1f bc out 0x2f, r1 ; 47 TCCR1B |= (1< + UDR = c; + 224: 8c b9 out 0x0c, r24 ; 12 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 1e6: c3 9a sbi 0x18, 3 ; 24 + 226: c3 98 cbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 1e8: bb 9a sbi 0x17, 3 ; 23 + 228: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + 22a: 81 91 ld r24, Z+ + 22c: 81 11 cpse r24, r1 + 22e: f6 cf rjmp .-20 ; 0x21c <_Z5setupv+0x172> + 230: 25 c0 rjmp .+74 ; 0x27c <_Z5setupv+0x1d2> namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 1ea: c3 98 cbi 0x18, 3 ; 24 + 232: c3 9a sbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 1ec: bb 9a sbi 0x17, 3 ; 23 + 234: bb 9a sbi 0x17, 3 ; 23 + UBRRH = 0; + UBRRL = (F_CPU / (baudrate * 16L) - 1); + } + uint8_t uart_putchar(uint8_t c) { + led.on(led.YELLOW); + loop_until_bit_is_set(UCSRA, UDRE); //Ausgabe des Zeichens + 236: 5d 9b sbis 0x0b, 5 ; 11 + 238: fe cf rjmp .-4 ; 0x236 <_Z5setupv+0x18c> + UDR = c; + 23a: 8c b9 out 0x0c, r24 ; 12 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 1ee: c2 9a sbi 0x18, 2 ; 24 + 23c: c3 98 cbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 1f0: ba 9a sbi 0x17, 2 ; 23 - l.on(l.YELLOW); - //adc on + 23e: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + 240: 81 91 ld r24, Z+ + 242: 81 11 cpse r24, r1 + 244: f6 cf rjmp .-20 ; 0x232 <_Z5setupv+0x188> + 246: e2 ed ldi r30, 0xD2 ; 210 + 248: f0 e0 ldi r31, 0x00 ; 0 + 24a: 83 e2 ldi r24, 0x23 ; 35 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 24c: c3 9a sbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 24e: bb 9a sbi 0x17, 3 ; 23 + UBRRH = 0; + UBRRL = (F_CPU / (baudrate * 16L) - 1); + } + uint8_t uart_putchar(uint8_t c) { + led.on(led.YELLOW); + loop_until_bit_is_set(UCSRA, UDRE); //Ausgabe des Zeichens + 250: 5d 9b sbis 0x0b, 5 ; 11 + 252: fe cf rjmp .-4 ; 0x250 <_Z5setupv+0x1a6> + UDR = c; + 254: 8c b9 out 0x0c, r24 ; 12 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 256: c3 98 cbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 258: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + 25a: 81 91 ld r24, Z+ + 25c: 81 11 cpse r24, r1 + 25e: f6 cf rjmp .-20 ; 0x24c <_Z5setupv+0x1a2> + 260: 15 c0 rjmp .+42 ; 0x28c <_Z5setupv+0x1e2> +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 262: c3 9a sbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 264: bb 9a sbi 0x17, 3 ; 23 + UBRRH = 0; + UBRRL = (F_CPU / (baudrate * 16L) - 1); + } + uint8_t uart_putchar(uint8_t c) { + led.on(led.YELLOW); + loop_until_bit_is_set(UCSRA, UDRE); //Ausgabe des Zeichens + 266: 5d 9b sbis 0x0b, 5 ; 11 + 268: fe cf rjmp .-4 ; 0x266 <_Z5setupv+0x1bc> + UDR = c; + 26a: 8c b9 out 0x0c, r24 ; 12 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 26c: c3 98 cbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 26e: bb 9a sbi 0x17, 3 ; 23 + init(); + this->led = l; + send("Uart done!\n"); + } + void send(const char *text) { + while (*text) + 270: 81 91 ld r24, Z+ + 272: 81 11 cpse r24, r1 + 274: f6 cf rjmp .-20 ; 0x262 <_Z5setupv+0x1b8> +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 276: c2 9a sbi 0x18, 2 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 278: ba 9a sbi 0x17, 2 ; 23 + 27a: 0e c0 rjmp .+28 ; 0x298 <_Z5setupv+0x1ee> +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 27c: c4 98 cbi 0x18, 4 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 27e: bc 9a sbi 0x17, 4 ; 23 +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 280: c3 9a sbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 282: bb 9a sbi 0x17, 3 ; 23 + 284: e2 ee ldi r30, 0xE2 ; 226 + 286: f0 e0 ldi r31, 0x00 ; 0 + 288: 83 e2 ldi r24, 0x23 ; 35 + 28a: d3 cf rjmp .-90 ; 0x232 <_Z5setupv+0x188> +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + 28c: c3 98 cbi 0x18, 3 ; 24 + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + 28e: bb 9a sbi 0x17, 3 ; 23 + 290: ef ee ldi r30, 0xEF ; 239 + 292: f0 e0 ldi r31, 0x00 ; 0 + 294: 83 e2 ldi r24, 0x23 ; 35 + 296: e5 cf rjmp .-54 ; 0x262 <_Z5setupv+0x1b8> + r.send("# Setup Button\n"); //button on l.off(l.YELLOW); + r.send("#### End Bootup ###########################################\n"); l.on(l.GREEN); } - 1f2: cf 91 pop r28 - 1f4: 08 95 ret + 298: cf 91 pop r28 + 29a: 08 95 ret -000001f6
: +0000029c
: int main(void) { setup(); - 1f6: 0e 94 55 00 call 0xaa ; 0xaa <_Z5setupv> - 1fa: ff cf rjmp .-2 ; 0x1fa + 29c: 0e 94 55 00 call 0xaa ; 0xaa <_Z5setupv> + 2a0: ff cf rjmp .-2 ; 0x2a0 -000001fc <__vector_6>: - while(1) +000002a2 <__vector_6>: { + } } ISR(TIMER1_COMPA_vect) { - 1fc: 1f 92 push r1 - 1fe: 0f 92 push r0 - 200: 0f b6 in r0, 0x3f ; 63 - 202: 0f 92 push r0 - 204: 11 24 eor r1, r1 - 206: 8f 93 push r24 - 208: 9f 93 push r25 + 2a2: 1f 92 push r1 + 2a4: 0f 92 push r0 + 2a6: 0f b6 in r0, 0x3f ; 63 + 2a8: 0f 92 push r0 + 2aa: 11 24 eor r1, r1 + 2ac: 8f 93 push r24 + 2ae: 9f 93 push r25 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } - 20a: 95 b3 in r25, 0x15 ; 21 + 2b0: 95 b3 in r25, 0x15 ; 21 Port::port(Port::port() & ~(1<: +000002c6 <_ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC1E3LedINS0_5portbELi4ELi3ELi2EE>: #define USART_H_ -template +template class Usart { public: Usart(ledclass l) { - 220: cf 93 push r28 - 222: df 93 push r29 - 224: 1f 92 push r1 - 226: cd b7 in r28, 0x3d ; 61 - 228: de b7 in r29, 0x3e ; 62 - 22a: 69 83 std Y+1, r22 ; 0x01 - 22c: bc 9a sbi 0x17, 4 ; 23 - 22e: bb 9a sbi 0x17, 3 ; 23 - 230: ba 9a sbi 0x17, 2 ; 23 + 2c6: cf 93 push r28 + 2c8: df 93 push r29 + 2ca: 1f 92 push r1 + 2cc: cd b7 in r28, 0x3d ; 61 + 2ce: de b7 in r29, 0x3e ; 62 + 2d0: 69 83 std Y+1, r22 ; 0x01 + 2d2: bc 9a sbi 0x17, 4 ; 23 + 2d4: bb 9a sbi 0x17, 3 ; 23 + 2d6: ba 9a sbi 0x17, 2 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 232: c4 98 cbi 0x18, 4 ; 24 + 2d8: c4 98 cbi 0x18, 4 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 234: bc 9a sbi 0x17, 4 ; 23 + 2da: bc 9a sbi 0x17, 4 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 236: c3 98 cbi 0x18, 3 ; 24 + 2dc: c3 98 cbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 238: bb 9a sbi 0x17, 3 ; 23 + 2de: bb 9a sbi 0x17, 3 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 23a: c2 98 cbi 0x18, 2 ; 24 + 2e0: c2 98 cbi 0x18, 2 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 23c: ba 9a sbi 0x17, 2 ; 23 - void send(uint8_t wert) { - uart_putchar(wert); - } + 2e2: ba 9a sbi 0x17, 2 ; 23 private: void init() { - UBRRL = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt - 23e: 81 e8 ldi r24, 0x81 ; 129 - 240: 89 b9 out 0x09, r24 ; 9 - UCSRB = /*(1<led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } void send(const char *text) { while (*text) - 24e: 85 e5 ldi r24, 0x55 ; 85 + 2f8: 85 e5 ldi r24, 0x55 ; 85 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 250: c3 9a sbi 0x18, 3 ; 24 + 2fa: c3 9a sbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 252: bb 9a sbi 0x17, 3 ; 23 - UCSRB = /*(1< + 2fe: 5d 9b sbis 0x0b, 5 ; 11 + 300: fe cf rjmp .-4 ; 0x2fe <_ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC1E3LedINS0_5portbELi4ELi3ELi2EE+0x38> UDR = c; - 258: 8c b9 out 0x0c, r24 ; 12 + 302: 8c b9 out 0x0c, r24 ; 12 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 25a: c3 98 cbi 0x18, 3 ; 24 + 304: c3 98 cbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 25c: bb 9a sbi 0x17, 3 ; 23 + 306: bb 9a sbi 0x17, 3 ; 23 init(); this->led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } void send(const char *text) { while (*text) - 25e: 81 91 ld r24, Z+ - 260: 81 11 cpse r24, r1 - 262: f6 cf rjmp .-20 ; 0x250 <_ZN5UsartILm9600EEC1E3LedIN6avrlib5portbELi4ELi3ELi2EE+0x30> + 308: 81 91 ld r24, Z+ + 30a: 81 11 cpse r24, r1 + 30c: f6 cf rjmp .-20 ; 0x2fa <_ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC1E3LedINS0_5portbELi4ELi3ELi2EE+0x34> public: Usart(ledclass l) { init(); this->led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } - 264: 0f 90 pop r0 - 266: df 91 pop r29 - 268: cf 91 pop r28 - 26a: 08 95 ret + 30e: 0f 90 pop r0 + 310: df 91 pop r29 + 312: cf 91 pop r28 + 314: 08 95 ret -0000026c <_ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv>: - 26c: bc 9a sbi 0x17, 4 ; 23 - 26e: bb 9a sbi 0x17, 3 ; 23 - 270: ba 9a sbi 0x17, 2 ; 23 +00000316 <_ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv>: + 316: bc 9a sbi 0x17, 4 ; 23 + 318: bb 9a sbi 0x17, 3 ; 23 + 31a: ba 9a sbi 0x17, 2 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 272: c4 98 cbi 0x18, 4 ; 24 + 31c: c4 98 cbi 0x18, 4 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 274: bc 9a sbi 0x17, 4 ; 23 + 31e: bc 9a sbi 0x17, 4 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 276: c3 98 cbi 0x18, 3 ; 24 + 320: c3 98 cbi 0x18, 3 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 278: bb 9a sbi 0x17, 3 ; 23 + 322: bb 9a sbi 0x17, 3 ; 23 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } - 27a: c2 98 cbi 0x18, 2 ; 24 + 324: c2 98 cbi 0x18, 2 ; 24 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } - 27c: ba 9a sbi 0x17, 2 ; 23 - 27e: 08 95 ret + 326: ba 9a sbi 0x17, 2 ; 23 + 328: 08 95 ret -00000280 <_ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv>: +0000032a <_ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv>: static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 280: a2 9a sbi 0x14, 2 ; 20 - 282: a3 9a sbi 0x14, 3 ; 20 - 284: a4 9a sbi 0x14, 4 ; 20 - 286: a5 9a sbi 0x14, 5 ; 20 - 288: a6 9a sbi 0x14, 6 ; 20 - 28a: a7 9a sbi 0x14, 7 ; 20 + 32a: a2 9a sbi 0x14, 2 ; 20 + 32c: a3 9a sbi 0x14, 3 ; 20 + 32e: a4 9a sbi 0x14, 4 ; 20 + 330: a5 9a sbi 0x14, 5 ; 20 + 332: a6 9a sbi 0x14, 6 ; 20 + 334: a7 9a sbi 0x14, 7 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 28c: aa 98 cbi 0x15, 2 ; 21 + 336: aa 98 cbi 0x15, 2 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 28e: a2 9a sbi 0x14, 2 ; 20 + 338: a2 9a sbi 0x14, 2 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 290: ab 98 cbi 0x15, 3 ; 21 + 33a: ab 98 cbi 0x15, 3 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 292: a3 9a sbi 0x14, 3 ; 20 + 33c: a3 9a sbi 0x14, 3 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 294: ac 98 cbi 0x15, 4 ; 21 + 33e: ac 98 cbi 0x15, 4 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 296: a4 9a sbi 0x14, 4 ; 20 + 340: a4 9a sbi 0x14, 4 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 298: ad 98 cbi 0x15, 5 ; 21 + 342: ad 98 cbi 0x15, 5 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 29a: a5 9a sbi 0x14, 5 ; 20 + 344: a5 9a sbi 0x14, 5 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 29c: ae 98 cbi 0x15, 6 ; 21 + 346: ae 98 cbi 0x15, 6 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 29e: a6 9a sbi 0x14, 6 ; 20 + 348: a6 9a sbi 0x14, 6 ; 20 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } - 2a0: af 98 cbi 0x15, 7 ; 21 + 34a: af 98 cbi 0x15, 7 ; 21 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } - 2a2: a7 9a sbi 0x14, 7 ; 20 - 2a4: 08 95 ret + 34c: a7 9a sbi 0x14, 7 ; 20 + 34e: 08 95 ret -000002a6 <_GLOBAL__sub_I_l>: +00000350 <_GLOBAL__sub_I_l>: template class Led { public: Led() { init(); - 2a6: 82 ec ldi r24, 0xC2 ; 194 - 2a8: 90 e0 ldi r25, 0x00 ; 0 - 2aa: 0e 94 36 01 call 0x26c ; 0x26c <_ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv> + 350: 8a e3 ldi r24, 0x3A ; 58 + 352: 91 e0 ldi r25, 0x01 ; 1 + 354: 0e 94 8b 01 call 0x316 ; 0x316 <_ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv> template class SSR { public: SSR() { init(); - 2ae: 81 ec ldi r24, 0xC1 ; 193 - 2b0: 90 e0 ldi r25, 0x00 ; 0 - 2b2: 0e 94 40 01 call 0x280 ; 0x280 <_ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv> + 358: 89 e3 ldi r24, 0x39 ; 57 + 35a: 91 e0 ldi r25, 0x01 ; 1 + 35c: 0e 94 95 01 call 0x32a ; 0x32a <_ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv> #include "peripheral.h" ledclass l; ssrclass o; usartclass r(l); - 2b6: 60 e0 ldi r22, 0x00 ; 0 - 2b8: 80 ec ldi r24, 0xC0 ; 192 - 2ba: 90 e0 ldi r25, 0x00 ; 0 - 2bc: 0e 94 10 01 call 0x220 ; 0x220 <_ZN5UsartILm9600EEC1E3LedIN6avrlib5portbELi4ELi3ELi2EE> - 2c0: 08 95 ret + 360: 60 e0 ldi r22, 0x00 ; 0 + 362: 88 e3 ldi r24, 0x38 ; 56 + 364: 91 e0 ldi r25, 0x01 ; 1 + 366: 0e 94 63 01 call 0x2c6 ; 0x2c6 <_ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC1E3LedINS0_5portbELi4ELi3ELi2EE> + 36a: 08 95 ret -000002c2 <__tablejump2__>: - 2c2: ee 0f add r30, r30 - 2c4: ff 1f adc r31, r31 +0000036c <__tablejump2__>: + 36c: ee 0f add r30, r30 + 36e: ff 1f adc r31, r31 -000002c6 <__tablejump__>: - 2c6: 05 90 lpm r0, Z+ - 2c8: f4 91 lpm r31, Z - 2ca: e0 2d mov r30, r0 - 2cc: 09 94 ijmp +00000370 <__tablejump__>: + 370: 05 90 lpm r0, Z+ + 372: f4 91 lpm r31, Z + 374: e0 2d mov r30, r0 + 376: 09 94 ijmp -000002ce <_exit>: - 2ce: f8 94 cli +00000378 <_exit>: + 378: f8 94 cli -000002d0 <__stop_program>: - 2d0: ff cf rjmp .-2 ; 0x2d0 <__stop_program> +0000037a <__stop_program>: + 37a: ff cf rjmp .-2 ; 0x37a <__stop_program> diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.map b/USBLaminator/USBLaminator/Debug/USBLaminator.map index 1fda899..49a63da 100644 --- a/USBLaminator/USBLaminator/Debug/USBLaminator.map +++ b/USBLaminator/USBLaminator/Debug/USBLaminator.map @@ -198,7 +198,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .rela.plt *(.rela.plt) -.text 0x00000000 0x2d2 +.text 0x00000000 0x37c *(.vectors) .vectors 0x00000000 0x54 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/avr5/crtm16a.o 0x00000000 __vector_default @@ -280,33 +280,33 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 0x000000aa . = ALIGN (0x2) *(.text.*) .text._Z5setupv - 0x000000aa 0x14c USBLaminator.o + 0x000000aa 0x1f2 USBLaminator.o 0x000000aa _Z5setupv - .text.main 0x000001f6 0x6 USBLaminator.o - 0x000001f6 main + .text.main 0x0000029c 0x6 USBLaminator.o + 0x0000029c main .text.__vector_6 - 0x000001fc 0x24 USBLaminator.o - 0x000001fc __vector_6 - .text._ZN5UsartILm9600EEC2E3LedIN6avrlib5portbELi4ELi3ELi2EE - 0x00000220 0x4c USBLaminator.o - 0x00000220 _ZN5UsartILm9600EEC2E3LedIN6avrlib5portbELi4ELi3ELi2EE - 0x00000220 _ZN5UsartILm9600EEC1E3LedIN6avrlib5portbELi4ELi3ELi2EE + 0x000002a2 0x24 USBLaminator.o + 0x000002a2 __vector_6 + .text._ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC2E3LedINS0_5portbELi4ELi3ELi2EE + 0x000002c6 0x50 USBLaminator.o + 0x000002c6 _ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC1E3LedINS0_5portbELi4ELi3ELi2EE + 0x000002c6 _ZN5UsartILm38400EN6avrlib5portdELi5ELi4ELi3EEC2E3LedINS0_5portbELi4ELi3ELi2EE .text._ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv - 0x0000026c 0x14 USBLaminator.o - 0x0000026c _ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv + 0x00000316 0x14 USBLaminator.o + 0x00000316 _ZN3LedIN6avrlib5portbELi4ELi3ELi2EE4initEv .text._ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv - 0x00000280 0x26 USBLaminator.o - 0x00000280 _ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv + 0x0000032a 0x26 USBLaminator.o + 0x0000032a _ZN3SSRIN6avrlib5portcELi2ELi3ELi4ELi5ELi6ELi7EE4initEv .text._GLOBAL__sub_I_l - 0x000002a6 0x1c USBLaminator.o - .text.libgcc 0x000002c2 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) - 0x000002c2 __tablejump2__ - 0x000002c6 __tablejump__ - 0x000002ce . = ALIGN (0x2) + 0x00000350 0x1c USBLaminator.o + .text.libgcc 0x0000036c 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + 0x0000036c __tablejump2__ + 0x00000370 __tablejump__ + 0x00000378 . = ALIGN (0x2) *(.fini9) - .fini9 0x000002ce 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/avr5\libgcc.a(_exit.o) - 0x000002ce _exit - 0x000002ce exit + .fini9 0x00000378 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/avr5\libgcc.a(_exit.o) + 0x00000378 _exit + 0x00000378 exit *(.fini9) *(.fini8) *(.fini8) @@ -325,11 +325,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.fini1) *(.fini1) *(.fini0) - .fini0 0x000002ce 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/avr5\libgcc.a(_exit.o) + .fini0 0x00000378 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/avr5\libgcc.a(_exit.o) *(.fini0) - 0x000002d2 _etext = . + 0x0000037c _etext = . -.data 0x00800060 0x60 load address 0x000002d2 +.data 0x00800060 0xd8 load address 0x0000037c 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/avr5/crtm16a.o @@ -343,32 +343,32 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 *(.rodata) *(.rodata*) .rodata.str1.1 - 0x00800060 0x5f USBLaminator.o + 0x00800060 0xd7 USBLaminator.o *(.gnu.linkonce.d*) - 0x008000c0 . = ALIGN (0x2) - *fill* 0x008000bf 0x1 - 0x008000c0 _edata = . - 0x008000c0 PROVIDE (__data_end, .) + 0x00800138 . = ALIGN (0x2) + *fill* 0x00800137 0x1 + 0x00800138 _edata = . + 0x00800138 PROVIDE (__data_end, .) -.bss 0x008000c0 0x3 - 0x008000c0 PROVIDE (__bss_start, .) +.bss 0x00800138 0x3 + 0x00800138 PROVIDE (__bss_start, .) *(.bss) - .bss 0x008000c0 0x3 USBLaminator.o - 0x008000c0 r - 0x008000c1 o - 0x008000c2 l + .bss 0x00800138 0x3 USBLaminator.o + 0x00800138 r + 0x00800139 o + 0x0080013a l *(.bss*) *(COMMON) - 0x008000c3 PROVIDE (__bss_end, .) - 0x000002d2 __data_load_start = LOADADDR (.data) - 0x00000332 __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x0080013b PROVIDE (__bss_end, .) + 0x0000037c __data_load_start = LOADADDR (.data) + 0x00000454 __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x008000c3 0x0 - 0x008000c3 PROVIDE (__noinit_start, .) +.noinit 0x0080013b 0x0 + 0x0080013b PROVIDE (__noinit_start, .) *(.noinit*) - 0x008000c3 PROVIDE (__noinit_end, .) - 0x008000c3 _end = . - 0x008000c3 PROVIDE (__heap_start, .) + 0x0080013b PROVIDE (__noinit_end, .) + 0x0080013b _end = . + 0x0080013b PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 *(.eeprom*) @@ -434,31 +434,31 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8 .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x30ea +.debug_info 0x00000000 0x3a03 *(.debug_info) - .debug_info 0x00000000 0x30ea USBLaminator.o + .debug_info 0x00000000 0x3a03 USBLaminator.o *(.gnu.linkonce.wi.*) .debug_abbrev 0x00000000 0x3fb *(.debug_abbrev) .debug_abbrev 0x00000000 0x3fb USBLaminator.o -.debug_line 0x00000000 0x3ef +.debug_line 0x00000000 0x48c *(.debug_line) - .debug_line 0x00000000 0x3ef USBLaminator.o + .debug_line 0x00000000 0x48c USBLaminator.o .debug_frame 0x00000000 0xb0 *(.debug_frame) .debug_frame 0x00000000 0xb0 USBLaminator.o -.debug_str 0x00000000 0x1103 +.debug_str 0x00000000 0x1252 *(.debug_str) - .debug_str 0x00000000 0x1103 USBLaminator.o - 0x114e (size before relaxing) + .debug_str 0x00000000 0x1252 USBLaminator.o + 0x12a2 (size before relaxing) -.debug_loc 0x00000000 0x301 +.debug_loc 0x00000000 0x55f *(.debug_loc) - .debug_loc 0x00000000 0x301 USBLaminator.o + .debug_loc 0x00000000 0x55f USBLaminator.o .debug_macinfo *(.debug_macinfo) diff --git a/USBLaminator/USBLaminator/Debug/USBLaminator.srec b/USBLaminator/USBLaminator/Debug/USBLaminator.srec index 2f2b3e2..8069b28 100644 --- a/USBLaminator/USBLaminator/Debug/USBLaminator.srec +++ b/USBLaminator/USBLaminator/Debug/USBLaminator.srec @@ -1,54 +1,72 @@ S01400005553424C616D696E61746F722E737265637F S11300000C942B000C9453000C9453000C94530048 -S11300100C9453000C9453000C94FE000C94530065 +S11300100C9453000C9453000C9451010C94530011 S11300200C9453000C9453000C9453000C94530000 S11300300C9453000C9453000C9453000C945300F0 S11300400C9453000C9453000C9453000C945300E0 -S11300500C945300530111241FBECFE5D4E0DEBF3E -S1130060CDBF10E0A0E6B0E0E2EDF2E002C0059002 -S11300700D92A03CB107D9F720E0A0ECB0E001C09C -S11300801D92A33CB207E1F710E0C6E5D0E004C03E -S11300902297FE010E946301C435D107C9F70E946B -S11300A0FB000C9467010C940000CF93C49ABC9A93 +S11300500C945300A80111241FBECFE5D4E0DEBFE9 +S1130060CDBF11E0A0E6B0E0ECE7F3E002C00590FC +S11300700D92A833B107D9F721E0A8E3B1E001C09C +S11300801D92AB33B207E1F710E0C6E5D0E004C03F +S11300902297FE010E94B801C435D107C9F70E9416 +S11300A04E010C94BC010C940000CF93C49ABC9AEA S11300B0AA98A29AAB98A39AAC98A49AAD98A59A38 S11300C0AE98A69AAF98A79AE1E6F0E083E2C39AC5 S11300D0BB9A5D9BFECF8CB9C398BB9A8191811169 -S11300E0F6CFAA98A29AAB98A39AAC98A49AAD9882 -S11300F0A59AAE98A69AAF98A79A20E030E041E07E -S113010050E0CA01022E02C0880F991F0A94E2F738 -S1130110A82FA17080FF02C0AA9AA29AF82FF270A9 -S113012081FF02C0AB9AA39AE82FE47082FF02C059 -S1130130AC9AA49A782F787083FF02C0AD9AA59ADE -S1130140682F607184FF02C0AE9AA69A982F9072AD -S113015085FF02C0AF9AA79A8FE7BAE1C6E0815043 -S1130160B040C040E1F700C00000AA2311F0AA98F3 -S1130170A29AFF2311F0AB98A39AEE2311F0AC9846 -S1130180A49A772311F0AD98A59A662311F0AE983E -S1130190A69A992311F0AF98A79A2F5F3F4F263064 -S11301A0310509F0AECFAA98A29AAB98A39AAC985D -S11301B0A49AAD98A59AAE98A69AAF98A79A1FBC90 -S11301C08EB58B608EBD1DBC1CBC17BC16BC81E6F5 -S11301D08BBD88EA8ABD19BC18BC89B7806189BF08 -S11301E07894C498BC9AC39ABB9AC398BB9AC29A8F -S11301F0BA9ACF9108950E945500FFCF1F920F9293 -S11302000FB60F9211248F939F9395B384E089279F -S113021085BB9F918F910F900FBE0F901F901895E3 -S1130220CF93DF931F92CDB7DEB76983BC9ABB9A95 -S1130230BA9AC498BC9AC398BB9AC298BA9A81E8ED -S113024089B988E08AB986E880BDE3EBF0E085E50A -S1130250C39ABB9A5D9BFECF8CB9C398BB9A81911C -S11302608111F6CF0F90DF91CF910895BC9ABB9A7C -S1130270BA9AC498BC9AC398BB9AC298BA9A089579 -S1130280A29AA39AA49AA59AA69AA79AAA98A29A75 -S1130290AB98A39AAC98A49AAD98A59AAE98A69A4E -S11302A0AF98A79A089582EC90E00E94360181EC01 -S11302B090E00E94400160E080EC90E00E94100118 -S11302C00895EE0FFF1F0590F491E02D0994F89422 -S10502D0FFCF5A -S11302D22323232320426567696E20426F6F74755E -S11302E2702023232323232323232323232323238E -S11302F223232323232323232323232323232323C8 -S113030223232323232323232323232323232323B7 -S113031223232323232323232323232323232323A7 -S11303220A005561727420646F6E65210D0A000023 +S11300E0F6CFEEE9F0E083E2C39ABB9A5D9BFECFC4 +S11300F08CB9C398BB9A81918111F6CFAA98A29A20 +S1130100AB98A39AAC98A49AAD98A59AAE98A69ADF +S1130110AF98A79A20E030E041E050E0CA01022EF7 +S113012002C0880F991F0A94E2F7A82FA17080FFDC +S113013002C0AA9AA29AF82FF27081FF02C0AB9A69 +S1130140A39AE82FE47082FF02C0AC9AA49A782F95 +S1130150787083FF02C0AD9AA59A682F607184FFFE +S113016002C0AE9AA69A982F907285FF02C0AF9AE9 +S1130170A79A8FEFB1EEC4E08150B040C040E1F7E0 +S113018000C00000AA2311F0AA98A29AFF2311F03C +S1130190AB98A39AEE2311F0AC98A49A772311F0AC +S11301A0AD98A59A662311F0AE98A69A992311F0FA +S11301B0AF98A79A2F5F3F4F2630310509F0AECF95 +S11301C0AA98A29AAB98A39AAC98A49AAD98A59A27 +S11301D0AE98A69AAF98A79AEDEAF0E083E2C39AA4 +S11301E0BB9A5D9BFECF8CB9C398BB9A8191811158 +S11301F0F6CF1FBC8EB58B608EBD1DBC1CBC17BC5E +S113020016BC81E68BBD88EA8ABD19BC18BC89B7C7 +S1130210806189BF7894ECEBF0E083E2C39ABB9AE7 +S11302205D9BFECF8CB9C398BB9A81918111F6CFA7 +S113023025C0C39ABB9A5D9BFECF8CB9C398BB9A69 +S113024081918111F6CFE2EDF0E083E2C39ABB9A8B +S11302505D9BFECF8CB9C398BB9A81918111F6CF77 +S113026015C0C39ABB9A5D9BFECF8CB9C398BB9A49 +S113027081918111F6CFC29ABA9A0EC0C498BC9AE1 +S1130280C39ABB9AE2EEF0E083E2D3CFC398BB9A61 +S1130290EFEEF0E083E2E5CFCF9108950E945500A0 +S11302A0FFCF1F920F920FB60F9211248F939F933B +S11302B095B384E0892785BB9F918F910F900FBEE2 +S11302C00F901F901895CF93DF931F92CDB7DEB791 +S11302D06983BC9ABB9ABA9AC498BC9AC398BB9ACD +S11302E0C298BA9A1BB888E08AB986EA80BD10BC65 +S11302F089E189B9ECE2F1E085E5C39ABB9A5D9B9B +S1130300FECF8CB9C398BB9A81918111F6CF0F901F +S1130310DF91CF910895BC9ABB9ABA9AC498BC9ABB +S1130320C398BB9AC298BA9A0895A29AA39AA49A17 +S1130330A59AA69AA79AAA98A29AAB98A39AAC98B7 +S1130340A49AAD98A59AAE98A69AAF98A79A08953C +S11303508AE391E00E948B0189E391E00E94950178 +S113036060E088E391E00E9463010895EE0FFF1FAF +S10F03700590F491E02D0994F894FFCF5F +S113037C2323232320426567696E20426F6F7475B3 +S113038C70202323232323232323232323232323E3 +S113039C232323232323232323232323232323231D +S11303AC23232323232323232323230A002320541B +S11303BC657374204F75747075740A00232053652B +S11303CC7475702054696D65720A002323204F756F +S11303DC7470757420496E697420446F6E65210ABB +S11303EC002320536574757020427574746F6E0A03 +S11303FC0023205365747570204144430A00232361 +S113040C232320456E6420426F6F74757020232360 +S113041C232323232323232323232323232323239C +S113042C232323232323232323232323232323238C +S113043C2323232323232323230A005561727420AB +S10B044C646F6E65210A0000D3 S9030000FC diff --git a/USBLaminator/USBLaminator/USBLaminator.cpp b/USBLaminator/USBLaminator/USBLaminator.cpp index 9c17098..631153e 100644 --- a/USBLaminator/USBLaminator/USBLaminator.cpp +++ b/USBLaminator/USBLaminator/USBLaminator.cpp @@ -10,19 +10,26 @@ ledclass l; ssrclass o; usartclass r(l); +adcclass a; void setup() { l.on(l.RED); o.off(); - r.send("#### Begin Bootup ##############################################################\n"); + r.send("#### Begin Bootup #########################################\n"); + r.send("# Test Output\n"); o.test(); + r.send("# Setup Timer\n"); o.setup_timer(); + r.send("## Output Init Done!\n"); l.off(l.RED); l.on(l.YELLOW); - //adc on + r.send("# Setup ADC\n"); + a.on(); + r.send("# Setup Button\n"); //button on l.off(l.YELLOW); + r.send("#### End Bootup ###########################################\n"); l.on(l.GREEN); } @@ -31,6 +38,7 @@ int main(void) setup(); while(1) { + } } diff --git a/USBLaminator/USBLaminator/USBLaminator.cppproj b/USBLaminator/USBLaminator/USBLaminator.cppproj index ecba674..41e848c 100644 --- a/USBLaminator/USBLaminator/USBLaminator.cppproj +++ b/USBLaminator/USBLaminator/USBLaminator.cppproj @@ -44,7 +44,7 @@ 0000000000000 127.0.0.1 - 10439 + 11927 False @@ -63,13 +63,13 @@ - com.atmel.avrdbg.tool.simulator - Simulator - + com.atmel.avrdbg.tool.simulator + Simulator + - + 127.0.0.1 - 10439 + 11927 False @@ -154,6 +154,9 @@ + + compile + compile diff --git a/USBLaminator/USBLaminator/io/ADC.hpp b/USBLaminator/USBLaminator/io/ADC.hpp new file mode 100644 index 0000000..62e63fc --- /dev/null +++ b/USBLaminator/USBLaminator/io/ADC.hpp @@ -0,0 +1,36 @@ +/* + * ADC.hpp + * + * Created: 17.07.2016 15:51:41 + * Author: netz + */ + + +#ifndef ADC_H_ +#define ADC_H_ + +#include + +template +class Adc { + public: + Adc() { + init(); + } + void on() { + ADCSRA |= (1< +template class Usart { public: Usart(ledclass l) { init(); this->led = l; - send("Uart done!\r\n"); + send("Uart done!\n"); } void send(const char *text) { while (*text) @@ -29,9 +29,14 @@ class Usart { } private: void init() { - UBRRL = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt - UCSRB = /*(1< rts; + const typedef avrlib::pin cts; + const typedef avrlib::pin pwren; }; #endif /* USART_H_ */ \ No newline at end of file diff --git a/USBLaminator/USBLaminator/peripheral.h b/USBLaminator/USBLaminator/peripheral.h index d03f685..fb6d5b9 100644 --- a/USBLaminator/USBLaminator/peripheral.h +++ b/USBLaminator/USBLaminator/peripheral.h @@ -9,19 +9,20 @@ #ifndef PERIPHERAL_H_ #define PERIPHERAL_H_ -#define F_CPU 20000000 +#define F_CPU 16000000 #include #include "io/hardware/portb.hpp" #include "io/hardware/portc.hpp" +#include "io/hardware/portd.hpp" #include "io/Led.hpp" typedef Led< avrlib::portb, //LED an PORTD PINB4, //Rot PINB3, //Gelb - PINB2 //Grün + PINB2 //Grün > ledclass; #include "io/SSR.hpp" @@ -37,9 +38,18 @@ typedef SSR< #include "io/Usart.hpp" typedef Usart< - 9600 + 38400, + avrlib::portd, + PIND5, //RTS + PIND4, //CTS + PIND3 //PWREN > usartclass; +#include "io/ADC.hpp" +typedef ADC< + false //AREF powsersource +> adcclass; + #endif /* PERIPHERAL_H_ */ \ No newline at end of file