From 16d1f0722653e02f779cfdd787d53ef65de71c11 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Mon, 23 Jul 2018 17:27:50 +0200 Subject: [PATCH] Added basic controls --- .vs/AtTiny_alarm_clock/v14/.atsuo | Bin 27648 -> 27648 bytes AtTiny_alarm_clock.cproj | 16 + Debug/AtTiny_alarm_clock.elf | Bin 10668 -> 12832 bytes Debug/AtTiny_alarm_clock.hex | 59 ++-- Debug/AtTiny_alarm_clock.lss | 562 ++++++++++++++++++++---------- Debug/AtTiny_alarm_clock.map | 206 +++++++---- Debug/AtTiny_alarm_clock.srec | 59 ++-- Debug/main.d | 6 + Debug/main.o | Bin 3288 -> 7300 bytes main.c | 73 +++- 10 files changed, 676 insertions(+), 305 deletions(-) diff --git a/.vs/AtTiny_alarm_clock/v14/.atsuo b/.vs/AtTiny_alarm_clock/v14/.atsuo index e9a884068b7323874b2aceff2c53a87ef96a422c..0a07bc923bf3b09a602c8a252be07aa7bb3ec8ed 100644 GIT binary patch delta 2267 zcmc&$ZA@Eb6u$4}wiLJp%Eu@z0}6M1#1`7}(ZcvBP!*}8bWF1mGCsO38FY|g>!?$~ z1*WFpAaZSzn{wQ8E~Dicfb0Ns-S^O-dVpGz`qDI4kmC-NE)jfke?z6(b; zq6N{4*o$}`(T?avbRu3v#PW@LRSu1Pz_NpF_EIBCKlx=tAj|-U*&_-P8Lct>=r^b$l;jpP9W{9UNTnAoyeaEq(aHxtzB{s+)iZyx#iUcs1Rnvx(FCl96 ziB!kbX4G#W-Z&uAA~%J}UVwY16xISFFKW#atgx60g*=rwK&=&hsbfG z$YR!6wj*^mMIDM$D2idHfZoT^i=H1v?UmSUNf!}VO3PyQR}7NmO#k@G!+S72W|;c> zhKr-_R&;_J!TbpQH|NKG0kMBKNo^pTl7c4r<)E2YwKGY7!#ww{Dr@F+0oQsYjiX<+ghAWE?di3u;EyX)9xA{Kl&DQjm{|Y_YQp|7^rus zMAqzF6Kg+BKumAu6 delta 2057 zcmbtVZ%kWN6o2>imHy!sD6f%ai_0R?pAkFqer@~E+!ZsV>Z4AR0 z5x20xy3wvYf`cSv6umm;06rGv`E({6j1c_8rUAlLhUv0D5j4a;Lv0## ztSq-PWkDNdU7qvhv!)DH2${9~GK$bek|8_$iDM2izbAFK57u%g`I>nK$;&=??(d$m5z|q z!#2Nr#&wX^Eh!!7T!bApR)E>$E{%`WxLeu%UU2H3E-c7b&$509Gl`(OM+xp1;vk_j% zwq1pQqCwm`#1l9hF+$;J5looEkT%uAlde*`e<2kZ$efy82=y(-`qI&QNASnBpT9ly zYbJaqp&kld+&r|i_b7WM5Q$3#eLSNRIQ4RGjxI1De;J2AdvC{k#(NLZgUbq#v zgY}tGxDru;)ue}{OMvffl#v=9m1x_-}mkrQ@A)21`;<9XoRLWTJNpd}ae@ zVhD@ZpAlTs^-8L11;lJmD+aG=;k4PCovDU*T_#vI`!0FdtUYj#&XsMrW;bn`z~9o2 z^7LZ(H(6_>ta0)l#3AEcL(;xHR;!KAbBcLfv@+8}MFO9D)bNMrZP;Kf*{-1?2Z~G9 z*y}`=61>;txg#vNSz826!6)Eiuoi2*ZMD0K;NiHtWAJ;p5p_YI=6gKwX8&RMg59s5 z##>H6ri4iZS{m?|C*Bfhja$m-u5?@4rhWe~OUp8W`?*5HR#kFrdbV!-uBt#Hc{L)& zk2P~}fHgeu;P5q&%P`z^7Cvh_DCHRq+6ej0zXXnN#f2fN)O?RjUT1EnM + com.atmel.avrdbg.tool.jtagicemkii + 070000004698 + 0x1E910A + + + + 125000 + + ISP + + com.atmel.avrdbg.tool.jtagicemkii + 070000004698 + JTAGICE mkII + + ISP + 125000 diff --git a/Debug/AtTiny_alarm_clock.elf b/Debug/AtTiny_alarm_clock.elf index fda6dce5e8541cd16cc8a9b7b40718a3db15a657..6ab2d396ec6da9d376444f4bb57f15ed6a3f3e53 100644 GIT binary patch delta 5224 zcmbVQeQ;FO6~Fhr-OcVM*^ewqNWo+wAtV?=f>btm~T`Y^NcE^(wJ+^F``C= zQ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4@n?#}reH4ynK`}U+b2e;eGo*&^`Z~sA z@8Mo>JqS`9ViNcq;vwMsz%VZX*VPbxyg_Z@x^f;c+e*x_sY8x(EbWJhQefX9Os0jn zMdDH{Q|HP{xGQS7{BX<_fz=y}`{0+AP~EL@DO}958o#q3d|7ywSin!<_63IVZNo1xxD);b zuB8+!1n@IUv8b>qM_@;R^9X@8+A} zcNg?BI6rk1{9cGH-~uzHaElMR{F(3{ar$$7!6iNJ7&L!3iJwX0pMvuep>Tj};Jk0 zeRY9-!P&nSFwm+oD`OCqwp6H=i!e57g4Wqtu>_d$S~4-oU7DcPzDFmpy};rS0`u@? z*P;U>6M?qtjWi)@Q*_isLjGUsKJ;F}wOla%jhOIlO^UmbkMaLt4@dM&UIKR~94!!H zt=>#{>G^X#;9YSywggRV1*}DZ_iMP~;wPoqyJF&7TJOo#% Sx?WpS*j1MJBV{l}XZa5=pNxwD diff --git a/Debug/AtTiny_alarm_clock.hex b/Debug/AtTiny_alarm_clock.hex index e5da285..fe26490 100644 --- a/Debug/AtTiny_alarm_clock.hex +++ b/Debug/AtTiny_alarm_clock.hex @@ -1,22 +1,39 @@ -:1000000014C019C018C017C016C015C014C013C042 -:1000100012C011C010C00FC00EC00DC00CC00BC06C -:100020000AC009C008C007C006C011241FBECFED1A -:10003000CDBF80D089C0E4CFCF93C2E362D0C1509E -:10004000E9F7CF910895CF93C62F843038F48230EA -:1000500048F4882371F0813049F00CC0843051F4A9 -:10006000939808C04F73833009F4405C842F8068F4 -:1000700024D0939A929A929A98B39F708C2F807FF3 -:10008000982B98BB98B39F70892B88BB92989298B5 -:1000900038D087B3803F79F4929A929A88B3C29508 -:1000A000C07F8F708C2B88BB88B38F70C82BC8BB68 -:1000B0009298929826D0CF91089540E0682F84E0DE -:1000C000C2DF08958FEF87BB8B9A8A9A88BB939A79 -:1000D000929AB2DFB1DFB0DF80E3EFDFADDF80E324 -:1000E000ECDF0FD080E3E9DF88E2E7DF87B3807FD2 -:1000F00087BB8CE0E2DF86E0E0DF82E0DEDF9CDFD2 -:100100000895CF93DF931F92CDB7DD2784E48983D1 -:1001100089819FEF980F9983882341F08981898194 -:1001200089819FEF980F99838111F8CF0F90DF910C -:10013000CF9108958FEF87BB8AEA88BBC3DF40E089 -:0C01400061E480E080DFFFCFF894FFCF87 +:1000000014C02CC02BC02AC029C028C027C026C0BD +:1000100025C024C023C022C021C020C01FC01EC0D4 +:100020001DC01CC01BC01AC019C011241FBECFEDBB +:10003000CDBF10E0A0E6B0E0EEE3F2E002C0059034 +:100040000D92A237B107D9F720E0A2E7B0E001C0D6 +:100050001D92A837B207E1F7AED0EFC0D1CFCF9352 +:10006000C2E362D0C150E9F7CF910895CF93C62F74 +:10007000843038F4823048F4882371F0813049F0BC +:100080000CC0843051F4939808C04F73833009F446 +:10009000405C842F806824D0939A929A929A98B365 +:1000A0009F708C2F807F982B98BB98B39F70892B63 +:1000B00088BB9298929838D087B3803F79F4929A0F +:1000C000929A88B3C295C07F8F708C2B88BB88B3FF +:1000D0008F70C82BC8BB9298929826D0CF91089564 +:1000E00040E0682F84E0C2DF08958FEF87BB8B9AD2 +:1000F0008A9A88BB939A929AB2DFB1DFB0DF80E32D +:10010000EFDFADDF80E3ECDF0FD080E3E9DF88E2F3 +:10011000E7DF87B3807F87BB8CE0E2DF86E0E0DF4C +:1001200082E0DEDF9CDF0895CF93DF931F92CDB78F +:10013000DD2784E4898389819FEF980F9983882341 +:1001400041F08981898189819FEF980F998381117D +:10015000F8CF0F90DF91CF910895EF92FF920F9318 +:100160001F93CF937C01892B29F081E0E816F104DD +:1001700031F00AC06894EE24E1F8F12C05C00F2E8E +:10018000F3E0EF2EF12CF02DFA0160816F3569F06C +:100190008A010F5F1F4FC0E04C2F8E2D67DFF801E3 +:1001A00061918F01CF5F6F35B9F7CF911F910F919B +:1001B000FF90EF90089511BAC2E7D0E080917400EB +:1001C000882319F0813051F0FBCF109275008DDF3C +:1001D00081E086DF81E080937400F0CF81E080933E +:1001E000750040E650E060E070E080E090E0B5DF50 +:1001F00090B380917700937021E0933009F020E074 +:10020000982F91702917A1F090B39370933069F4EF +:1002100081608093770080917200909173000196C5 +:10022000909373008093720003C08E7F8093770059 +:0E0230008881805D80936000C1CFF894FFCF7D +:10023E002048616C6C6F5F5F5F5F5F5F5F5F5F5FEA +:02024E005F004F :00000001FF diff --git a/Debug/AtTiny_alarm_clock.lss b/Debug/AtTiny_alarm_clock.lss index af6adef..0012e6f 100644 --- a/Debug/AtTiny_alarm_clock.lss +++ b/Debug/AtTiny_alarm_clock.lss @@ -3,324 +3,512 @@ AtTiny_alarm_clock.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 0000014c 00000000 00000000 00000054 2**1 + 0 .text 0000023e 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000000 00800060 00800060 000001a0 2**0 + 1 .data 00000012 00800060 0000023e 000002d2 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .comment 00000030 00000000 00000000 000001a0 2**0 + 2 .bss 00000006 00800072 00800072 000002e4 2**0 + ALLOC + 3 .comment 00000030 00000000 00000000 000002e4 2**0 CONTENTS, READONLY - 3 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000001d0 2**2 + 4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 00000314 2**2 CONTENTS, READONLY - 4 .debug_aranges 00000088 00000000 00000000 00000210 2**0 + 5 .debug_aranges 00000090 00000000 00000000 00000354 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_info 00000915 00000000 00000000 00000298 2**0 + 6 .debug_info 00000a9b 00000000 00000000 000003e4 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_abbrev 00000631 00000000 00000000 00000bad 2**0 + 7 .debug_abbrev 000006f0 00000000 00000000 00000e7f 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_line 00000517 00000000 00000000 000011de 2**0 + 8 .debug_line 0000059a 00000000 00000000 0000156f 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_frame 000000f4 00000000 00000000 000016f8 2**2 + 9 .debug_frame 00000120 00000000 00000000 00001b0c 2**2 CONTENTS, READONLY, DEBUGGING - 9 .debug_str 0000035c 00000000 00000000 000017ec 2**0 + 10 .debug_str 00000446 00000000 00000000 00001c2c 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_loc 0000028c 00000000 00000000 00001b48 2**0 + 11 .debug_loc 000003bb 00000000 00000000 00002072 2**0 CONTENTS, READONLY, DEBUGGING - 11 .debug_ranges 00000058 00000000 00000000 00001dd4 2**0 + 12 .debug_ranges 00000078 00000000 00000000 0000242d 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 14 c0 rjmp .+40 ; 0x2a <__ctors_end> - 2: 19 c0 rjmp .+50 ; 0x36 <__bad_interrupt> - 4: 18 c0 rjmp .+48 ; 0x36 <__bad_interrupt> - 6: 17 c0 rjmp .+46 ; 0x36 <__bad_interrupt> - 8: 16 c0 rjmp .+44 ; 0x36 <__bad_interrupt> - a: 15 c0 rjmp .+42 ; 0x36 <__bad_interrupt> - c: 14 c0 rjmp .+40 ; 0x36 <__bad_interrupt> - e: 13 c0 rjmp .+38 ; 0x36 <__bad_interrupt> - 10: 12 c0 rjmp .+36 ; 0x36 <__bad_interrupt> - 12: 11 c0 rjmp .+34 ; 0x36 <__bad_interrupt> - 14: 10 c0 rjmp .+32 ; 0x36 <__bad_interrupt> - 16: 0f c0 rjmp .+30 ; 0x36 <__bad_interrupt> - 18: 0e c0 rjmp .+28 ; 0x36 <__bad_interrupt> - 1a: 0d c0 rjmp .+26 ; 0x36 <__bad_interrupt> - 1c: 0c c0 rjmp .+24 ; 0x36 <__bad_interrupt> - 1e: 0b c0 rjmp .+22 ; 0x36 <__bad_interrupt> - 20: 0a c0 rjmp .+20 ; 0x36 <__bad_interrupt> - 22: 09 c0 rjmp .+18 ; 0x36 <__bad_interrupt> - 24: 08 c0 rjmp .+16 ; 0x36 <__bad_interrupt> - 26: 07 c0 rjmp .+14 ; 0x36 <__bad_interrupt> - 28: 06 c0 rjmp .+12 ; 0x36 <__bad_interrupt> + 2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> + 4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> + 6: 2a c0 rjmp .+84 ; 0x5c <__bad_interrupt> + 8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> + a: 28 c0 rjmp .+80 ; 0x5c <__bad_interrupt> + c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> + e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> + 10: 25 c0 rjmp .+74 ; 0x5c <__bad_interrupt> + 12: 24 c0 rjmp .+72 ; 0x5c <__bad_interrupt> + 14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> + 16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> + 18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> + 1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> + 1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> + 1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> + 20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> + 22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> + 24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> + 26: 1a c0 rjmp .+52 ; 0x5c <__bad_interrupt> + 28: 19 c0 rjmp .+50 ; 0x5c <__bad_interrupt> 0000002a <__ctors_end>: 2a: 11 24 eor r1, r1 2c: 1f be out 0x3f, r1 ; 63 2e: cf ed ldi r28, 0xDF ; 223 30: cd bf out 0x3d, r28 ; 61 - 32: 80 d0 rcall .+256 ; 0x134
- 34: 89 c0 rjmp .+274 ; 0x148 <_exit> -00000036 <__bad_interrupt>: - 36: e4 cf rjmp .-56 ; 0x0 <__vectors> +00000032 <__do_copy_data>: + 32: 10 e0 ldi r17, 0x00 ; 0 + 34: a0 e6 ldi r26, 0x60 ; 96 + 36: b0 e0 ldi r27, 0x00 ; 0 + 38: ee e3 ldi r30, 0x3E ; 62 + 3a: f2 e0 ldi r31, 0x02 ; 2 + 3c: 02 c0 rjmp .+4 ; 0x42 <__SREG__+0x3> + 3e: 05 90 lpm r0, Z+ + 40: 0d 92 st X+, r0 + 42: a2 37 cpi r26, 0x72 ; 114 + 44: b1 07 cpc r27, r17 + 46: d9 f7 brne .-10 ; 0x3e <__SP_L__+0x1> -00000038 : +00000048 <__do_clear_bss>: + 48: 20 e0 ldi r18, 0x00 ; 0 + 4a: a2 e7 ldi r26, 0x72 ; 114 + 4c: b0 e0 ldi r27, 0x00 ; 0 + 4e: 01 c0 rjmp .+2 ; 0x52 <.do_clear_bss_start> + +00000050 <.do_clear_bss_loop>: + 50: 1d 92 st X+, r1 + +00000052 <.do_clear_bss_start>: + 52: a8 37 cpi r26, 0x78 ; 120 + 54: b2 07 cpc r27, r18 + 56: e1 f7 brne .-8 ; 0x50 <.do_clear_bss_loop> + 58: ae d0 rcall .+348 ; 0x1b6
+ 5a: ef c0 rjmp .+478 ; 0x23a <_exit> + +0000005c <__bad_interrupt>: + 5c: d1 cf rjmp .-94 ; 0x0 <__vectors> + +0000005e : void lcd_1s(void){ for(uint8_t i=200;i>0;i--){ lcd_5ms(); } } - 38: cf 93 push r28 - 3a: c2 e3 ldi r28, 0x32 ; 50 - 3c: 62 d0 rcall .+196 ; 0x102 - 3e: c1 50 subi r28, 0x01 ; 1 - 40: e9 f7 brne .-6 ; 0x3c - 42: cf 91 pop r28 - 44: 08 95 ret + 5e: cf 93 push r28 + 60: c2 e3 ldi r28, 0x32 ; 50 + 62: 62 d0 rcall .+196 ; 0x128 + 64: c1 50 subi r28, 0x01 ; 1 + 66: e9 f7 brne .-6 ; 0x62 + 68: cf 91 pop r28 + 6a: 08 95 ret -00000046 : +0000006c : void lcd_instruct(uint8_t zeichen){ lcd_write(instruct,zeichen,0); } void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){ - 46: cf 93 push r28 - 48: c6 2f mov r28, r22 + 6c: cf 93 push r28 + 6e: c6 2f mov r28, r22 switch (lcd_whichwrite){ - 4a: 84 30 cpi r24, 0x04 ; 4 - 4c: 38 f4 brcc .+14 ; 0x5c - 4e: 82 30 cpi r24, 0x02 ; 2 - 50: 48 f4 brcc .+18 ; 0x64 - 52: 88 23 and r24, r24 - 54: 71 f0 breq .+28 ; 0x72 - 56: 81 30 cpi r24, 0x01 ; 1 - 58: 49 f0 breq .+18 ; 0x6c - 5a: 0c c0 rjmp .+24 ; 0x74 - 5c: 84 30 cpi r24, 0x04 ; 4 - 5e: 51 f4 brne .+20 ; 0x74 + 70: 84 30 cpi r24, 0x04 ; 4 + 72: 38 f4 brcc .+14 ; 0x82 + 74: 82 30 cpi r24, 0x02 ; 2 + 76: 48 f4 brcc .+18 ; 0x8a + 78: 88 23 and r24, r24 + 7a: 71 f0 breq .+28 ; 0x98 + 7c: 81 30 cpi r24, 0x01 ; 1 + 7e: 49 f0 breq .+18 ; 0x92 + 80: 0c c0 rjmp .+24 ; 0x9a + 82: 84 30 cpi r24, 0x04 ; 4 + 84: 51 f4 brne .+20 ; 0x9a case instruct : unset_lcd_RS; - 60: 93 98 cbi 0x12, 3 ; 18 + 86: 93 98 cbi 0x12, 3 ; 18 break; - 62: 08 c0 rjmp .+16 ; 0x74 + 88: 08 c0 rjmp .+16 ; 0x9a case line2: case line1: position = position & 0x3f; - 64: 4f 73 andi r20, 0x3F ; 63 + 8a: 4f 73 andi r20, 0x3F ; 63 if (lcd_whichwrite == line2){ position=position + 0x40; }; - 66: 83 30 cpi r24, 0x03 ; 3 - 68: 09 f4 brne .+2 ; 0x6c - 6a: 40 5c subi r20, 0xC0 ; 192 + 8c: 83 30 cpi r24, 0x03 ; 3 + 8e: 09 f4 brne .+2 ; 0x92 + 90: 40 5c subi r20, 0xC0 ; 192 case therepos: lcd_instruct(lcd_mask_Write_Adress(position)); - 6c: 84 2f mov r24, r20 - 6e: 80 68 ori r24, 0x80 ; 128 - 70: 24 d0 rcall .+72 ; 0xba + 92: 84 2f mov r24, r20 + 94: 80 68 ori r24, 0x80 ; 128 + 96: 24 d0 rcall .+72 ; 0xe0 case here: set_lcd_RS; - 72: 93 9a sbi 0x12, 3 ; 18 + 98: 93 9a sbi 0x12, 3 ; 18 break; } set_lcd_E; - 74: 92 9a sbi 0x12, 2 ; 18 + 9a: 92 9a sbi 0x12, 2 ; 18 set_lcd_E; - 76: 92 9a sbi 0x12, 2 ; 18 + 9c: 92 9a sbi 0x12, 2 ; 18 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - 78: 98 b3 in r25, 0x18 ; 24 - 7a: 9f 70 andi r25, 0x0F ; 15 - 7c: 8c 2f mov r24, r28 - 7e: 80 7f andi r24, 0xF0 ; 240 - 80: 98 2b or r25, r24 - 82: 98 bb out 0x18, r25 ; 24 + 9e: 98 b3 in r25, 0x18 ; 24 + a0: 9f 70 andi r25, 0x0F ; 15 + a2: 8c 2f mov r24, r28 + a4: 80 7f andi r24, 0xF0 ; 240 + a6: 98 2b or r25, r24 + a8: 98 bb out 0x18, r25 ; 24 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - 84: 98 b3 in r25, 0x18 ; 24 - 86: 9f 70 andi r25, 0x0F ; 15 - 88: 89 2b or r24, r25 - 8a: 88 bb out 0x18, r24 ; 24 + aa: 98 b3 in r25, 0x18 ; 24 + ac: 9f 70 andi r25, 0x0F ; 15 + ae: 89 2b or r24, r25 + b0: 88 bb out 0x18, r24 ; 24 unset_lcd_E; - 8c: 92 98 cbi 0x12, 2 ; 18 + b2: 92 98 cbi 0x12, 2 ; 18 unset_lcd_E; - 8e: 92 98 cbi 0x12, 2 ; 18 + b4: 92 98 cbi 0x12, 2 ; 18 wait_100us(); - 90: 38 d0 rcall .+112 ; 0x102 + b6: 38 d0 rcall .+112 ; 0x128 if (lcd_dataport_DDR==0xf0){ - 92: 87 b3 in r24, 0x17 ; 23 - 94: 80 3f cpi r24, 0xF0 ; 240 - 96: 79 f4 brne .+30 ; 0xb6 + b8: 87 b3 in r24, 0x17 ; 23 + ba: 80 3f cpi r24, 0xF0 ; 240 + bc: 79 f4 brne .+30 ; 0xdc zeichen=zeichen << 4; set_lcd_E; - 98: 92 9a sbi 0x12, 2 ; 18 + be: 92 9a sbi 0x12, 2 ; 18 set_lcd_E; - 9a: 92 9a sbi 0x12, 2 ; 18 + c0: 92 9a sbi 0x12, 2 ; 18 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - 9c: 88 b3 in r24, 0x18 ; 24 - 9e: c2 95 swap r28 - a0: c0 7f andi r28, 0xF0 ; 240 - a2: 8f 70 andi r24, 0x0F ; 15 - a4: 8c 2b or r24, r28 - a6: 88 bb out 0x18, r24 ; 24 + c2: 88 b3 in r24, 0x18 ; 24 + c4: c2 95 swap r28 + c6: c0 7f andi r28, 0xF0 ; 240 + c8: 8f 70 andi r24, 0x0F ; 15 + ca: 8c 2b or r24, r28 + cc: 88 bb out 0x18, r24 ; 24 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - a8: 88 b3 in r24, 0x18 ; 24 - aa: 8f 70 andi r24, 0x0F ; 15 - ac: c8 2b or r28, r24 - ae: c8 bb out 0x18, r28 ; 24 + ce: 88 b3 in r24, 0x18 ; 24 + d0: 8f 70 andi r24, 0x0F ; 15 + d2: c8 2b or r28, r24 + d4: c8 bb out 0x18, r28 ; 24 unset_lcd_E; - b0: 92 98 cbi 0x12, 2 ; 18 + d6: 92 98 cbi 0x12, 2 ; 18 unset_lcd_E; - b2: 92 98 cbi 0x12, 2 ; 18 + d8: 92 98 cbi 0x12, 2 ; 18 wait_100us(); - b4: 26 d0 rcall .+76 ; 0x102 + da: 26 d0 rcall .+76 ; 0x128 } } - b6: cf 91 pop r28 - b8: 08 95 ret + dc: cf 91 pop r28 + de: 08 95 ret -000000ba : +000000e0 : lcd_5ms(); } } void lcd_instruct(uint8_t zeichen){ lcd_write(instruct,zeichen,0); - ba: 40 e0 ldi r20, 0x00 ; 0 - bc: 68 2f mov r22, r24 - be: 84 e0 ldi r24, 0x04 ; 4 - c0: c2 df rcall .-124 ; 0x46 - c2: 08 95 ret + e0: 40 e0 ldi r20, 0x00 ; 0 + e2: 68 2f mov r22, r24 + e4: 84 e0 ldi r24, 0x04 ; 4 + e6: c2 df rcall .-124 ; 0x6c + e8: 08 95 ret -000000c4 : +000000ea : void lcd_init(void){ /* setting up ports first */ lcd_dataport_DDR=0xff; - c4: 8f ef ldi r24, 0xFF ; 255 - c6: 87 bb out 0x17, r24 ; 23 + ea: 8f ef ldi r24, 0xFF ; 255 + ec: 87 bb out 0x17, r24 ; 23 set_lcd_RS_DDR; - c8: 8b 9a sbi 0x11, 3 ; 17 + ee: 8b 9a sbi 0x11, 3 ; 17 set_lcd_E_DDR; - ca: 8a 9a sbi 0x11, 2 ; 17 + f0: 8a 9a sbi 0x11, 2 ; 17 /* end setting up ports */ lcd_dataport=0xff; - cc: 88 bb out 0x18, r24 ; 24 + f2: 88 bb out 0x18, r24 ; 24 set_lcd_RS; - ce: 93 9a sbi 0x12, 3 ; 18 + f4: 93 9a sbi 0x12, 3 ; 18 set_lcd_E; - d0: 92 9a sbi 0x12, 2 ; 18 + f6: 92 9a sbi 0x12, 2 ; 18 lcd_5ms(); - d2: b2 df rcall .-156 ; 0x38 + f8: b2 df rcall .-156 ; 0x5e lcd_5ms(); - d4: b1 df rcall .-158 ; 0x38 + fa: b1 df rcall .-158 ; 0x5e lcd_5ms(); - d6: b0 df rcall .-160 ; 0x38 + fc: b0 df rcall .-160 ; 0x5e lcd_instruct(lcd_SET_FUNCTION_8BIT); - d8: 80 e3 ldi r24, 0x30 ; 48 - da: ef df rcall .-34 ; 0xba + fe: 80 e3 ldi r24, 0x30 ; 48 + 100: ef df rcall .-34 ; 0xe0 lcd_5ms(); - dc: ad df rcall .-166 ; 0x38 + 102: ad df rcall .-166 ; 0x5e lcd_instruct(lcd_SET_FUNCTION_8BIT); - de: 80 e3 ldi r24, 0x30 ; 48 - e0: ec df rcall .-40 ; 0xba + 104: 80 e3 ldi r24, 0x30 ; 48 + 106: ec df rcall .-40 ; 0xe0 wait_100us(); - e2: 0f d0 rcall .+30 ; 0x102 + 108: 0f d0 rcall .+30 ; 0x128 lcd_instruct(lcd_SET_FUNCTION_8BIT); - e4: 80 e3 ldi r24, 0x30 ; 48 - e6: e9 df rcall .-46 ; 0xba + 10a: 80 e3 ldi r24, 0x30 ; 48 + 10c: e9 df rcall .-46 ; 0xe0 if (lcd_dataport_mask==0xf0){ lcd_instruct(lcd_SET_FUNCTION_4BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); - e8: 88 e2 ldi r24, 0x28 ; 40 - ea: e7 df rcall .-50 ; 0xba + 10e: 88 e2 ldi r24, 0x28 ; 40 + 110: e7 df rcall .-50 ; 0xe0 }else{ lcd_instruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); } lcd_dataport_DDR&=lcd_dataport_mask; - ec: 87 b3 in r24, 0x17 ; 23 - ee: 80 7f andi r24, 0xF0 ; 240 - f0: 87 bb out 0x17, r24 ; 23 + 112: 87 b3 in r24, 0x17 ; 23 + 114: 80 7f andi r24, 0xF0 ; 240 + 116: 87 bb out 0x17, r24 ; 23 lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF); - f2: 8c e0 ldi r24, 0x0C ; 12 - f4: e2 df rcall .-60 ; 0xba + 118: 8c e0 ldi r24, 0x0C ; 12 + 11a: e2 df rcall .-60 ; 0xe0 lcd_instruct(lcd_ENTRY_MODE_SET|lcd_ENTRY_MODE_SET_INCREASE | lcd_ENTRY_MS_DISPLAY_NOT_S); - f6: 86 e0 ldi r24, 0x06 ; 6 - f8: e0 df rcall .-64 ; 0xba + 11c: 86 e0 ldi r24, 0x06 ; 6 + 11e: e0 df rcall .-64 ; 0xe0 lcd_instruct(lcd_RETURN_HOME); - fa: 82 e0 ldi r24, 0x02 ; 2 - fc: de df rcall .-68 ; 0xba + 120: 82 e0 ldi r24, 0x02 ; 2 + 122: de df rcall .-68 ; 0xe0 lcd_5ms(); - fe: 9c df rcall .-200 ; 0x38 - 100: 08 95 ret + 124: 9c df rcall .-200 ; 0x5e + 126: 08 95 ret -00000102 : +00000128 : #include #include #include "lcd4.h" void wait_100us(void){ - 102: cf 93 push r28 - 104: df 93 push r29 - 106: 1f 92 push r1 - 108: cd b7 in r28, 0x3d ; 61 - 10a: dd 27 eor r29, r29 + 128: cf 93 push r28 + 12a: df 93 push r29 + 12c: 1f 92 push r1 + 12e: cd b7 in r28, 0x3d ; 61 + 130: dd 27 eor r29, r29 for (volatile uint8_t i=68;i--;i>0){ - 10c: 84 e4 ldi r24, 0x44 ; 68 - 10e: 89 83 std Y+1, r24 ; 0x01 - 110: 89 81 ldd r24, Y+1 ; 0x01 - 112: 9f ef ldi r25, 0xFF ; 255 - 114: 98 0f add r25, r24 - 116: 99 83 std Y+1, r25 ; 0x01 - 118: 88 23 and r24, r24 - 11a: 41 f0 breq .+16 ; 0x12c + 132: 84 e4 ldi r24, 0x44 ; 68 + 134: 89 83 std Y+1, r24 ; 0x01 + 136: 89 81 ldd r24, Y+1 ; 0x01 + 138: 9f ef ldi r25, 0xFF ; 255 + 13a: 98 0f add r25, r24 + 13c: 99 83 std Y+1, r25 ; 0x01 + 13e: 88 23 and r24, r24 + 140: 41 f0 breq .+16 ; 0x152 i; - 11c: 89 81 ldd r24, Y+1 ; 0x01 + 142: 89 81 ldd r24, Y+1 ; 0x01 #include #include #include "lcd4.h" void wait_100us(void){ for (volatile uint8_t i=68;i--;i>0){ - 11e: 89 81 ldd r24, Y+1 ; 0x01 - 120: 89 81 ldd r24, Y+1 ; 0x01 - 122: 9f ef ldi r25, 0xFF ; 255 - 124: 98 0f add r25, r24 - 126: 99 83 std Y+1, r25 ; 0x01 - 128: 81 11 cpse r24, r1 - 12a: f8 cf rjmp .-16 ; 0x11c + 144: 89 81 ldd r24, Y+1 ; 0x01 + 146: 89 81 ldd r24, Y+1 ; 0x01 + 148: 9f ef ldi r25, 0xFF ; 255 + 14a: 98 0f add r25, r24 + 14c: 99 83 std Y+1, r25 ; 0x01 + 14e: 81 11 cpse r24, r1 + 150: f8 cf rjmp .-16 ; 0x142 i; } } - 12c: 0f 90 pop r0 - 12e: df 91 pop r29 - 130: cf 91 pop r28 - 132: 08 95 ret + 152: 0f 90 pop r0 + 154: df 91 pop r29 + 156: cf 91 pop r28 + 158: 08 95 ret -00000134
: -#include "lcd4.h" +0000015a : + } + } +} +void lcd_write_text(int row, int col, uint8_t text[16]) +{ + 15a: ef 92 push r14 + 15c: ff 92 push r15 + 15e: 0f 93 push r16 + 160: 1f 93 push r17 + 162: cf 93 push r28 + 164: 7c 01 movw r14, r24 + switch(row){ + 166: 89 2b or r24, r25 + 168: 29 f0 breq .+10 ; 0x174 + 16a: 81 e0 ldi r24, 0x01 ; 1 + 16c: e8 16 cp r14, r24 + 16e: f1 04 cpc r15, r1 + 170: 31 f0 breq .+12 ; 0x17e + 172: 0a c0 rjmp .+20 ; 0x188 + case 0: + row = line1; + 174: 68 94 set + 176: ee 24 eor r14, r14 + 178: e1 f8 bld r14, 1 + 17a: f1 2c mov r15, r1 + 17c: 05 c0 rjmp .+10 ; 0x188 + break; + case 1: + row = line2; + 17e: 0f 2e mov r0, r31 + 180: f3 e0 ldi r31, 0x03 ; 3 + 182: ef 2e mov r14, r31 + 184: f1 2c mov r15, r1 + 186: f0 2d mov r31, r0 + break; + } + int i=0; + while(text[i] != 0x5F){ + 188: fa 01 movw r30, r20 + 18a: 60 81 ld r22, Z + 18c: 6f 35 cpi r22, 0x5F ; 95 + 18e: 69 f0 breq .+26 ; 0x1aa + 190: 8a 01 movw r16, r20 + 192: 0f 5f subi r16, 0xFF ; 255 + 194: 1f 4f sbci r17, 0xFF ; 255 + 196: c0 e0 ldi r28, 0x00 ; 0 + lcd_write(row, text[i], 0+i); + 198: 4c 2f mov r20, r28 + 19a: 8e 2d mov r24, r14 + 19c: 67 df rcall .-306 ; 0x6c + case 1: + row = line2; + break; + } + int i=0; + while(text[i] != 0x5F){ + 19e: f8 01 movw r30, r16 + 1a0: 61 91 ld r22, Z+ + 1a2: 8f 01 movw r16, r30 + 1a4: cf 5f subi r28, 0xFF ; 255 + 1a6: 6f 35 cpi r22, 0x5F ; 95 + 1a8: b9 f7 brne .-18 ; 0x198 + lcd_write(row, text[i], 0+i); + i++; + } +} + 1aa: cf 91 pop r28 + 1ac: 1f 91 pop r17 + 1ae: 0f 91 pop r16 + 1b0: ff 90 pop r15 + 1b2: ef 90 pop r14 + 1b4: 08 95 ret + +000001b6
: + +uint8_t flags; int main(void) { - DDRB = 0xff; - 134: 8f ef ldi r24, 0xFF ; 255 - 136: 87 bb out 0x17, r24 ; 23 - PORTB = 0xAA; - 138: 8a ea ldi r24, 0xAA ; 170 - 13a: 88 bb out 0x18, r24 ; 24 - lcd_init(); - 13c: c3 df rcall .-122 ; 0xc4 - lcd_write(here, 0x41, 0); - 13e: 40 e0 ldi r20, 0x00 ; 0 - 140: 61 e4 ldi r22, 0x41 ; 65 - 142: 80 e0 ldi r24, 0x00 ; 0 - 144: 80 df rcall .-256 ; 0x46 - 146: ff cf rjmp .-2 ; 0x146 + DDRD = 0x00; + 1b6: 11 ba out 0x11, r1 ; 17 + flags &= ~(1< + switch(clock_state){ + 1c0: 88 23 and r24, r24 + 1c2: 19 f0 breq .+6 ; 0x1ca + 1c4: 81 30 cpi r24, 0x01 ; 1 + 1c6: 51 f0 breq .+20 ; 0x1dc + 1c8: fb cf rjmp .-10 ; 0x1c0 + 1ca: 10 92 75 00 sts 0x0075, r1 ; 0x800075 + case CLOCK_INIT: + //do some init stuff... + lcd_init(); //I know, it's just c but I don't care + 1ce: 8d df rcall .-230 ; 0xea + lcd_instruct(lcd_DISPLAY_CLEAR); + 1d0: 81 e0 ldi r24, 0x01 ; 1 + 1d2: 86 df rcall .-244 ; 0xe0 + //INIT done -> change to IDLE + clock_new_state = CLOCK_IDLE; + 1d4: 81 e0 ldi r24, 0x01 ; 1 + 1d6: 80 93 74 00 sts 0x0074, r24 ; 0x800074 -00000148 <_exit>: - 148: f8 94 cli + break; + 1da: f0 cf rjmp .-32 ; 0x1bc + 1dc: 81 e0 ldi r24, 0x01 ; 1 + 1de: 80 93 75 00 sts 0x0075, r24 ; 0x800075 + case CLOCK_IDLE: + //IDLE MODE -0000014a <__stop_program>: - 14a: ff cf rjmp .-2 ; 0x14a <__stop_program> + //print the IDLE Screen + + lcd_write_text(0,0,t1); + 1e2: 40 e6 ldi r20, 0x60 ; 96 + 1e4: 50 e0 ldi r21, 0x00 ; 0 + 1e6: 60 e0 ldi r22, 0x00 ; 0 + 1e8: 70 e0 ldi r23, 0x00 ; 0 + 1ea: 80 e0 ldi r24, 0x00 ; 0 + 1ec: 90 e0 ldi r25, 0x00 ; 0 + 1ee: b5 df rcall .-150 ; 0x15a + + if(((PIND & 0x03) == 3) != (flags & 1< + 1f6: 93 70 andi r25, 0x03 ; 3 + 1f8: 21 e0 ldi r18, 0x01 ; 1 + 1fa: 93 30 cpi r25, 0x03 ; 3 + 1fc: 09 f0 breq .+2 ; 0x200 + 1fe: 20 e0 ldi r18, 0x00 ; 0 + 200: 98 2f mov r25, r24 + 202: 91 70 andi r25, 0x01 ; 1 + 204: 29 17 cp r18, r25 + 206: a1 f0 breq .+40 ; 0x230 + + if((PIND & 0x03) == 3){ + 208: 90 b3 in r25, 0x10 ; 16 + 20a: 93 70 andi r25, 0x03 ; 3 + 20c: 93 30 cpi r25, 0x03 ; 3 + 20e: 69 f4 brne .+26 ; 0x22a + flags |= 1< + counter++; + 216: 80 91 72 00 lds r24, 0x0072 ; 0x800072 <__data_end> + 21a: 90 91 73 00 lds r25, 0x0073 ; 0x800073 <__data_end+0x1> + 21e: 01 96 adiw r24, 0x01 ; 1 + 220: 90 93 73 00 sts 0x0073, r25 ; 0x800073 <__data_end+0x1> + 224: 80 93 72 00 sts 0x0072, r24 ; 0x800072 <__data_end> + 228: 03 c0 rjmp .+6 ; 0x230 + } + else{ + flags &= ~(1< + } + } + + + t1[0] = counter + 48; + 230: 88 81 ld r24, Y + 232: 80 5d subi r24, 0xD0 ; 208 + 234: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__data_start> + + break; + 238: c1 cf rjmp .-126 ; 0x1bc + +0000023a <_exit>: + 23a: f8 94 cli + +0000023c <__stop_program>: + 23c: ff cf rjmp .-2 ; 0x23c <__stop_program> diff --git a/Debug/AtTiny_alarm_clock.map b/Debug/AtTiny_alarm_clock.map index ff56a98..74c3fd6 100644 --- a/Debug/AtTiny_alarm_clock.map +++ b/Debug/AtTiny_alarm_clock.map @@ -2,6 +2,16 @@ Archive member included to satisfy reference by file (symbol) c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o (exit) +c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + main.o (__do_copy_data) +c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + main.o (__do_clear_bss) + +Allocating common symbols +Common symbol size file + +clock_old_state 0x1 main.o +flags 0x1 main.o Discarded input sections @@ -35,6 +45,38 @@ Discarded input sections 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) .text.libgcc.fixed 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text.libgcc.fixed + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + .text.libgcc.fixed + 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) Memory Configuration @@ -161,7 +203,7 @@ END GROUP .rela.plt *(.rela.plt) -.text 0x00000000 0x14c +.text 0x00000000 0x23e *(.vectors) .vectors 0x00000000 0x2a C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o 0x00000000 __vector_default @@ -202,6 +244,10 @@ END GROUP *(.init3) *(.init3) *(.init4) + .init4 0x00000032 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_copy_data.o) + 0x00000032 __do_copy_data + .init4 0x00000048 0x10 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_clear_bss.o) + 0x00000048 __do_clear_bss *(.init4) *(.init5) *(.init5) @@ -212,54 +258,57 @@ END GROUP *(.init8) *(.init8) *(.init9) - .init9 0x00000032 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o + .init9 0x00000058 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o *(.init9) *(.text) - .text 0x00000036 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o - 0x00000036 __vector_1 - 0x00000036 __vector_12 - 0x00000036 __bad_interrupt - 0x00000036 __vector_6 - 0x00000036 __vector_3 - 0x00000036 __vector_11 - 0x00000036 __vector_13 - 0x00000036 __vector_17 - 0x00000036 __vector_19 - 0x00000036 __vector_7 - 0x00000036 __vector_5 - 0x00000036 __vector_4 - 0x00000036 __vector_9 - 0x00000036 __vector_2 - 0x00000036 __vector_15 - 0x00000036 __vector_8 - 0x00000036 __vector_14 - 0x00000036 __vector_10 - 0x00000036 __vector_16 - 0x00000036 __vector_18 - 0x00000036 __vector_20 - 0x00000038 . = ALIGN (0x2) + .text 0x0000005c 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o + 0x0000005c __vector_1 + 0x0000005c __vector_12 + 0x0000005c __bad_interrupt + 0x0000005c __vector_6 + 0x0000005c __vector_3 + 0x0000005c __vector_11 + 0x0000005c __vector_13 + 0x0000005c __vector_17 + 0x0000005c __vector_19 + 0x0000005c __vector_7 + 0x0000005c __vector_5 + 0x0000005c __vector_4 + 0x0000005c __vector_9 + 0x0000005c __vector_2 + 0x0000005c __vector_15 + 0x0000005c __vector_8 + 0x0000005c __vector_14 + 0x0000005c __vector_10 + 0x0000005c __vector_16 + 0x0000005c __vector_18 + 0x0000005c __vector_20 + 0x0000005e . = ALIGN (0x2) *(.text.*) - .text.lcd_5ms 0x00000038 0xe lcd4.o - 0x00000038 lcd_5ms + .text.lcd_5ms 0x0000005e 0xe lcd4.o + 0x0000005e lcd_5ms .text.lcd_write - 0x00000046 0x74 lcd4.o - 0x00000046 lcd_write + 0x0000006c 0x74 lcd4.o + 0x0000006c lcd_write .text.lcd_instruct - 0x000000ba 0xa lcd4.o - 0x000000ba lcd_instruct + 0x000000e0 0xa lcd4.o + 0x000000e0 lcd_instruct .text.lcd_init - 0x000000c4 0x3e lcd4.o - 0x000000c4 lcd_init + 0x000000ea 0x3e lcd4.o + 0x000000ea lcd_init .text.wait_100us - 0x00000102 0x32 lcd_wait.o - 0x00000102 wait_100us - .text.main 0x00000134 0x14 main.o - 0x00000134 main - 0x00000148 . = ALIGN (0x2) + 0x00000128 0x32 lcd_wait.o + 0x00000128 wait_100us + .text.lcd_write_text + 0x0000015a 0x5c main.o + 0x0000015a lcd_write_text + .text.main 0x000001b6 0x84 main.o + 0x000001b6 main + 0x0000023a . = ALIGN (0x2) *(.fini9) - .fini9 0x00000148 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) - 0x00000148 _exit - 0x00000148 exit + .fini9 0x0000023a 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) + 0x0000023a _exit + 0x0000023a exit *(.fini9) *(.fini8) *(.fini8) @@ -278,36 +327,50 @@ END GROUP *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000148 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) + .fini0 0x0000023a 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr25/tiny-stack\libgcc.a(_exit.o) *(.fini0) - 0x0000014c _etext = . + 0x0000023e _etext = . -.data 0x00800060 0x0 load address 0x0000014c - [!provide] PROVIDE (__data_start, .) +.data 0x00800060 0x12 load address 0x0000023e + 0x00800060 PROVIDE (__data_start, .) *(.data) *(.data*) + .data.t1 0x00800060 0x11 main.o + 0x00800060 t1 *(.gnu.linkonce.d*) *(.rodata) *(.rodata*) *(.gnu.linkonce.r*) - 0x00800060 . = ALIGN (0x2) - 0x00800060 _edata = . - [!provide] PROVIDE (__data_end, .) + 0x00800072 . = ALIGN (0x2) + *fill* 0x00800071 0x1 + 0x00800072 _edata = . + 0x00800072 PROVIDE (__data_end, .) -.bss 0x00800060 0x0 - [!provide] PROVIDE (__bss_start, .) +.bss 0x00800072 0x6 + 0x00800072 PROVIDE (__bss_start, .) *(.bss) *(.bss*) + .bss.counter 0x00800072 0x2 main.o + 0x00800072 counter + .bss.clock_new_state + 0x00800074 0x1 main.o + 0x00800074 clock_new_state + .bss.clock_state + 0x00800075 0x1 main.o + 0x00800075 clock_state *(COMMON) - [!provide] PROVIDE (__bss_end, .) - 0x0000014c __data_load_start = LOADADDR (.data) - 0x0000014c __data_load_end = (__data_load_start + SIZEOF (.data)) + COMMON 0x00800076 0x2 main.o + 0x00800076 clock_old_state + 0x00800077 flags + 0x00800078 PROVIDE (__bss_end, .) + 0x0000023e __data_load_start = LOADADDR (.data) + 0x00000250 __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x00800060 0x0 +.noinit 0x00800078 0x0 [!provide] PROVIDE (__noinit_start, .) *(.noinit*) [!provide] PROVIDE (__noinit_end, .) - 0x00800060 _end = . + 0x00800078 _end = . [!provide] PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 @@ -374,59 +437,60 @@ END GROUP .debug_sfnames *(.debug_sfnames) -.debug_aranges 0x00000000 0x88 +.debug_aranges 0x00000000 0x90 *(.debug_aranges) .debug_aranges 0x00000000 0x48 lcd4.o .debug_aranges 0x00000048 0x20 lcd_wait.o .debug_aranges - 0x00000068 0x20 main.o + 0x00000068 0x28 main.o .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x915 +.debug_info 0x00000000 0xa9b *(.debug_info .gnu.linkonce.wi.*) .debug_info 0x00000000 0x456 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o .debug_info 0x00000456 0x31d lcd4.o .debug_info 0x00000773 0xa3 lcd_wait.o - .debug_info 0x00000816 0xff main.o + .debug_info 0x00000816 0x285 main.o -.debug_abbrev 0x00000000 0x631 +.debug_abbrev 0x00000000 0x6f0 *(.debug_abbrev) .debug_abbrev 0x00000000 0x41b C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o .debug_abbrev 0x0000041b 0xfe lcd4.o .debug_abbrev 0x00000519 0x72 lcd_wait.o - .debug_abbrev 0x0000058b 0xa6 main.o + .debug_abbrev 0x0000058b 0x165 main.o -.debug_line 0x00000000 0x517 +.debug_line 0x00000000 0x59a *(.debug_line .debug_line.* .debug_line_end) .debug_line 0x00000000 0x10c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o .debug_line 0x0000010c 0x291 lcd4.o .debug_line 0x0000039d 0xbd lcd_wait.o - .debug_line 0x0000045a 0xbd main.o + .debug_line 0x0000045a 0x140 main.o -.debug_frame 0x00000000 0xf4 +.debug_frame 0x00000000 0x120 *(.debug_frame) .debug_frame 0x00000000 0x9c lcd4.o .debug_frame 0x0000009c 0x34 lcd_wait.o - .debug_frame 0x000000d0 0x24 main.o + .debug_frame 0x000000d0 0x50 main.o -.debug_str 0x00000000 0x35c +.debug_str 0x00000000 0x446 *(.debug_str) .debug_str 0x00000000 0x17b C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o .debug_str 0x0000017b 0x1c0 lcd4.o 0x1fd (size before relaxing) .debug_str 0x0000033b 0x10 lcd_wait.o 0x166 (size before relaxing) - .debug_str 0x0000034b 0x11 main.o - 0x1ad (size before relaxing) + .debug_str 0x0000034b 0xfb main.o + 0x2a9 (size before relaxing) -.debug_loc 0x00000000 0x28c +.debug_loc 0x00000000 0x3bb *(.debug_loc) .debug_loc 0x00000000 0x244 lcd4.o .debug_loc 0x00000244 0x48 lcd_wait.o + .debug_loc 0x0000028c 0x12f main.o .debug_macinfo *(.debug_macinfo) @@ -446,11 +510,11 @@ END GROUP .debug_pubtypes *(.debug_pubtypes) -.debug_ranges 0x00000000 0x58 +.debug_ranges 0x00000000 0x78 *(.debug_ranges) .debug_ranges 0x00000000 0x38 lcd4.o .debug_ranges 0x00000038 0x10 lcd_wait.o - .debug_ranges 0x00000048 0x10 main.o + .debug_ranges 0x00000048 0x30 main.o .debug_macro *(.debug_macro) diff --git a/Debug/AtTiny_alarm_clock.srec b/Debug/AtTiny_alarm_clock.srec index 237ac8e..52486b7 100644 --- a/Debug/AtTiny_alarm_clock.srec +++ b/Debug/AtTiny_alarm_clock.srec @@ -1,23 +1,40 @@ S01A0000417454696E795F616C61726D5F636C6F636B2E73726563DA -S113000014C019C018C017C016C015C014C013C03E -S113001012C011C010C00FC00EC00DC00CC00BC068 -S11300200AC009C008C007C006C011241FBECFED16 -S1130030CDBF80D089C0E4CFCF93C2E362D0C1509A -S1130040E9F7CF910895CF93C62F843038F48230E6 -S113005048F4882371F0813049F00CC0843051F4A5 -S1130060939808C04F73833009F4405C842F8068F0 -S113007024D0939A929A929A98B39F708C2F807FEF -S1130080982B98BB98B39F70892B88BB92989298B1 -S113009038D087B3803F79F4929A929A88B3C29504 -S11300A0C07F8F708C2B88BB88B38F70C82BC8BB64 -S11300B09298929826D0CF91089540E0682F84E0DA -S11300C0C2DF08958FEF87BB8B9A8A9A88BB939A75 -S11300D0929AB2DFB1DFB0DF80E3EFDFADDF80E320 -S11300E0ECDF0FD080E3E9DF88E2E7DF87B3807FCE -S11300F087BB8CE0E2DF86E0E0DF82E0DEDF9CDFCE -S11301000895CF93DF931F92CDB7DD2784E48983CD -S113011089819FEF980F9983882341F08981898190 -S113012089819FEF980F99838111F8CF0F90DF9108 -S1130130CF9108958FEF87BB8AEA88BBC3DF40E085 -S10F014061E480E080DFFFCFF894FFCF83 +S113000014C02CC02BC02AC029C028C027C026C0B9 +S113001025C024C023C022C021C020C01FC01EC0D0 +S11300201DC01CC01BC01AC019C011241FBECFEDB7 +S1130030CDBF10E0A0E6B0E0EEE3F2E002C0059030 +S11300400D92A237B107D9F720E0A2E7B0E001C0D2 +S11300501D92A837B207E1F7AED0EFC0D1CFCF934E +S1130060C2E362D0C150E9F7CF910895CF93C62F70 +S1130070843038F4823048F4882371F0813049F0B8 +S11300800CC0843051F4939808C04F73833009F442 +S1130090405C842F806824D0939A929A929A98B361 +S11300A09F708C2F807F982B98BB98B39F70892B5F +S11300B088BB9298929838D087B3803F79F4929A0B +S11300C0929A88B3C295C07F8F708C2B88BB88B3FB +S11300D08F70C82BC8BB9298929826D0CF91089560 +S11300E040E0682F84E0C2DF08958FEF87BB8B9ACE +S11300F08A9A88BB939A929AB2DFB1DFB0DF80E329 +S1130100EFDFADDF80E3ECDF0FD080E3E9DF88E2EF +S1130110E7DF87B3807F87BB8CE0E2DF86E0E0DF48 +S113012082E0DEDF9CDF0895CF93DF931F92CDB78B +S1130130DD2784E4898389819FEF980F998388233D +S113014041F08981898189819FEF980F9983811179 +S1130150F8CF0F90DF91CF910895EF92FF920F9314 +S11301601F93CF937C01892B29F081E0E816F104D9 +S113017031F00AC06894EE24E1F8F12C05C00F2E8A +S1130180F3E0EF2EF12CF02DFA0160816F3569F068 +S11301908A010F5F1F4FC0E04C2F8E2D67DFF801DF +S11301A061918F01CF5F6F35B9F7CF911F910F9197 +S11301B0FF90EF90089511BAC2E7D0E080917400E7 +S11301C0882319F0813051F0FBCF109275008DDF38 +S11301D081E086DF81E080937400F0CF81E080933A +S11301E0750040E650E060E070E080E090E0B5DF4C +S11301F090B380917700937021E0933009F020E070 +S1130200982F91702917A1F090B39370933069F4EB +S113021081608093770080917200909173000196C1 +S1130220909373008093720003C08E7F8093770055 +S11102308881805D80936000C1CFF894FFCF79 +S113023E2048616C6C6F5F5F5F5F5F5F5F5F5F5FE6 +S105024E5F004B S9030000FC diff --git a/Debug/main.d b/Debug/main.d index 00d29bf..9b43f08 100644 --- a/Debug/main.d +++ b/Debug/main.d @@ -10,6 +10,8 @@ main.d main.o: .././main.c \ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdlib.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ .././lcd4.h c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: @@ -34,4 +36,8 @@ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdlib.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + .././lcd4.h: diff --git a/Debug/main.o b/Debug/main.o index 35c5b89ed7c5318198c4edaf5d3c7aff9a8bcf23..a50e91a1f3bdc85cc192fcd483d01db7228e3aa3 100644 GIT binary patch literal 7300 zcmbW6YiwM_6~|}xuGe<#tY3LTNH(bh3B(&a4+tSICpM13IL2{kNewsa-L<{2-gS4^ zghXxPgp{`uJLXmBLlt}hsgx?Ts^}L}RZxjaL@lkVmbR{{BA_ZsfFcSX(*J+%ne}y&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21@kYv(Po>so$Vj43y}(XP{@} z=8&X5*f=gfVI4OC)@uN1G5&n0XUb}OE(Ff<^@ES!H1lx@(|ohQS-uCs_cd%<^xPR3 zvV7y<;~X*{mpIM$1~9J~Kx6p{e4lC(=nT2Nr$+5J3j)4#E!yuA44LJ08Ge1*2_wg4 z`52AyI2y~@O#Zk&^Blhe#`^66(k1xu-%2ey7LV9^TYd(?K^VEdb4_DD&O6^tmTx^C L$z!l-(R_ac1<0M< diff --git a/main.c b/main.c index 32456fd..f8a47c6 100644 --- a/main.c +++ b/main.c @@ -6,19 +6,82 @@ */ #include +#include #include "lcd4.h" +#define butt1 0 + +typedef enum {CLOCK_INIT = 0, CLOCK_IDLE, CLOCK_ALARM, CLOCK_STOPWATCH_RUNNING, CLOCK_STOPWATCH_STOPPED, CLOCK_STOPWATCH_NOT_SET, CLOCK_USER_INPUT, CLOCK_SET_TIME} clock_state_e; + +clock_state_e clock_old_state; +clock_state_e clock_state = CLOCK_INIT; +clock_state_e clock_new_state = CLOCK_INIT; + +uint8_t t1[] = {' ','H','a','l','l','o','_','_','_','_','_','_','_','_','_','_','_'}; +int counter = 0; + +uint8_t flags; int main(void) { - DDRB = 0xff; - PORTB = 0xAA; - lcd_init(); - lcd_write(here, 0x41, 0); + DDRD = 0x00; + + + /* Replace with your application code */ while (1) { - + clock_state = clock_new_state; + switch(clock_state){ + case CLOCK_INIT: + //do some init stuff... + lcd_init(); //I know, it's just c but I don't care + lcd_instruct(lcd_DISPLAY_CLEAR); + //INIT done -> change to IDLE + clock_new_state = CLOCK_IDLE; + + break; + + case CLOCK_IDLE: + //IDLE MODE + + //print the IDLE Screen + + lcd_write_text(0,0,t1); + + if(((PIND & 0x03) == 3) != (flags & 1<