From e53b583fd26c829f27370b711c74e684d7c24ddf Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Mon, 16 Jul 2018 17:18:54 +0200 Subject: [PATCH] 2 --- Debug/AtTiny_alarm_clock.elf | Bin 10792 -> 10668 bytes Debug/AtTiny_alarm_clock.hex | 45 ++-- Debug/AtTiny_alarm_clock.lss | 380 ++++++++++++++++------------------ Debug/AtTiny_alarm_clock.map | 132 +++++------- Debug/AtTiny_alarm_clock.srec | 45 ++-- Debug/main.o | Bin 3412 -> 3288 bytes main.c | 2 +- 7 files changed, 281 insertions(+), 323 deletions(-) diff --git a/Debug/AtTiny_alarm_clock.elf b/Debug/AtTiny_alarm_clock.elf index 58d1c61878fd49fa8e52226c54b46dc49cfe7ee4..fda6dce5e8541cd16cc8a9b7b40718a3db15a657 100644 GIT binary patch delta 2229 zcmZ8jZD^ZS6u$RO(|j~-(l%@MVV9&|Nwm1yl~U>~>nyd_ieFVhlrC6m%gWql|L7*E zh(Cmaqj$nAO1mH1gt@^C8(Lwz9r>Z6w3DGz#@0y%hgB$o%*l+;^Y(q~+Z;H#&vVYX z=bZO`wIBC?^337bp2ma_n}iT8A||9rijXM9C`3QhmOdD$ZWs(`SZ~rBbwpR`4LYnV zb%ie1Asy6Zx>N^riS}!s_G*tV*5!543-iB!dvSc>UA=U6&L;!urSZk_8~OR$NAmOP zC)uO|#*^_jBrSv5(hV>MorU_LIrXNIkcK*LMBOcDB%J-qC~>DajiD5I4L{x;_}K;Z zjR^Tr6F?2r-=Xe$9(OZxRz2Zu?>+$Z2GaN^0fH`o^A->RSpzP6BunR@uF04oFCw_) zEHBN1Jn%r01^HxupEQ>zqi3v3k2CB>v|DaCWj4glki`+oj+U7 zdWUlfHue|%)pG9o-x*wnt(WPZvyDj+{L2a)S+&U>B6!C#9kNWVBKWUmde1U7W0kXC z_@vy%Z{Z4e!6QFHSaATX5$eH`7Sm!(fT4BBKk7ICnfn>v12xxxEqgn_2z=cDD*%2u zESvmt$nbV%=Sm_T*{Xi5*e;t@Y2_)|rarISExXm`@CiAq=E7Anm%SR^BeCIKRhMLo z@b^)dCOjJ1ma-2?XPN6mbSnZ-ihXEoo>Rvn4f_;Q zhq?rIn1K06u->aeBM+2Ic$=pQI-pXFa@YxViHXcKL6`b+%W#JCdrUJD60nhV2^p~$ zD#b7d`isP$a(EiR6b9^vN-@OYs0l|o%s|~@LbTLP6Y{(kW9kq%Af?^>fFU3$205%I z8l;cHY8r~-9Og_o#383{-Sb0+J6{Af*Mp$gA}#{2MT!V`BpBu<;O-k@f^UN{s9qvVaJlg5BK88rZc9*<^F#1vLI zRS+?KG#{{VLO_BXgKG2|;UL}pz;5Es=sVKXnT zqk#tt{EvV;8+x{Yr@?Pn6y;9$$X6qNTCmWJdEhIuu^<%1iaG8b~DRC&jjODpV zGb9eNDgGlcct$;tOc)DNy^w5>A@x==;XaC-8`SA!tvszR!+E`2-AOhWx2sf5 zs=-)}sNPhA>{0tu3FAt&ngThf=2D5Bja%__;;9HCZ4An-4?%rUdsP6%Xzl7BK4Oa9 F+J8yuGNu3k delta 2321 zcmZ8hZERCz6h7}QcWcYGmUXs+jkfz>ZIQ(B5n_m%fJO;lQ5a|pp&Qh>g~?F&2PGDR zi3DauUi@K#*??$BG)yw(mw^{!;vaM)F)|i}5s^eelPL%x(fT}hw{Yo6&V8Tfob#S@ z?)&xmx?^qollfyQk(na0NRnbnTEbE(3cL?mlpG9H8wLwX{}?{)vdgj4MlExFHKy4# znMTuKk|tr|X11v}b!L{CX=+W(M9o8{#zaiDnPFx$HYZMv{PF$i@WkM?FD9;Do1CzW zy}$Cnk;Ny`~lBQ)5i&y=sW z89AyW{v}WE0eS;zg2wkP6iZu9hp79*6o4BrSCs!PEc6`l#hhx)!u@OlyDB zN`};eI$<9nBKSKjhoQk6MewH!LVp3Ut{-t#s>|}XO7LdUc}J^2Wb0i}b`<*0ja_y> zHe_Kg=Wi(5(h{n0ZQWBg^_Yahu4$)hS}dU&*Yv(?S|Gvba6X{aBW#{a`V>6sV-ziG z1X~6z#~PN=V)cWeSI8|r6g-}0d^^$KIbGAb4@gu20p^)!)`VnrEg>P5@F9u%!o5 zGvXbnk}eMPPm{k@*8qSc40so+q?5yO2lj9{3ALqP7BvqLo`sfSY9}}#Wr_1EJAsts zI7}tV(MMsmpP(qt;k*MoIgIPC>d)tSC}wekxiSRxF7Xk>T{4Y;r-flQ0S|^H{d{B` z;R^FVV0M(4wW+*0#oJT#!$gTXSBlAs;+(kQhWKTb-+a%koZPG2m?SE^49psQJF3B7 z#W+~N2NIUa0x$kthmk8e1k6{FLVgsZH{Xzl(|=lIwRGN_Fj*M!1h4`Akhj2%68~-R z`voTp`eL#f7eqBAmU`>1LVRq|0H: 0: 14 c0 rjmp .+40 ; 0x2a <__ctors_end> - 2: 24 c0 rjmp .+72 ; 0x4c <__bad_interrupt> - 4: 23 c0 rjmp .+70 ; 0x4c <__bad_interrupt> - 6: 22 c0 rjmp .+68 ; 0x4c <__bad_interrupt> - 8: 21 c0 rjmp .+66 ; 0x4c <__bad_interrupt> - a: 20 c0 rjmp .+64 ; 0x4c <__bad_interrupt> - c: 1f c0 rjmp .+62 ; 0x4c <__bad_interrupt> - e: 1e c0 rjmp .+60 ; 0x4c <__bad_interrupt> - 10: 1d c0 rjmp .+58 ; 0x4c <__bad_interrupt> - 12: 1c c0 rjmp .+56 ; 0x4c <__bad_interrupt> - 14: 1b c0 rjmp .+54 ; 0x4c <__bad_interrupt> - 16: 1a c0 rjmp .+52 ; 0x4c <__bad_interrupt> - 18: 19 c0 rjmp .+50 ; 0x4c <__bad_interrupt> - 1a: 18 c0 rjmp .+48 ; 0x4c <__bad_interrupt> - 1c: 17 c0 rjmp .+46 ; 0x4c <__bad_interrupt> - 1e: 16 c0 rjmp .+44 ; 0x4c <__bad_interrupt> - 20: 15 c0 rjmp .+42 ; 0x4c <__bad_interrupt> - 22: 14 c0 rjmp .+40 ; 0x4c <__bad_interrupt> - 24: 13 c0 rjmp .+38 ; 0x4c <__bad_interrupt> - 26: 12 c0 rjmp .+36 ; 0x4c <__bad_interrupt> - 28: 11 c0 rjmp .+34 ; 0x4c <__bad_interrupt> + 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> 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> -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: e4 e6 ldi r30, 0x64 ; 100 - 3a: f1 e0 ldi r31, 0x01 ; 1 - 3c: 02 c0 rjmp .+4 ; 0x42 <__SREG__+0x3> - 3e: 05 90 lpm r0, Z+ - 40: 0d 92 st X+, r0 - 42: a2 36 cpi r26, 0x62 ; 98 - 44: b1 07 cpc r27, r17 - 46: d9 f7 brne .-10 ; 0x3e <__SP_L__+0x1> - 48: 80 d0 rcall .+256 ; 0x14a
- 4a: 8a c0 rjmp .+276 ; 0x160 <_exit> +00000036 <__bad_interrupt>: + 36: e4 cf rjmp .-56 ; 0x0 <__vectors> -0000004c <__bad_interrupt>: - 4c: d9 cf rjmp .-78 ; 0x0 <__vectors> - -0000004e : +00000038 : void lcd_1s(void){ for(uint8_t i=200;i>0;i--){ lcd_5ms(); } } - 4e: cf 93 push r28 - 50: c2 e3 ldi r28, 0x32 ; 50 - 52: 62 d0 rcall .+196 ; 0x118 - 54: c1 50 subi r28, 0x01 ; 1 - 56: e9 f7 brne .-6 ; 0x52 - 58: cf 91 pop r28 - 5a: 08 95 ret + 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 -0000005c : +00000046 : void lcd_instruct(uint8_t zeichen){ lcd_write(instruct,zeichen,0); } void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){ - 5c: cf 93 push r28 - 5e: c6 2f mov r28, r22 + 46: cf 93 push r28 + 48: c6 2f mov r28, r22 switch (lcd_whichwrite){ - 60: 84 30 cpi r24, 0x04 ; 4 - 62: 38 f4 brcc .+14 ; 0x72 - 64: 82 30 cpi r24, 0x02 ; 2 - 66: 48 f4 brcc .+18 ; 0x7a - 68: 88 23 and r24, r24 - 6a: 71 f0 breq .+28 ; 0x88 - 6c: 81 30 cpi r24, 0x01 ; 1 - 6e: 49 f0 breq .+18 ; 0x82 - 70: 0c c0 rjmp .+24 ; 0x8a - 72: 84 30 cpi r24, 0x04 ; 4 - 74: 51 f4 brne .+20 ; 0x8a + 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 case instruct : unset_lcd_RS; - 76: 93 98 cbi 0x12, 3 ; 18 + 60: 93 98 cbi 0x12, 3 ; 18 break; - 78: 08 c0 rjmp .+16 ; 0x8a + 62: 08 c0 rjmp .+16 ; 0x74 case line2: case line1: position = position & 0x3f; - 7a: 4f 73 andi r20, 0x3F ; 63 + 64: 4f 73 andi r20, 0x3F ; 63 if (lcd_whichwrite == line2){ position=position + 0x40; }; - 7c: 83 30 cpi r24, 0x03 ; 3 - 7e: 09 f4 brne .+2 ; 0x82 - 80: 40 5c subi r20, 0xC0 ; 192 + 66: 83 30 cpi r24, 0x03 ; 3 + 68: 09 f4 brne .+2 ; 0x6c + 6a: 40 5c subi r20, 0xC0 ; 192 case therepos: lcd_instruct(lcd_mask_Write_Adress(position)); - 82: 84 2f mov r24, r20 - 84: 80 68 ori r24, 0x80 ; 128 - 86: 24 d0 rcall .+72 ; 0xd0 + 6c: 84 2f mov r24, r20 + 6e: 80 68 ori r24, 0x80 ; 128 + 70: 24 d0 rcall .+72 ; 0xba case here: set_lcd_RS; - 88: 93 9a sbi 0x12, 3 ; 18 + 72: 93 9a sbi 0x12, 3 ; 18 break; } set_lcd_E; - 8a: 92 9a sbi 0x12, 2 ; 18 + 74: 92 9a sbi 0x12, 2 ; 18 set_lcd_E; - 8c: 92 9a sbi 0x12, 2 ; 18 + 76: 92 9a sbi 0x12, 2 ; 18 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - 8e: 98 b3 in r25, 0x18 ; 24 - 90: 9f 70 andi r25, 0x0F ; 15 - 92: 8c 2f mov r24, r28 - 94: 80 7f andi r24, 0xF0 ; 240 - 96: 98 2b or r25, r24 - 98: 98 bb out 0x18, r25 ; 24 + 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 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - 9a: 98 b3 in r25, 0x18 ; 24 - 9c: 9f 70 andi r25, 0x0F ; 15 - 9e: 89 2b or r24, r25 - a0: 88 bb out 0x18, r24 ; 24 + 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 unset_lcd_E; - a2: 92 98 cbi 0x12, 2 ; 18 + 8c: 92 98 cbi 0x12, 2 ; 18 unset_lcd_E; - a4: 92 98 cbi 0x12, 2 ; 18 + 8e: 92 98 cbi 0x12, 2 ; 18 wait_100us(); - a6: 38 d0 rcall .+112 ; 0x118 + 90: 38 d0 rcall .+112 ; 0x102 if (lcd_dataport_DDR==0xf0){ - a8: 87 b3 in r24, 0x17 ; 23 - aa: 80 3f cpi r24, 0xF0 ; 240 - ac: 79 f4 brne .+30 ; 0xcc + 92: 87 b3 in r24, 0x17 ; 23 + 94: 80 3f cpi r24, 0xF0 ; 240 + 96: 79 f4 brne .+30 ; 0xb6 zeichen=zeichen << 4; set_lcd_E; - ae: 92 9a sbi 0x12, 2 ; 18 + 98: 92 9a sbi 0x12, 2 ; 18 set_lcd_E; - b0: 92 9a sbi 0x12, 2 ; 18 + 9a: 92 9a sbi 0x12, 2 ; 18 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - b2: 88 b3 in r24, 0x18 ; 24 - b4: c2 95 swap r28 - b6: c0 7f andi r28, 0xF0 ; 240 - b8: 8f 70 andi r24, 0x0F ; 15 - ba: 8c 2b or r24, r28 - bc: 88 bb out 0x18, r24 ; 24 + 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 lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; - be: 88 b3 in r24, 0x18 ; 24 - c0: 8f 70 andi r24, 0x0F ; 15 - c2: c8 2b or r28, r24 - c4: c8 bb out 0x18, r28 ; 24 + 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 unset_lcd_E; - c6: 92 98 cbi 0x12, 2 ; 18 + b0: 92 98 cbi 0x12, 2 ; 18 unset_lcd_E; - c8: 92 98 cbi 0x12, 2 ; 18 + b2: 92 98 cbi 0x12, 2 ; 18 wait_100us(); - ca: 26 d0 rcall .+76 ; 0x118 + b4: 26 d0 rcall .+76 ; 0x102 } } - cc: cf 91 pop r28 - ce: 08 95 ret + b6: cf 91 pop r28 + b8: 08 95 ret -000000d0 : +000000ba : lcd_5ms(); } } void lcd_instruct(uint8_t zeichen){ lcd_write(instruct,zeichen,0); - d0: 40 e0 ldi r20, 0x00 ; 0 - d2: 68 2f mov r22, r24 - d4: 84 e0 ldi r24, 0x04 ; 4 - d6: c2 df rcall .-124 ; 0x5c - d8: 08 95 ret + 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 -000000da : +000000c4 : void lcd_init(void){ /* setting up ports first */ lcd_dataport_DDR=0xff; - da: 8f ef ldi r24, 0xFF ; 255 - dc: 87 bb out 0x17, r24 ; 23 + c4: 8f ef ldi r24, 0xFF ; 255 + c6: 87 bb out 0x17, r24 ; 23 set_lcd_RS_DDR; - de: 8b 9a sbi 0x11, 3 ; 17 + c8: 8b 9a sbi 0x11, 3 ; 17 set_lcd_E_DDR; - e0: 8a 9a sbi 0x11, 2 ; 17 + ca: 8a 9a sbi 0x11, 2 ; 17 /* end setting up ports */ lcd_dataport=0xff; - e2: 88 bb out 0x18, r24 ; 24 + cc: 88 bb out 0x18, r24 ; 24 set_lcd_RS; - e4: 93 9a sbi 0x12, 3 ; 18 + ce: 93 9a sbi 0x12, 3 ; 18 set_lcd_E; - e6: 92 9a sbi 0x12, 2 ; 18 + d0: 92 9a sbi 0x12, 2 ; 18 lcd_5ms(); - e8: b2 df rcall .-156 ; 0x4e + d2: b2 df rcall .-156 ; 0x38 lcd_5ms(); - ea: b1 df rcall .-158 ; 0x4e + d4: b1 df rcall .-158 ; 0x38 lcd_5ms(); - ec: b0 df rcall .-160 ; 0x4e + d6: b0 df rcall .-160 ; 0x38 lcd_instruct(lcd_SET_FUNCTION_8BIT); - ee: 80 e3 ldi r24, 0x30 ; 48 - f0: ef df rcall .-34 ; 0xd0 + d8: 80 e3 ldi r24, 0x30 ; 48 + da: ef df rcall .-34 ; 0xba lcd_5ms(); - f2: ad df rcall .-166 ; 0x4e + dc: ad df rcall .-166 ; 0x38 lcd_instruct(lcd_SET_FUNCTION_8BIT); - f4: 80 e3 ldi r24, 0x30 ; 48 - f6: ec df rcall .-40 ; 0xd0 + de: 80 e3 ldi r24, 0x30 ; 48 + e0: ec df rcall .-40 ; 0xba wait_100us(); - f8: 0f d0 rcall .+30 ; 0x118 + e2: 0f d0 rcall .+30 ; 0x102 lcd_instruct(lcd_SET_FUNCTION_8BIT); - fa: 80 e3 ldi r24, 0x30 ; 48 - fc: e9 df rcall .-46 ; 0xd0 + e4: 80 e3 ldi r24, 0x30 ; 48 + e6: e9 df rcall .-46 ; 0xba if (lcd_dataport_mask==0xf0){ lcd_instruct(lcd_SET_FUNCTION_4BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); - fe: 88 e2 ldi r24, 0x28 ; 40 - 100: e7 df rcall .-50 ; 0xd0 + e8: 88 e2 ldi r24, 0x28 ; 40 + ea: e7 df rcall .-50 ; 0xba }else{ lcd_instruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); } lcd_dataport_DDR&=lcd_dataport_mask; - 102: 87 b3 in r24, 0x17 ; 23 - 104: 80 7f andi r24, 0xF0 ; 240 - 106: 87 bb out 0x17, r24 ; 23 + ec: 87 b3 in r24, 0x17 ; 23 + ee: 80 7f andi r24, 0xF0 ; 240 + f0: 87 bb out 0x17, r24 ; 23 lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF); - 108: 8c e0 ldi r24, 0x0C ; 12 - 10a: e2 df rcall .-60 ; 0xd0 + f2: 8c e0 ldi r24, 0x0C ; 12 + f4: e2 df rcall .-60 ; 0xba lcd_instruct(lcd_ENTRY_MODE_SET|lcd_ENTRY_MODE_SET_INCREASE | lcd_ENTRY_MS_DISPLAY_NOT_S); - 10c: 86 e0 ldi r24, 0x06 ; 6 - 10e: e0 df rcall .-64 ; 0xd0 + f6: 86 e0 ldi r24, 0x06 ; 6 + f8: e0 df rcall .-64 ; 0xba lcd_instruct(lcd_RETURN_HOME); - 110: 82 e0 ldi r24, 0x02 ; 2 - 112: de df rcall .-68 ; 0xd0 + fa: 82 e0 ldi r24, 0x02 ; 2 + fc: de df rcall .-68 ; 0xba lcd_5ms(); - 114: 9c df rcall .-200 ; 0x4e - 116: 08 95 ret + fe: 9c df rcall .-200 ; 0x38 + 100: 08 95 ret -00000118 : +00000102 : #include #include #include "lcd4.h" void wait_100us(void){ - 118: cf 93 push r28 - 11a: df 93 push r29 - 11c: 1f 92 push r1 - 11e: cd b7 in r28, 0x3d ; 61 - 120: dd 27 eor r29, r29 + 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 for (volatile uint8_t i=68;i--;i>0){ - 122: 84 e4 ldi r24, 0x44 ; 68 - 124: 89 83 std Y+1, r24 ; 0x01 - 126: 89 81 ldd r24, Y+1 ; 0x01 - 128: 9f ef ldi r25, 0xFF ; 255 - 12a: 98 0f add r25, r24 - 12c: 99 83 std Y+1, r25 ; 0x01 - 12e: 88 23 and r24, r24 - 130: 41 f0 breq .+16 ; 0x142 + 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 i; - 132: 89 81 ldd r24, Y+1 ; 0x01 + 11c: 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){ - 134: 89 81 ldd r24, Y+1 ; 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: 81 11 cpse r24, r1 - 140: f8 cf rjmp .-16 ; 0x132 + 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 i; } } - 142: 0f 90 pop r0 - 144: df 91 pop r29 - 146: cf 91 pop r28 - 148: 08 95 ret + 12c: 0f 90 pop r0 + 12e: df 91 pop r29 + 130: cf 91 pop r28 + 132: 08 95 ret -0000014a
: +00000134
: #include "lcd4.h" int main(void) { DDRB = 0xff; - 14a: 8f ef ldi r24, 0xFF ; 255 - 14c: 87 bb out 0x17, r24 ; 23 + 134: 8f ef ldi r24, 0xFF ; 255 + 136: 87 bb out 0x17, r24 ; 23 PORTB = 0xAA; - 14e: 8a ea ldi r24, 0xAA ; 170 - 150: 88 bb out 0x18, r24 ; 24 + 138: 8a ea ldi r24, 0xAA ; 170 + 13a: 88 bb out 0x18, r24 ; 24 lcd_init(); - 152: c3 df rcall .-122 ; 0xda - lcd_write(here, "t", 0); - 154: 40 e0 ldi r20, 0x00 ; 0 - 156: 60 e6 ldi r22, 0x60 ; 96 - 158: 70 e0 ldi r23, 0x00 ; 0 - 15a: 80 e0 ldi r24, 0x00 ; 0 - 15c: 7f df rcall .-258 ; 0x5c - 15e: ff cf rjmp .-2 ; 0x15e + 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 -00000160 <_exit>: - 160: f8 94 cli +00000148 <_exit>: + 148: f8 94 cli -00000162 <__stop_program>: - 162: ff cf rjmp .-2 ; 0x162 <__stop_program> +0000014a <__stop_program>: + 14a: ff cf rjmp .-2 ; 0x14a <__stop_program> diff --git a/Debug/AtTiny_alarm_clock.map b/Debug/AtTiny_alarm_clock.map index 8ef467d..ff56a98 100644 --- a/Debug/AtTiny_alarm_clock.map +++ b/Debug/AtTiny_alarm_clock.map @@ -2,8 +2,6 @@ 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) Discarded input sections @@ -37,22 +35,6 @@ 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) Memory Configuration @@ -179,7 +161,7 @@ END GROUP .rela.plt *(.rela.plt) -.text 0x00000000 0x164 +.text 0x00000000 0x14c *(.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 @@ -220,8 +202,6 @@ 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) *(.init5) *(.init5) @@ -232,54 +212,54 @@ END GROUP *(.init8) *(.init8) *(.init9) - .init9 0x00000048 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 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) *(.text) - .text 0x0000004c 0x2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o - 0x0000004c __vector_1 - 0x0000004c __vector_12 - 0x0000004c __bad_interrupt - 0x0000004c __vector_6 - 0x0000004c __vector_3 - 0x0000004c __vector_11 - 0x0000004c __vector_13 - 0x0000004c __vector_17 - 0x0000004c __vector_19 - 0x0000004c __vector_7 - 0x0000004c __vector_5 - 0x0000004c __vector_4 - 0x0000004c __vector_9 - 0x0000004c __vector_2 - 0x0000004c __vector_15 - 0x0000004c __vector_8 - 0x0000004c __vector_14 - 0x0000004c __vector_10 - 0x0000004c __vector_16 - 0x0000004c __vector_18 - 0x0000004c __vector_20 - 0x0000004e . = ALIGN (0x2) + .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.*) - .text.lcd_5ms 0x0000004e 0xe lcd4.o - 0x0000004e lcd_5ms + .text.lcd_5ms 0x00000038 0xe lcd4.o + 0x00000038 lcd_5ms .text.lcd_write - 0x0000005c 0x74 lcd4.o - 0x0000005c lcd_write + 0x00000046 0x74 lcd4.o + 0x00000046 lcd_write .text.lcd_instruct - 0x000000d0 0xa lcd4.o - 0x000000d0 lcd_instruct + 0x000000ba 0xa lcd4.o + 0x000000ba lcd_instruct .text.lcd_init - 0x000000da 0x3e lcd4.o - 0x000000da lcd_init + 0x000000c4 0x3e lcd4.o + 0x000000c4 lcd_init .text.wait_100us - 0x00000118 0x32 lcd_wait.o - 0x00000118 wait_100us - .text.main 0x0000014a 0x16 main.o - 0x0000014a main - 0x00000160 . = ALIGN (0x2) + 0x00000102 0x32 lcd_wait.o + 0x00000102 wait_100us + .text.main 0x00000134 0x14 main.o + 0x00000134 main + 0x00000148 . = ALIGN (0x2) *(.fini9) - .fini9 0x00000160 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) - 0x00000160 _exit - 0x00000160 exit + .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) *(.fini8) *(.fini8) @@ -298,38 +278,36 @@ END GROUP *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000160 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 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) - 0x00000164 _etext = . + 0x0000014c _etext = . -.data 0x00800060 0x2 load address 0x00000164 - 0x00800060 PROVIDE (__data_start, .) +.data 0x00800060 0x0 load address 0x0000014c + [!provide] PROVIDE (__data_start, .) *(.data) *(.data*) *(.gnu.linkonce.d*) *(.rodata) *(.rodata*) - .rodata.str1.1 - 0x00800060 0x2 main.o *(.gnu.linkonce.r*) - 0x00800062 . = ALIGN (0x2) - 0x00800062 _edata = . - 0x00800062 PROVIDE (__data_end, .) + 0x00800060 . = ALIGN (0x2) + 0x00800060 _edata = . + [!provide] PROVIDE (__data_end, .) -.bss 0x00800062 0x0 +.bss 0x00800060 0x0 [!provide] PROVIDE (__bss_start, .) *(.bss) *(.bss*) *(COMMON) [!provide] PROVIDE (__bss_end, .) - 0x00000164 __data_load_start = LOADADDR (.data) - 0x00000166 __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x0000014c __data_load_start = LOADADDR (.data) + 0x0000014c __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x00800062 0x0 +.noinit 0x00800060 0x0 [!provide] PROVIDE (__noinit_start, .) *(.noinit*) [!provide] PROVIDE (__noinit_end, .) - 0x00800062 _end = . + 0x00800060 _end = . [!provide] PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 @@ -408,12 +386,12 @@ END GROUP .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x90f +.debug_info 0x00000000 0x915 *(.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 0xf9 main.o + .debug_info 0x00000816 0xff main.o .debug_abbrev 0x00000000 0x631 *(.debug_abbrev) diff --git a/Debug/AtTiny_alarm_clock.srec b/Debug/AtTiny_alarm_clock.srec index 8797bdf..237ac8e 100644 --- a/Debug/AtTiny_alarm_clock.srec +++ b/Debug/AtTiny_alarm_clock.srec @@ -1,26 +1,23 @@ S01A0000417454696E795F616C61726D5F636C6F636B2E73726563DA -S113000014C024C023C022C021C020C01FC01EC0F1 -S11300101DC01CC01BC01AC019C018C017C016C010 -S113002015C014C013C012C011C011241FBECFEDDF -S1130030CDBF10E0A0E6B0E0E4E6F1E002C0059038 -S11300400D92A236B107D9F780D08AC0D9CFCF9309 -S1130050C2E362D0C150E9F7CF910895CF93C62F80 -S1130060843038F4823048F4882371F0813049F0C8 -S11300700CC0843051F4939808C04F73833009F452 -S1130080405C842F806824D0939A929A929A98B371 -S11300909F708C2F807F982B98BB98B39F70892B6F -S11300A088BB9298929838D087B3803F79F4929A1B -S11300B0929A88B3C295C07F8F708C2B88BB88B30B -S11300C08F70C82BC8BB9298929826D0CF91089570 -S11300D040E0682F84E0C2DF08958FEF87BB8B9ADE -S11300E08A9A88BB939A929AB2DFB1DFB0DF80E339 -S11300F0EFDFADDF80E3ECDF0FD080E3E9DF88E200 -S1130100E7DF87B3807F87BB8CE0E2DF86E0E0DF58 -S113011082E0DEDF9CDF0895CF93DF931F92CDB79B -S1130120DD2784E4898389819FEF980F998388234D -S113013041F08981898189819FEF980F9983811189 -S1130140F8CF0F90DF91CF9108958FEF87BB8AEAA4 -S113015088BBC3DF40E060E670E080E07FDFFFCF74 -S1070160F894FFCF3D -S1050164740021 +S113000014C019C018C017C016C015C014C013C03E +S113001012C011C010C00FC00EC00DC00CC00BC068 +S11300200AC009C008C007C006C011241FBECFED16 +S1130030CDBF80D089C0E4CFCF93C2E362D0C1509A +S1130040E9F7CF910895CF93C62F843038F48230E6 +S113005048F4882371F0813049F00CC0843051F4A5 +S1130060939808C04F73833009F4405C842F8068F0 +S113007024D0939A929A929A98B39F708C2F807FEF +S1130080982B98BB98B39F70892B88BB92989298B1 +S113009038D087B3803F79F4929A929A88B3C29504 +S11300A0C07F8F708C2B88BB88B38F70C82BC8BB64 +S11300B09298929826D0CF91089540E0682F84E0DA +S11300C0C2DF08958FEF87BB8B9A8A9A88BB939A75 +S11300D0929AB2DFB1DFB0DF80E3EFDFADDF80E320 +S11300E0ECDF0FD080E3E9DF88E2E7DF87B3807FCE +S11300F087BB8CE0E2DF86E0E0DF82E0DEDF9CDFCE +S11301000895CF93DF931F92CDB7DD2784E48983CD +S113011089819FEF980F9983882341F08981898190 +S113012089819FEF980F99838111F8CF0F90DF9108 +S1130130CF9108958FEF87BB8AEA88BBC3DF40E085 +S10F014061E480E080DFFFCFF894FFCF83 S9030000FC diff --git a/Debug/main.o b/Debug/main.o index 7012eae61b60dad0bfbbe840fd41acced2729610..35c5b89ed7c5318198c4edaf5d3c7aff9a8bcf23 100644 GIT binary patch delta 1288 zcmZ9LJ!n%=6vxj?UP6*4+I(4SEKRW5iX9p(qM-6RDYQYwLD0o4l0`&t5Jcj~kSa(l z7ok!qsGtr-hd4xnVkg0=LJ<*%RtiE@G~ggO=>PvbFFbPKBU9K3k?~=dH|4Ic>h#^T{xmbu1_mGZz{>*3-!lf|BSO zZ|oW;yT-k;TQeENl-MR0E|{tCWYyhpF#UhF7a_ZARJHXG#?$e4ilzCx`$}z;Z%DlNR zWSlsFwO@VwOS#&IiQhUPyH`yW7@xyy#wK|**4OFeZLMK`)>r=kJg6IeqRiT-%KT2B zi|lcW*srM*6xs~8*d4YN?rkCub~j<#k)kO^8)h|nDeJx@X1q^#9Go$$cKQI{n@t@! z?IKEs5ZQxyI=`a{IL_X&!=S&e!hVon;T{w!D5V1Xc?u=4U*Ql2kEoD6-8J(aGkI70 zl&*IWX*TX;2$9;nIZyin*sq-k;Avcib6Vvf(ng@byQ2dCE}lXS>{l3o!b>XbyQWnR zBF%vUPfrE@fjk8RrotGU_R*B$ec5@CKU+h2(VUN^tp#%{K0NRk^Hgx)v}xZ7ljdDK d7g|8(g=xo!qemgc|8U9_61mVQE_aeU{09eLcOn1) delta 1454 zcmZ9MT}YE*6vxlI&ABhCIomQ56|#~_wvtH7*iBG4DCi=PXpOv(Ahybjx+s%~RyR`~ z62q$s!Y=v%!-PfDRne6}m=_T<>_(v??4rB=|JU=bmmN4ezvn#Xoaa0r?-rUqZ60mg z{VFJOPei(*B0D4@jWQ&qpSQ|)mWySXOIOZR3YF^>nUgnv#*UVozalKaSOStoR-hqk z&`O#P>x&gP7lO^E#WQO~rsqB1EKAHwU%Ty&ndiZPS@n%a>zG#+uhg5#y4GB%>LGX~ zQZrsxGu}`$Zm1bYWv_bTunkgY!v1!v&$RgahqKv%eD-X!bIK#|4=V2mpI3f|_2sG#+A(oM`8DiqFCUUN*^)uLoO_Jy1$F)ML}y59g?9wcIadA2eMza$q~MrzjlQ_kh{VXDhwi&73y`46;46j6%J$Yh!vvw znwb@|7)tb<)7&&HC4)2E3d_1YLZ>tPv0>~;*rdXVo@*GoyDA`?2hD7D<7AJ6-CZ@C z5oC{PL>iV-MD`I_X7fXHvU%;yPC_XQ=3_X~`2^(l-b6URKSwx6Et_a$d+!X$-RYcb spZtq(*5V8CLLFH}+rk@%A01$qJ_y7O^ diff --git a/main.c b/main.c index e90e5df..32456fd 100644 --- a/main.c +++ b/main.c @@ -14,7 +14,7 @@ int main(void) DDRB = 0xff; PORTB = 0xAA; lcd_init(); - lcd_write(here, "t", 0); + lcd_write(here, 0x41, 0); /* Replace with your application code */ while (1) {