From 481546040f52e27d789f92f704a62a3bea25e8ad Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Mon, 16 Jul 2018 17:11:33 +0200 Subject: [PATCH] display test --- .vs/AtTiny_alarm_clock/v14/.atsuo | Bin 18944 -> 18944 bytes AtTiny_alarm_clock.cproj | 9 + Debug/AtTiny_alarm_clock.eep | 1 + Debug/AtTiny_alarm_clock.elf | Bin 6428 -> 10804 bytes Debug/AtTiny_alarm_clock.hex | 29 ++- Debug/AtTiny_alarm_clock.lss | 347 ++++++++++++++++++++++++++---- Debug/AtTiny_alarm_clock.map | 189 ++++++++++------ Debug/AtTiny_alarm_clock.srec | 29 ++- Debug/Makefile | 24 +++ Debug/lcd4.d | 37 ++++ Debug/lcd4.o | Bin 0 -> 9636 bytes Debug/lcd_wait.d | 37 ++++ Debug/lcd_wait.o | Bin 0 -> 3256 bytes Debug/main.d | 5 +- Debug/main.o | Bin 2744 -> 3436 bytes Debug/makedep.mk | 4 + lcd4.c | 132 ++++++++++++ lcd4.h | 95 ++++++++ lcd_wait.c | 9 + lcdtest.c | 34 +++ main.c | 3 + 21 files changed, 868 insertions(+), 116 deletions(-) create mode 100644 Debug/AtTiny_alarm_clock.eep create mode 100644 Debug/lcd4.d create mode 100644 Debug/lcd4.o create mode 100644 Debug/lcd_wait.d create mode 100644 Debug/lcd_wait.o create mode 100644 lcd4.c create mode 100644 lcd4.h create mode 100644 lcd_wait.c create mode 100644 lcdtest.c diff --git a/.vs/AtTiny_alarm_clock/v14/.atsuo b/.vs/AtTiny_alarm_clock/v14/.atsuo index 135d58c19c2b15c84a84bcb26af4f8b2553fca3a..672f8b4ea67e9a2fb3320daaf569c333b7d2f880 100644 GIT binary patch delta 585 zcmZpe!q_l{aYGIh--XMjGUBpV7^NA2KxA?iQx&8C2B z56A)8A23-_^YA7u7skmhdIpnAczY%{@GCGHOx|FOX9?xsqR<(RlJg z=3rKTAisWcprH3;7x6ud_?SSZGWr2cJB`gW=3r)^0h0xp^d~0>$bqy>P7rjNe8kvp zGZWuIMqWmcJqk$nZT`aV!^jvixlzDFCWj%JA%($&K@UhDS~KI9!}&O;RThhqvMe&L zPv#bs7C2!vYai46_acYd{vF7(SoaC&EJOc%pz3Uf7zT*$5{6WUVulj18M131E!c5> zxBZ!2zi!{mx8?>~3-%|-4KTofVWyyk$z%>G%gF{z?2}|gAZU>+<0b(IV%^CY1@w-? JW=4hongC$3#d-h$ delta 443 zcmZpe!q_l{aYGIh--06r4}Z&CVU%WIU^pN&xr(WZ(QEQoCVw6_pum49m>kHjGP#5~ zVDb?r172~U#7#yZ0R$qG8Cm2fCg@C7VBrvz0t$!%u^15l1L_1Rl$e~!qRgrS64^YF zuKqVUk3m7+X znJ@yS&TQgwW}JMO$#8OscHd?ufq#sfq#PJ0A5eFgoWP#~#4?j~TzF)FngoCtgue7aWctXF?6uVB`VX={?znf6pY15*|>nfc&Wd#FHDiWWWNNK#mqjUu= WHk+)dd4FPp&n62=w#||X&ou!uW0`{h diff --git a/AtTiny_alarm_clock.cproj b/AtTiny_alarm_clock.cproj index bf39868..36a6b40 100644 --- a/AtTiny_alarm_clock.cproj +++ b/AtTiny_alarm_clock.cproj @@ -120,6 +120,15 @@ + + compile + + + compile + + + compile + compile diff --git a/Debug/AtTiny_alarm_clock.eep b/Debug/AtTiny_alarm_clock.eep new file mode 100644 index 0000000..7c166a1 --- /dev/null +++ b/Debug/AtTiny_alarm_clock.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/Debug/AtTiny_alarm_clock.elf b/Debug/AtTiny_alarm_clock.elf index 511f0f094076930a69e91329b68f178a0216ab4b..21514f3901dcf54e6e260f85a44630a8d7c9fd75 100644 GIT binary patch literal 10804 zcmcgy3vg7|c|P}EX|fVmK~j?DINqc|$YBuZyw`X0_0AuBJn^jixrs}ES93bhaQmsizT4xg9{T8HpzR}1?sVWYw=Z3G z=Q=W{0>!uY^q#I68?3r{>G_NJclqV3Bj;5b9hW8%q33sPbL(#!VA{pN7ulEPT z!L3^Y>wR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%Jy6l8>eb%^#qS%fp$td^H_0EkxJ| zPX-P``^}JFrS}Cw0iqWTxe4`bh-h8NP-dSwhEGrmiAi%B+Q)JUTg+!7rrw1iaYgwx gXitJ@Ro=-YJGx;X$Fb=|!5%3N^qW(0qFbEzKRUhwL;wH) diff --git a/Debug/AtTiny_alarm_clock.hex b/Debug/AtTiny_alarm_clock.hex index 3ba6a68..4018a18 100644 --- a/Debug/AtTiny_alarm_clock.hex +++ b/Debug/AtTiny_alarm_clock.hex @@ -1,6 +1,25 @@ -:1000000014C019C018C017C016C015C014C013C042 -:1000100012C011C010C00FC00EC00DC00CC00BC06C -:100020000AC009C008C007C006C011241FBECFED1A -:10003000CDBF02D006C0E4CF8FEF87BB8AEA88BB72 -:06004000FECFF894FFCF93 +:1000000014C024C023C022C021C020C01FC01EC0F5 +:100010001DC01CC01BC01AC019C018C017C016C014 +:1000200015C014C013C012C011C011241FBECFEDE3 +:10003000CDBF10E0A0E6B0E0E4E6F1E002C005903C +:100040000D92A236B107D9F780D08AC0D9CFCF930D +:10005000C2E362D0C150E9F7CF910895CF93C62F84 +:10006000843038F4823048F4882371F0813049F0CC +:100070000CC0843051F4939808C04F73833009F456 +:10008000405C842F806824D0939A929A929A98B375 +:100090009F708C2F807F982B98BB98B39F70892B73 +:1000A00088BB9298929838D087B3803F79F4929A1F +:1000B000929A88B3C295C07F8F708C2B88BB88B30F +:1000C0008F70C82BC8BB9298929826D0CF91089574 +:1000D00040E0682F84E0C2DF08958FEF87BB8B9AE2 +:1000E0008A9A88BB939A929AB2DFB1DFB0DF80E33D +:1000F000EFDFADDF80E3ECDF0FD080E3E9DF88E204 +:10010000E7DF87B3807F87BB8CE0E2DF86E0E0DF5C +:1001100082E0DEDF9CDF0895CF93DF931F92CDB79F +:10012000DD2784E4898389819FEF980F9983882351 +:1001300041F08981898189819FEF980F998381118D +:10014000F8CF0F90DF91CF9108958FEF87BBC5DF78 +:1001500040E060E670E080E081DF8AEA88BBFECFA5 +:04016000F894FFCF41 +:02016400740025 :00000001FF diff --git a/Debug/AtTiny_alarm_clock.lss b/Debug/AtTiny_alarm_clock.lss index ef0f137..81e7cfc 100644 --- a/Debug/AtTiny_alarm_clock.lss +++ b/Debug/AtTiny_alarm_clock.lss @@ -3,84 +3,341 @@ AtTiny_alarm_clock.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn - 0 .text 00000046 00000000 00000000 00000054 2**1 + 0 .text 00000164 00000000 00000000 00000074 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE - 1 .data 00000000 00800060 00800060 0000009a 2**0 + 1 .data 00000002 00800060 00000164 000001d8 2**0 CONTENTS, ALLOC, LOAD, DATA - 2 .comment 00000030 00000000 00000000 0000009a 2**0 + 2 .comment 00000030 00000000 00000000 000001da 2**0 CONTENTS, READONLY - 3 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000000cc 2**2 + 3 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 0000020c 2**2 CONTENTS, READONLY - 4 .debug_aranges 00000020 00000000 00000000 0000010c 2**0 + 4 .debug_aranges 00000088 00000000 00000000 0000024c 2**0 CONTENTS, READONLY, DEBUGGING - 5 .debug_info 000004de 00000000 00000000 0000012c 2**0 + 5 .debug_info 0000090f 00000000 00000000 000002d4 2**0 CONTENTS, READONLY, DEBUGGING - 6 .debug_abbrev 00000471 00000000 00000000 0000060a 2**0 + 6 .debug_abbrev 00000631 00000000 00000000 00000be3 2**0 CONTENTS, READONLY, DEBUGGING - 7 .debug_line 000001be 00000000 00000000 00000a7b 2**0 + 7 .debug_line 00000522 00000000 00000000 00001214 2**0 CONTENTS, READONLY, DEBUGGING - 8 .debug_frame 00000024 00000000 00000000 00000c3c 2**2 + 8 .debug_frame 000000f4 00000000 00000000 00001738 2**2 CONTENTS, READONLY, DEBUGGING - 9 .debug_str 000002a3 00000000 00000000 00000c60 2**0 + 9 .debug_str 0000035c 00000000 00000000 0000182c 2**0 CONTENTS, READONLY, DEBUGGING - 10 .debug_ranges 00000010 00000000 00000000 00000f03 2**0 + 10 .debug_loc 0000028c 00000000 00000000 00001b88 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_ranges 00000058 00000000 00000000 00001e14 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: 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> 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: 02 d0 rcall .+4 ; 0x38
- 34: 06 c0 rjmp .+12 ; 0x42 <_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: 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> -00000038
: +0000004c <__bad_interrupt>: + 4c: d9 cf rjmp .-78 ; 0x0 <__vectors> + +0000004e : + +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 + +0000005c : + +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 + 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 + case instruct : + unset_lcd_RS; + 76: 93 98 cbi 0x12, 3 ; 18 + break; + 78: 08 c0 rjmp .+16 ; 0x8a + case line2: + case line1: + position = position & 0x3f; + 7a: 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 + 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 + case here: + set_lcd_RS; + 88: 93 9a sbi 0x12, 3 ; 18 + break; + + + } + set_lcd_E; + 8a: 92 9a sbi 0x12, 2 ; 18 + set_lcd_E; + 8c: 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 + 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 + unset_lcd_E; + a2: 92 98 cbi 0x12, 2 ; 18 + unset_lcd_E; + a4: 92 98 cbi 0x12, 2 ; 18 + wait_100us(); + a6: 38 d0 rcall .+112 ; 0x118 + 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 + zeichen=zeichen << 4; + set_lcd_E; + ae: 92 9a sbi 0x12, 2 ; 18 + set_lcd_E; + b0: 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 + 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 + unset_lcd_E; + c6: 92 98 cbi 0x12, 2 ; 18 + unset_lcd_E; + c8: 92 98 cbi 0x12, 2 ; 18 + wait_100us(); + ca: 26 d0 rcall .+76 ; 0x118 + } +} + cc: cf 91 pop r28 + ce: 08 95 ret + +000000d0 : + 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 + +000000da : + + + +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 + set_lcd_RS_DDR; + de: 8b 9a sbi 0x11, 3 ; 17 + set_lcd_E_DDR; + e0: 8a 9a sbi 0x11, 2 ; 17 + /* end setting up ports */ + lcd_dataport=0xff; + e2: 88 bb out 0x18, r24 ; 24 + set_lcd_RS; + e4: 93 9a sbi 0x12, 3 ; 18 + set_lcd_E; + e6: 92 9a sbi 0x12, 2 ; 18 + lcd_5ms(); + e8: b2 df rcall .-156 ; 0x4e + lcd_5ms(); + ea: b1 df rcall .-158 ; 0x4e + lcd_5ms(); + ec: b0 df rcall .-160 ; 0x4e + lcd_instruct(lcd_SET_FUNCTION_8BIT); + ee: 80 e3 ldi r24, 0x30 ; 48 + f0: ef df rcall .-34 ; 0xd0 + lcd_5ms(); + f2: ad df rcall .-166 ; 0x4e + lcd_instruct(lcd_SET_FUNCTION_8BIT); + f4: 80 e3 ldi r24, 0x30 ; 48 + f6: ec df rcall .-40 ; 0xd0 + wait_100us(); + f8: 0f d0 rcall .+30 ; 0x118 + lcd_instruct(lcd_SET_FUNCTION_8BIT); + fa: 80 e3 ldi r24, 0x30 ; 48 + fc: e9 df rcall .-46 ; 0xd0 + 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 + }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 + lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF); + 108: 8c e0 ldi r24, 0x0C ; 12 + 10a: e2 df rcall .-60 ; 0xd0 + 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 + lcd_instruct(lcd_RETURN_HOME); + 110: 82 e0 ldi r24, 0x02 ; 2 + 112: de df rcall .-68 ; 0xd0 + lcd_5ms(); + 114: 9c df rcall .-200 ; 0x4e + 116: 08 95 ret + +00000118 : +#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 + 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 + i; + 132: 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 + i; + } +} + 142: 0f 90 pop r0 + 144: df 91 pop r29 + 146: cf 91 pop r28 + 148: 08 95 ret + +0000014a
: +#include "lcd4.h" int main(void) { DDRB = 0xff; - 38: 8f ef ldi r24, 0xFF ; 255 - 3a: 87 bb out 0x17, r24 ; 23 + 14a: 8f ef ldi r24, 0xFF ; 255 + 14c: 87 bb out 0x17, r24 ; 23 + lcd_init(); + 14e: c5 df rcall .-118 ; 0xda + lcd_write(here, "t", 0); + 150: 40 e0 ldi r20, 0x00 ; 0 + 152: 60 e6 ldi r22, 0x60 ; 96 + 154: 70 e0 ldi r23, 0x00 ; 0 + 156: 80 e0 ldi r24, 0x00 ; 0 + 158: 81 df rcall .-254 ; 0x5c /* Replace with your application code */ while (1) { PORTB = 0xAA; - 3c: 8a ea ldi r24, 0xAA ; 170 - 3e: 88 bb out 0x18, r24 ; 24 - 40: fe cf rjmp .-4 ; 0x3e <__SP_L__+0x1> + 15a: 8a ea ldi r24, 0xAA ; 170 + 15c: 88 bb out 0x18, r24 ; 24 + 15e: fe cf rjmp .-4 ; 0x15c -00000042 <_exit>: - 42: f8 94 cli +00000160 <_exit>: + 160: f8 94 cli -00000044 <__stop_program>: - 44: ff cf rjmp .-2 ; 0x44 <__stop_program> +00000162 <__stop_program>: + 162: ff cf rjmp .-2 ; 0x162 <__stop_program> diff --git a/Debug/AtTiny_alarm_clock.map b/Debug/AtTiny_alarm_clock.map index 2916c96..e1b305d 100644 --- a/Debug/AtTiny_alarm_clock.map +++ b/Debug/AtTiny_alarm_clock.map @@ -2,11 +2,22 @@ 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 .data 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o .bss 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o + .text 0x00000000 0x0 lcd4.o + .data 0x00000000 0x0 lcd4.o + .bss 0x00000000 0x0 lcd4.o + .text.lcd_1s 0x00000000 0xe lcd4.o + .text.lcd_blank_line + 0x00000000 0x4e lcd4.o + .text 0x00000000 0x0 lcd_wait.o + .data 0x00000000 0x0 lcd_wait.o + .bss 0x00000000 0x0 lcd_wait.o .text 0x00000000 0x0 main.o .data 0x00000000 0x0 main.o .bss 0x00000000 0x0 main.o @@ -26,6 +37,22 @@ 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 @@ -42,6 +69,8 @@ user_signatures 0x00850000 0x00000400 rw !x Linker script and memory map LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.3.172/gcc/dev/attiny2313a/avr25/tiny-stack/crtattiny2313a.o +LOAD lcd4.o +LOAD lcd_wait.o LOAD main.o START GROUP LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr25/tiny-stack\libm.a @@ -150,7 +179,7 @@ END GROUP .rela.plt *(.rela.plt) -.text 0x00000000 0x46 +.text 0x00000000 0x164 *(.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 @@ -191,6 +220,8 @@ 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) @@ -201,40 +232,54 @@ 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 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) *(.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 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.*) - .text.main 0x00000038 0xa main.o - 0x00000038 main - 0x00000042 . = ALIGN (0x2) + .text.lcd_5ms 0x0000004e 0xe lcd4.o + 0x0000004e lcd_5ms + .text.lcd_write + 0x0000005c 0x74 lcd4.o + 0x0000005c lcd_write + .text.lcd_instruct + 0x000000d0 0xa lcd4.o + 0x000000d0 lcd_instruct + .text.lcd_init + 0x000000da 0x3e lcd4.o + 0x000000da lcd_init + .text.wait_100us + 0x00000118 0x32 lcd_wait.o + 0x00000118 wait_100us + .text.main 0x0000014a 0x16 main.o + 0x0000014a main + 0x00000160 . = ALIGN (0x2) *(.fini9) - .fini9 0x00000042 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) - 0x00000042 _exit - 0x00000042 exit + .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) *(.fini8) *(.fini8) @@ -253,36 +298,38 @@ END GROUP *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000042 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 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) - 0x00000046 _etext = . + 0x00000164 _etext = . -.data 0x00800060 0x0 load address 0x00000046 - [!provide] PROVIDE (__data_start, .) +.data 0x00800060 0x2 load address 0x00000164 + 0x00800060 PROVIDE (__data_start, .) *(.data) *(.data*) *(.gnu.linkonce.d*) *(.rodata) *(.rodata*) + .rodata.str1.1 + 0x00800060 0x2 main.o *(.gnu.linkonce.r*) - 0x00800060 . = ALIGN (0x2) - 0x00800060 _edata = . - [!provide] PROVIDE (__data_end, .) + 0x00800062 . = ALIGN (0x2) + 0x00800062 _edata = . + 0x00800062 PROVIDE (__data_end, .) -.bss 0x00800060 0x0 +.bss 0x00800062 0x0 [!provide] PROVIDE (__bss_start, .) *(.bss) *(.bss*) *(COMMON) [!provide] PROVIDE (__bss_end, .) - 0x00000046 __data_load_start = LOADADDR (.data) - 0x00000046 __data_load_end = (__data_load_start + SIZEOF (.data)) + 0x00000164 __data_load_start = LOADADDR (.data) + 0x00000166 __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x00800060 0x0 +.noinit 0x00800062 0x0 [!provide] PROVIDE (__noinit_start, .) *(.noinit*) [!provide] PROVIDE (__noinit_end, .) - 0x00800060 _end = . + 0x00800062 _end = . [!provide] PROVIDE (__heap_start, .) .eeprom 0x00810000 0x0 @@ -324,8 +371,10 @@ END GROUP .comment 0x00000000 0x30 *(.comment) - .comment 0x00000000 0x30 main.o + .comment 0x00000000 0x30 lcd4.o 0x31 (size before relaxing) + .comment 0x00000030 0x31 lcd_wait.o + .comment 0x00000030 0x31 main.o .note.gnu.avr.deviceinfo 0x00000000 0x40 @@ -347,41 +396,59 @@ END GROUP .debug_sfnames *(.debug_sfnames) -.debug_aranges 0x00000000 0x20 +.debug_aranges 0x00000000 0x88 *(.debug_aranges) .debug_aranges - 0x00000000 0x20 main.o + 0x00000000 0x48 lcd4.o + .debug_aranges + 0x00000048 0x20 lcd_wait.o + .debug_aranges + 0x00000068 0x20 main.o .debug_pubnames *(.debug_pubnames) -.debug_info 0x00000000 0x4de +.debug_info 0x00000000 0x90f *(.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 0x88 main.o + .debug_info 0x00000456 0x31d lcd4.o + .debug_info 0x00000773 0xa3 lcd_wait.o + .debug_info 0x00000816 0xf9 main.o -.debug_abbrev 0x00000000 0x471 +.debug_abbrev 0x00000000 0x631 *(.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 0x56 main.o + .debug_abbrev 0x0000041b 0xfe lcd4.o + .debug_abbrev 0x00000519 0x72 lcd_wait.o + .debug_abbrev 0x0000058b 0xa6 main.o -.debug_line 0x00000000 0x1be +.debug_line 0x00000000 0x522 *(.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 0xb2 main.o + .debug_line 0x0000010c 0x291 lcd4.o + .debug_line 0x0000039d 0xbd lcd_wait.o + .debug_line 0x0000045a 0xc8 main.o -.debug_frame 0x00000000 0x24 +.debug_frame 0x00000000 0xf4 *(.debug_frame) - .debug_frame 0x00000000 0x24 main.o + .debug_frame 0x00000000 0x9c lcd4.o + .debug_frame 0x0000009c 0x34 lcd_wait.o + .debug_frame 0x000000d0 0x24 main.o -.debug_str 0x00000000 0x2a3 +.debug_str 0x00000000 0x35c *(.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 0x128 main.o - 0x15c (size before relaxing) + .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_loc +.debug_loc 0x00000000 0x28c *(.debug_loc) + .debug_loc 0x00000000 0x244 lcd4.o + .debug_loc 0x00000244 0x48 lcd_wait.o .debug_macinfo *(.debug_macinfo) @@ -401,9 +468,11 @@ END GROUP .debug_pubtypes *(.debug_pubtypes) -.debug_ranges 0x00000000 0x10 +.debug_ranges 0x00000000 0x58 *(.debug_ranges) - .debug_ranges 0x00000000 0x10 main.o + .debug_ranges 0x00000000 0x38 lcd4.o + .debug_ranges 0x00000038 0x10 lcd_wait.o + .debug_ranges 0x00000048 0x10 main.o .debug_macro *(.debug_macro) diff --git a/Debug/AtTiny_alarm_clock.srec b/Debug/AtTiny_alarm_clock.srec index bef45b7..68f0544 100644 --- a/Debug/AtTiny_alarm_clock.srec +++ b/Debug/AtTiny_alarm_clock.srec @@ -1,7 +1,26 @@ S01A0000417454696E795F616C61726D5F636C6F636B2E73726563DA -S113000014C019C018C017C016C015C014C013C03E -S113001012C011C010C00FC00EC00DC00CC00BC068 -S11300200AC009C008C007C006C011241FBECFED16 -S1130030CDBF02D006C0E4CF8FEF87BB8AEA88BB6E -S1090040FECFF894FFCF8F +S113000014C024C023C022C021C020C01FC01EC0F1 +S11300101DC01CC01BC01AC019C018C017C016C010 +S113002015C014C013C012C011C011241FBECFEDDF +S1130030CDBF10E0A0E6B0E0E4E6F1E002C0059038 +S11300400D92A236B107D9F780D08AC0D9CFCF9309 +S1130050C2E362D0C150E9F7CF910895CF93C62F80 +S1130060843038F4823048F4882371F0813049F0C8 +S11300700CC0843051F4939808C04F73833009F452 +S1130080405C842F806824D0939A929A929A98B371 +S11300909F708C2F807F982B98BB98B39F70892B6F +S11300A088BB9298929838D087B3803F79F4929A1B +S11300B0929A88B3C295C07F8F708C2B88BB88B30B +S11300C08F70C82BC8BB9298929826D0CF91089570 +S11300D040E0682F84E0C2DF08958FEF87BB8B9ADE +S11300E08A9A88BB939A929AB2DFB1DFB0DF80E339 +S11300F0EFDFADDF80E3ECDF0FD080E3E9DF88E200 +S1130100E7DF87B3807F87BB8CE0E2DF86E0E0DF58 +S113011082E0DEDF9CDF0895CF93DF931F92CDB79B +S1130120DD2784E4898389819FEF980F998388234D +S113013041F08981898189819FEF980F9983811189 +S1130140F8CF0F90DF91CF9108958FEF87BBC5DF74 +S113015040E060E670E080E081DF8AEA88BBFECFA1 +S1070160F894FFCF3D +S1050164740021 S9030000FC diff --git a/Debug/Makefile b/Debug/Makefile index 06ff50d..7ccc24d 100644 --- a/Debug/Makefile +++ b/Debug/Makefile @@ -37,6 +37,8 @@ SUBDIRS := # Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ +../lcd4.c \ +../lcd_wait.c \ ../main.c @@ -47,15 +49,23 @@ ASM_SRCS += OBJS += \ +lcd4.o \ +lcd_wait.o \ main.o OBJS_AS_ARGS += \ +lcd4.o \ +lcd_wait.o \ main.o C_DEPS += \ +lcd4.d \ +lcd_wait.d \ main.d C_DEPS_AS_ARGS += \ +lcd4.d \ +lcd_wait.d \ main.d OUTPUT_FILE_PATH +=AtTiny_alarm_clock.elf @@ -72,6 +82,20 @@ LINKER_SCRIPT_DEP+= # AVR32/GNU C Compiler +./lcd4.o: .././lcd4.c + @echo Building file: $< + @echo Invoking: AVR/GNU C Compiler : 5.4.0 + $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny2313a -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\gcc\dev\attiny2313a" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" + @echo Finished building: $< + + +./lcd_wait.o: .././lcd_wait.c + @echo Building file: $< + @echo Invoking: AVR/GNU C Compiler : 5.4.0 + $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny2313a -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\gcc\dev\attiny2313a" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" + @echo Finished building: $< + + ./main.o: .././main.c @echo Building file: $< @echo Invoking: AVR/GNU C Compiler : 5.4.0 diff --git a/Debug/lcd4.d b/Debug/lcd4.d new file mode 100644 index 0000000..798ce73 --- /dev/null +++ b/Debug/lcd4.d @@ -0,0 +1,37 @@ +lcd4.d lcd4.o: .././lcd4.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\include/avr/iotn2313a.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + 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 \ + .././lcd4.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.3.172\include/avr/iotn2313a.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +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: + +.././lcd4.h: diff --git a/Debug/lcd4.o b/Debug/lcd4.o new file mode 100644 index 0000000000000000000000000000000000000000..244e6d818f9b506678f43a07e6a7ef4c6aeb0438 GIT binary patch literal 9636 zcmbuF4{%h)9mn_GOF}|IAVEO{$Oyd;<0$>lD+yMR&@ z1f~Ry<)4gEnX%Z~X|2;vi_?Et4Yn$+S{R+Ft+h7(o3>LOVWeX_PHVs4eZPIT39;I7 znfLayzy0lRf4lqJz4u<&a%J-h$8nTNj=EOmOG>Tvl)4XM|sZJbS z?VLWoxA?&E{m0(1OV8Bqs8gr6;p+RGbMlTl=cF3kQRkfAKcEJ$$!-TNZrxG4HLgzV zzkeV84IF;3r@waVmVwy=N65Qo_Z`_cux~(}*m-#CBIh)9`VK#JU~tRso_^Hz9p2q@ zZ1yqHp$ChH;!jKcGx<(Bi-&?hJJiMCXDizYRR-h-eO!FwWkW)k{)Y0Jf%XxQ-Sttk;S z3XNeYR8Z(=eyP|m73-2_hfUpvL%3^${@pho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$AN7n)2e|En z8=tNx{;Y6OgVJ%%pd>hz2$uy*xU(?|QZuOeE~RcJ*HUSjg~tn{N&_nt_Gf3C!AZR+ z6`@2e;r*r`RRd!<)wzeL7Dj=w3g3iVYSdW;m)NS{(}oYy|D_F3L~6BPKkqS1oFhGk zMr^*__tRs3uyXvDo_Z_LV}6im&*TDmvoGHlb7B%r5f<=1*P&6)#?+rdGiv}v1?>w0 zO=fNyeAeE2*t-K6?a>!wPrXy{hI(M2X&8*g9``Yr({F$|M4-vc`QWqr^1s|E$ha?4 z-|Tx5*sK8*KZ9`yG?}?q!DsEg1A9Y|(H_g1vG*acSpz731H*S{$jtHYQr6xL*fViv zjWG83uhOicjX%NsK%mLYT>+o9cN6v)7y8H2Y3zLo%rylx($^?T6=MWEAsgRzR&N~) zFoz5oy`LZ;HgpJj*<9tmB>GG|iAL%`(hgyyfBZ6Wj(NqhVR9Kz3`6f0fhMyTN4Vam cH(_8B!UrKS_852Gb=Ka^P9dh-s}_C#2kga%5C8xG literal 0 HcmV?d00001 diff --git a/Debug/main.d b/Debug/main.d index 8575188..00d29bf 100644 --- a/Debug/main.d +++ b/Debug/main.d @@ -9,7 +9,8 @@ main.d main.o: .././main.c \ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ 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\avr\lock.h \ + .././lcd4.h c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: @@ -32,3 +33,5 @@ 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\fuse.h: c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +.././lcd4.h: diff --git a/Debug/main.o b/Debug/main.o index 7604c6e7147bc3ed16bf6321373666bea92cacfa..76b9588ea1032aebec67834eabeeb0ce70fd7a52 100644 GIT binary patch literal 3436 zcma)8O^g&p6t3#t|Cy{TAgGWyCJQXlX?B(cmW74o&kd0X;YW#?q@A7VooShwp3L;{ zV-!>l2p$mQ55^N{j2HAE@j~KHB++={U_6>NYC<4UF!5kK;P+Km%`~`)zND(Y_v+Pq zRj*#X?h`w9JuambhNRdh+ME#I_X_bYCP$URkXS4hicp;W{nQn4ZF2V6+1l(&v*OyB z8?RmwU;YUlOX+ne6G?^V=q%Yqsja%>8!%Y1hfIgn=~qKxS>5EUj?QR^xSojXQJlh3 zEgiW4EoCt3BjZ-&LiHW0?-bo?TQVuPVnyqe_8Tcn{s@WM0s+n}#7(q5S(3wjvLJ_r zNVKD54ab>`kOOjA|AK_wzoh>_*MQtB=fR;hC=!WH5aOVVgxx=$*pS${0B6*4cWI3<$NpFo;0X3}w1IU+xv zt<{5KJy%K1_+_t=8ag_*c4amfR=jey5jG2ckX`2tXTu;U=Sw-in#~=qkEt$QtTxkk z$+LbnUv3sWAu7;x^1PdJzA);Ph#Fx5Ndc@j->G^#DQ$^sV&9>93w=i~c8Ro+UAE|j z08`jC_q$3Po_g{?YTNqtsWr~1Gn`6Ss_B_>u2GuE5C`eTA-|TMZWh5+^34fsd1MW6 zqc)aG7e`X*-O$5!CU626NzXK^4Zm3R3TYg%9_Oe1aK`t_g$9Js%7=bXO*cF>QdY=? zxj0|TFm4*mQUfrt&4F<$LQu6bqBXvLYgmImsYf<*AUPkpJ zq8wC)kv(OK9#rJpM%60X`M0qq=EmGmY#+~V5Aw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Hw5yoE)}uU*S}EsVbG3TcM2Rik&Bn%p1ux-(5n%r)@Z}8uau*Xk z-FXdjFXrBOy?a7yOQ=gvs3?tQIO@@w8L~tn!%_eI9{zk+5v!r`MXaI59i}MK==r&Db0Swqb92%*c77#FT%OvHu+S7482^jcNOh#*Fiw#@suBAsG0h6KFEJcfe=k{)xDg zkTEXX*2GPK%^pB;5sYqAvRz#Sob`7Q$+M^Fk57Z~w+)>2w+7}%$P5|X`w(RPoq#{q zivIW}7=NDva}VDP(%)c8#tC>r4&Fho#_l#6f@f~X*nJBDv7yJXn=}ko#wC4?k +#include +#include "lcd4.h" + +/* Prototypes */ +extern void wait_100us(void); +//void lcd_init(void); +//void lcd_write(uint8_t whichwrite, uint8_t zeichen, uint8_t position); +void lcd_instruct(uint8_t zeichen); //Optimzation of Code length (costs one fuction call) + // expands to lcd_write(instruct, zeichen, 0); +// void lcd_blank_line(uint8_t lcd_whichwrite); +void lcd_preinstruct(uint8_t zeichen); //Optimzation of Code length (costs one fuction call) + // expands to lcd_write(preinstruct, zeichen, 0); +// void lcd_blank_line(uint8_t lcd_whichwrite); + +// Implementation +void lcd_5ms(void); +void lcd_1s(void); +/* end Prototypes */ + + +#define lcd_mask_Write_Adress(position) ((position & 0x7F)| lcd_SET_DD_RAM) + + + +void lcd_init(void){ + /* setting up ports first */ + lcd_dataport_DDR=0xff; + set_lcd_RS_DDR; + set_lcd_E_DDR; + /* end setting up ports */ + lcd_dataport=0xff; + set_lcd_RS; + set_lcd_E; + lcd_5ms(); + lcd_5ms(); + lcd_5ms(); + lcd_instruct(lcd_SET_FUNCTION_8BIT); + lcd_5ms(); + lcd_instruct(lcd_SET_FUNCTION_8BIT); + wait_100us(); + lcd_instruct(lcd_SET_FUNCTION_8BIT); + if (lcd_dataport_mask==0xf0){ + lcd_instruct(lcd_SET_FUNCTION_4BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); + }else{ + lcd_instruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5); + } + lcd_dataport_DDR&=lcd_dataport_mask; + lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF); + lcd_instruct(lcd_ENTRY_MODE_SET|lcd_ENTRY_MODE_SET_INCREASE | lcd_ENTRY_MS_DISPLAY_NOT_S); + lcd_instruct(lcd_RETURN_HOME); + lcd_5ms(); +} + +void lcd_5ms(void){ + for(uint8_t i=50;i>0;i--){ + wait_100us(); + } + } + +void lcd_1s(void){ + for(uint8_t i=200;i>0;i--){ + lcd_5ms(); + } + } + +void lcd_instruct(uint8_t zeichen){ + lcd_write(instruct,zeichen,0); + } + +void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){ + switch (lcd_whichwrite){ + case instruct : + unset_lcd_RS; + break; + case line2: + case line1: + position = position & 0x3f; + if (lcd_whichwrite == line2){ position=position + 0x40; }; + case therepos: + lcd_instruct(lcd_mask_Write_Adress(position)); + case here: + set_lcd_RS; + break; + + + } + set_lcd_E; + set_lcd_E; + lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; + lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; + unset_lcd_E; + unset_lcd_E; + wait_100us(); + if (lcd_dataport_DDR==0xf0){ + zeichen=zeichen << 4; + set_lcd_E; + set_lcd_E; + lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; + lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask; + unset_lcd_E; + unset_lcd_E; + wait_100us(); + } +} + +void lcd_blank_line(uint8_t lcd_whichwrite) + { + uint8_t count; + uint8_t countin; + + switch (lcd_whichwrite){ + case instruct: + lcd_blank_line(line1); + case line2: + count=0x40; + break; + case line1: + count=0; + } + + for (countin=count; countin < count+15; countin++){ + lcd_write(therepos, 32, countin); + } +} + + diff --git a/lcd4.h b/lcd4.h new file mode 100644 index 0000000..63a0121 --- /dev/null +++ b/lcd4.h @@ -0,0 +1,95 @@ +/* avrmb2313_lcd.h +* V 1.0 by (Hr & RJH-Systems) @ (FLG) +* 30.03.07 +* Zum Ansteuern eines zweizeiligen LCD-Displays +* Hitachi 44780 od. KS0070B +* auf dem AVR-evaluationsboard von Matze Brenner +* > www.flg-informatik.de +* 8-bit Mode +* 4-bit Mode +*/ +#ifndef avrmb2313_lcd + #define avrmb2313_lcd + #include + /* Some ports must be definded first, dont touch these for avrmb2313-project + * but set for other Designs using other out-Ports + */ + + + #ifndef lcd_bus4 + #ifndef lcd_bus8 + #define lcd_bus4 //defaults to 4-Bit + #endif + #endif + + #ifndef lcd_dataports_defined + #define lcd_dataports_defined + #include + #define lcd_dataport PORTB + #define lcd_dataport_DDR DDRB // DataDirectionRegister für lcd_datatport + //#ifdef lcd_bus8 + #define lcd_dataport_mask 0xf0 // which bits in that port (8-bit = 0xff for 8-bit operation) + //#else + // #define lcd_dataport_mask 0xf0 // which bits in that port (4-bit = 0xf0 for 4-bit operation) + // #endif + #define set_lcd_RS_DDR DDRD=(DDRD | ((uint8_t) 0x08)) // Dir-Out für lcd _RS setzen) + #define set_lcd_E_DDR DDRD=(DDRD | ((uint8_t) 0x04)) // Dir-Out für lcd _E setzen) + #define set_lcd_RS PORTD=(PORTD | ((uint8_t) 0x08)) // Bit für lcd _RS setzen) + #define unset_lcd_RS PORTD=(PORTD & ~((uint8_t) 0x08)) // Bit für lcd _RS löschen) + #define set_lcd_E PORTD=(PORTD | ((uint8_t) 0x04)) // Bit für lcd _E setzen) + #define unset_lcd_E PORTD=(PORTD & ~((uint8_t) 0x04)) // Bit für lcd _E löschen) + # + #endif + + + extern void wait_100us(void); // This function must be implemented + // Bitte eine Funktion "void wait_100us()" implementieren, die 100us wartet + // Please implement function "void wait_100us()": just waiting 100*10^(-6) s + extern void lcd_init(void); + extern void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position); + enum lcd_whichwrite{here, therepos, line1, line2, instruct, preinstruct}; + extern void lcd_blank_line(uint8_t lcd_whichwrite); // line1, line2, instruct=all + extern void lcd_instruct(uint8_t zeichen); + /* possible "zeichen": + lcd_DISPLAY_CLEAR + lcd_RETURN_HOME + lcd_ENTRY_MODE_SET_INCREASE + lcd_ENTRY_MODE_SET_DECREASE + lcd_ENTRY_MODE_SET_DISPLAY_SHIFTED + lcd_ENTRY_MS_DISPLAY_NOT_S hifted + */ + extern void lcd_5ms(); //based on wait_100us + extern void lcd_1s(); //based on wait_100us + // Die Konstanten des lcd-Kontrollers local + #define lcd_DISPLAY_CLEAR 0b00000001 + #define lcd_RETURN_HOME 0b00000010 + #define lcd_ENTRY_MODE_SET 0b00000100 + #define lcd_ENTRY_MODE_SET_INCREASE 0b00000110 + #define lcd_ENTRY_MODE_SET_DECREASE 0b00000100 + #define lcd_ENTRY_MODE_SET_DISPLAY_SHIFTED 0b00000101 + #define lcd_ENTRY_MS_DISPLAY_NOT_S 0b00000100 + #define lcd_DISPLAY_OO 0b00001000 + #define lcd_DISPLAY_OO_ON 0b00001100 + #define lcd_DISPLAY_OO_OFF 0b00001000 + #define lcd_DISPLAY_OO_CURSOR_ON 0b00001010 + #define lcd_DISPLAY_OO_CURSOR_OFF 0b00001000 + #define lcd_DISPLAY_OO_BLINKING_ON 0b00001001 + #define lcd_DISPLAY_OO_BLINKING_OFF 0b00001000 + #define lcd_SHIFT 0b00010000 + #define lcd_SHIFT_DISPLAY_SHIFT 0b00011000 + #define lcd_SHIFT_CURSOR_MOVE 0b00010000 + #define lcd_SHIFT_RIGHT_SHIFT 0b00010100 + #define lcd_SHIFT_LEFT_SHIFT 0b00010000 + #define lcd_SET_FUNCTION 0b00100000 + #define lcd_SET_FUNCTION_8BIT 0b00110000 + #define lcd_SET_FUNCTION_4BIT 0b00100000 + #define lcd_SET_FUNCTION_2LINE 0b00101000 + #define lcd_SET_FUNCTION_1LINE 0b00100000 + #define lcd_SET_FUNCTION_5X10 0b00100100 + #define lcd_SET_FUNCTION_7X5 0b00100000 + #define lcd_SET_CG_RAM 0b01000000 + #define lcd_SET_DD_RAM 0b10000000 + + +#endif + diff --git a/lcd_wait.c b/lcd_wait.c new file mode 100644 index 0000000..3959a34 --- /dev/null +++ b/lcd_wait.c @@ -0,0 +1,9 @@ +#include +#include +#include "lcd4.h" + +void wait_100us(void){ + for (volatile uint8_t i=68;i--;i>0){ + i; + } +} diff --git a/lcdtest.c b/lcdtest.c new file mode 100644 index 0000000..de2979e --- /dev/null +++ b/lcdtest.c @@ -0,0 +1,34 @@ +#include +#include +#define lcd_bus8 +#include "lcd4.h" + +int main(void){ + lcd_1s(); + lcd_init(); + lcd_1s(); + lcd_1s(); + lcd_write(therepos,0x41,0x08); + lcd_1s(); + lcd_1s(); + lcd_write(here,0x42,0); + lcd_1s(); + lcd_1s(); + lcd_write(here,0x43,0); + lcd_1s(); + lcd_1s(); + lcd_write(here,0x44,0); + lcd_1s(); + lcd_1s(); + DDRB = 0x0f; + while(1==1){ + PORTB = 0x0f; + lcd_1s(); + PORTB = 0x05; + lcd_1s(); + PORTB = 0x0A; + lcd_1s(); + } +} + + diff --git a/main.c b/main.c index 014619d..f3296f2 100644 --- a/main.c +++ b/main.c @@ -6,11 +6,14 @@ */ #include +#include "lcd4.h" int main(void) { DDRB = 0xff; + lcd_init(); + lcd_write(here, "t", 0); /* Replace with your application code */ while (1) {