added LCD Lib
This commit is contained in:
parent
77a6ed970b
commit
fbb87d2772
40 changed files with 5224 additions and 0 deletions
1710
Libs/LCD4/.cproject
Normal file
1710
Libs/LCD4/.cproject
Normal file
File diff suppressed because it is too large
Load diff
23
Libs/LCD4/.dep/avrmb2313_lcd.o.d
Normal file
23
Libs/LCD4/.dep/avrmb2313_lcd.o.d
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
avrmb2313_lcd.o: avrmb2313_lcd.c c:/winavr/bin/../avr/include/inttypes.h \
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h avrmb2313_lcd.h
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/inttypes.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h:
|
||||||
|
|
||||||
|
avrmb2313_lcd.h:
|
23
Libs/LCD4/.dep/lcd_wait.o.d
Normal file
23
Libs/LCD4/.dep/lcd_wait.o.d
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
lcd_wait.o: lcd_wait.c c:/winavr/bin/../avr/include/inttypes.h \
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h avrmb2313_lcd.h
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/inttypes.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h:
|
||||||
|
|
||||||
|
avrmb2313_lcd.h:
|
23
Libs/LCD4/.dep/lcdtest.o.d
Normal file
23
Libs/LCD4/.dep/lcdtest.o.d
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
lcdtest.o: lcdtest.c c:/winavr/bin/../avr/include/inttypes.h \
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h \
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h avrmb2313_lcd.h
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/inttypes.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/stdint.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/sfr_defs.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/io2313.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/portpins.h:
|
||||||
|
|
||||||
|
c:/winavr/bin/../avr/include/avr/version.h:
|
||||||
|
|
||||||
|
avrmb2313_lcd.h:
|
82
Libs/LCD4/.project
Normal file
82
Libs/LCD4/.project
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>LCD4</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
<dictionary>
|
||||||
|
<key>?name?</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||||
|
<value>all</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
|
<value>make</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||||
|
<value>${workspace_loc:/LCD4/Debug}</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||||
|
<value>clean</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
|
<value>false</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||||
|
<value>all</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
<nature>de.innot.avreclipse.core.avrnature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
24
Libs/LCD4/.settings/de.innot.avreclipse.core.prefs
Normal file
24
Libs/LCD4/.settings/de.innot.avreclipse.core.prefs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#Sat Mar 06 14:56:52 CET 2010
|
||||||
|
avrtarget/ClockFrequency=10000000
|
||||||
|
avrtarget/ExtRAMSize=0
|
||||||
|
avrtarget/ExtendedRAM=false
|
||||||
|
avrtarget/MCUType=attiny2313
|
||||||
|
avrtarget/UseEEPROM=false
|
||||||
|
avrtarget/UseExtendedRAMforHeap=true
|
||||||
|
avrtarget/avrdude/BitBangDelay=
|
||||||
|
avrtarget/avrdude/Bitclock=
|
||||||
|
avrtarget/avrdude/EEPROMFile=
|
||||||
|
avrtarget/avrdude/EEPROMFromConfig=true
|
||||||
|
avrtarget/avrdude/FlashFile=
|
||||||
|
avrtarget/avrdude/FlashFromConfig=true
|
||||||
|
avrtarget/avrdude/NoChipErase=false
|
||||||
|
avrtarget/avrdude/NoSigCheck=false
|
||||||
|
avrtarget/avrdude/NoVerify=false
|
||||||
|
avrtarget/avrdude/NoWrite=false
|
||||||
|
avrtarget/avrdude/OtherOptions=
|
||||||
|
avrtarget/avrdude/ProgrammerID=programmerconfig.1
|
||||||
|
avrtarget/avrdude/UseCounter=false
|
||||||
|
avrtarget/avrdude/WriteEEPROM=false
|
||||||
|
avrtarget/avrdude/WriteFlash=true
|
||||||
|
avrtarget/perConfig=false
|
||||||
|
eclipse.preferences.version=1
|
BIN
Libs/LCD4/Debug/LCD4.elf
Normal file
BIN
Libs/LCD4/Debug/LCD4.elf
Normal file
Binary file not shown.
673
Libs/LCD4/Debug/LCD4.lss
Normal file
673
Libs/LCD4/Debug/LCD4.lss
Normal file
|
@ -0,0 +1,673 @@
|
||||||
|
|
||||||
|
LCD4.elf: file format elf32-avr
|
||||||
|
|
||||||
|
Sections:
|
||||||
|
Idx Name Size VMA LMA File off Algn
|
||||||
|
0 .text 0000040a 00000000 00000000 00000054 2**1
|
||||||
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||||
|
1 .stab 0000111c 00000000 00000000 00000460 2**2
|
||||||
|
CONTENTS, READONLY, DEBUGGING
|
||||||
|
2 .stabstr 000007cb 00000000 00000000 0000157c 2**0
|
||||||
|
CONTENTS, READONLY, DEBUGGING
|
||||||
|
Disassembly of section .text:
|
||||||
|
|
||||||
|
00000000 <__vectors>:
|
||||||
|
0: 0c 94 2a 00 jmp 0x54 ; 0x54 <__ctors_end>
|
||||||
|
4: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
8: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
c: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
10: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
14: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
18: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
1c: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
20: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
24: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
28: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
2c: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
30: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
34: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
38: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
3c: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
40: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
44: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
48: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
4c: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
50: 0c 94 47 00 jmp 0x8e ; 0x8e <__bad_interrupt>
|
||||||
|
|
||||||
|
00000054 <__ctors_end>:
|
||||||
|
54: 11 24 eor r1, r1
|
||||||
|
56: 1f be out 0x3f, r1 ; 63
|
||||||
|
58: cf e5 ldi r28, 0x5F ; 95
|
||||||
|
5a: d4 e0 ldi r29, 0x04 ; 4
|
||||||
|
5c: de bf out 0x3e, r29 ; 62
|
||||||
|
5e: cd bf out 0x3d, r28 ; 61
|
||||||
|
|
||||||
|
00000060 <__do_copy_data>:
|
||||||
|
60: 10 e0 ldi r17, 0x00 ; 0
|
||||||
|
62: a0 e6 ldi r26, 0x60 ; 96
|
||||||
|
64: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
66: ea e0 ldi r30, 0x0A ; 10
|
||||||
|
68: f4 e0 ldi r31, 0x04 ; 4
|
||||||
|
6a: 02 c0 rjmp .+4 ; 0x70 <.do_copy_data_start>
|
||||||
|
|
||||||
|
0000006c <.do_copy_data_loop>:
|
||||||
|
6c: 05 90 lpm r0, Z+
|
||||||
|
6e: 0d 92 st X+, r0
|
||||||
|
|
||||||
|
00000070 <.do_copy_data_start>:
|
||||||
|
70: a0 36 cpi r26, 0x60 ; 96
|
||||||
|
72: b1 07 cpc r27, r17
|
||||||
|
74: d9 f7 brne .-10 ; 0x6c <.do_copy_data_loop>
|
||||||
|
|
||||||
|
00000076 <__do_clear_bss>:
|
||||||
|
76: 10 e0 ldi r17, 0x00 ; 0
|
||||||
|
78: a0 e6 ldi r26, 0x60 ; 96
|
||||||
|
7a: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
7c: 01 c0 rjmp .+2 ; 0x80 <.do_clear_bss_start>
|
||||||
|
|
||||||
|
0000007e <.do_clear_bss_loop>:
|
||||||
|
7e: 1d 92 st X+, r1
|
||||||
|
|
||||||
|
00000080 <.do_clear_bss_start>:
|
||||||
|
80: a0 36 cpi r26, 0x60 ; 96
|
||||||
|
82: b1 07 cpc r27, r17
|
||||||
|
84: e1 f7 brne .-8 ; 0x7e <.do_clear_bss_loop>
|
||||||
|
86: 0e 94 cc 01 call 0x398 ; 0x398 <main>
|
||||||
|
8a: 0c 94 03 02 jmp 0x406 ; 0x406 <_exit>
|
||||||
|
|
||||||
|
0000008e <__bad_interrupt>:
|
||||||
|
8e: 0c 94 00 00 jmp 0 ; 0x0 <__heap_end>
|
||||||
|
|
||||||
|
00000092 <lcd_init>:
|
||||||
|
/* end Prototypes */
|
||||||
|
|
||||||
|
#define lcd_mask_Write_Adress(position) ((position & 0x7F)| lcd_SET_DD_RAM)
|
||||||
|
// 4-Bit to be added, no indent
|
||||||
|
// enum whichtype{instruct, data};
|
||||||
|
void lcd_init(void){
|
||||||
|
92: df 93 push r29
|
||||||
|
94: cf 93 push r28
|
||||||
|
96: cd b7 in r28, 0x3d ; 61
|
||||||
|
98: de b7 in r29, 0x3e ; 62
|
||||||
|
/* setting up ports first */
|
||||||
|
lcd_dataport_DDR|=lcd_dataport_mask;
|
||||||
|
9a: a7 e3 ldi r26, 0x37 ; 55
|
||||||
|
9c: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
9e: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
a0: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
a2: 80 81 ld r24, Z
|
||||||
|
a4: 80 6f ori r24, 0xF0 ; 240
|
||||||
|
a6: 8c 93 st X, r24
|
||||||
|
set_lcd_RS_DDR;
|
||||||
|
a8: a1 e3 ldi r26, 0x31 ; 49
|
||||||
|
aa: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
ac: e1 e3 ldi r30, 0x31 ; 49
|
||||||
|
ae: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
b0: 80 81 ld r24, Z
|
||||||
|
b2: 88 60 ori r24, 0x08 ; 8
|
||||||
|
b4: 8c 93 st X, r24
|
||||||
|
set_lcd_E_DDR;
|
||||||
|
b6: a1 e3 ldi r26, 0x31 ; 49
|
||||||
|
b8: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
ba: e1 e3 ldi r30, 0x31 ; 49
|
||||||
|
bc: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
be: 80 81 ld r24, Z
|
||||||
|
c0: 84 60 ori r24, 0x04 ; 4
|
||||||
|
c2: 8c 93 st X, r24
|
||||||
|
/* end setting up ports */
|
||||||
|
//lcd_dataport=0xff;
|
||||||
|
set_lcd_RS;
|
||||||
|
c4: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
c6: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
c8: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
ca: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
cc: 80 81 ld r24, Z
|
||||||
|
ce: 88 60 ori r24, 0x08 ; 8
|
||||||
|
d0: 8c 93 st X, r24
|
||||||
|
set_lcd_E;
|
||||||
|
d2: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
d4: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
d6: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
d8: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
da: 80 81 ld r24, Z
|
||||||
|
dc: 84 60 ori r24, 0x04 ; 4
|
||||||
|
de: 8c 93 st X, r24
|
||||||
|
lcd_5ms();
|
||||||
|
e0: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
lcd_5ms();
|
||||||
|
e4: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
lcd_5ms();
|
||||||
|
e8: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
#endif
|
||||||
|
#ifdef lcd_bus4
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
ec: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
ee: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
lcd_5ms();
|
||||||
|
f2: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
f6: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
f8: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
fc: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
100: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
102: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
106: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_4BIT);
|
||||||
|
10a: 80 e2 ldi r24, 0x20 ; 32
|
||||||
|
10c: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
110: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
114: 88 e2 ldi r24, 0x28 ; 40
|
||||||
|
116: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
wait_100us();
|
||||||
|
11a: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_DISPLAY_OO_OFF);
|
||||||
|
11e: 88 e0 ldi r24, 0x08 ; 8
|
||||||
|
120: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
124: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_DISPLAY_CLEAR);
|
||||||
|
128: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
12a: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
lcd_5ms();
|
||||||
|
12e: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF);
|
||||||
|
132: 8c e0 ldi r24, 0x0C ; 12
|
||||||
|
134: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
138: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_ENTRY_MODE_SET|lcd_ENTRY_MODE_SET_INCREASE | lcd_ENTRY_MS_DISPLAY_NOT_S);
|
||||||
|
13c: 86 e0 ldi r24, 0x06 ; 6
|
||||||
|
13e: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
142: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_RETURN_HOME);
|
||||||
|
146: 82 e0 ldi r24, 0x02 ; 2
|
||||||
|
148: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
lcd_5ms();
|
||||||
|
14c: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
}
|
||||||
|
150: cf 91 pop r28
|
||||||
|
152: df 91 pop r29
|
||||||
|
154: 08 95 ret
|
||||||
|
|
||||||
|
00000156 <lcd_5ms>:
|
||||||
|
|
||||||
|
void lcd_5ms(void){
|
||||||
|
156: df 93 push r29
|
||||||
|
158: cf 93 push r28
|
||||||
|
15a: 0f 92 push r0
|
||||||
|
15c: cd b7 in r28, 0x3d ; 61
|
||||||
|
15e: de b7 in r29, 0x3e ; 62
|
||||||
|
for(uint8_t i=50;i>0;i--){
|
||||||
|
160: 82 e3 ldi r24, 0x32 ; 50
|
||||||
|
162: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
164: 05 c0 rjmp .+10 ; 0x170 <lcd_5ms+0x1a>
|
||||||
|
wait_100us();
|
||||||
|
166: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
lcd_instruct(lcd_RETURN_HOME);
|
||||||
|
lcd_5ms();
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_5ms(void){
|
||||||
|
for(uint8_t i=50;i>0;i--){
|
||||||
|
16a: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
16c: 81 50 subi r24, 0x01 ; 1
|
||||||
|
16e: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
170: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
172: 88 23 and r24, r24
|
||||||
|
174: c1 f7 brne .-16 ; 0x166 <lcd_5ms+0x10>
|
||||||
|
wait_100us();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
176: 0f 90 pop r0
|
||||||
|
178: cf 91 pop r28
|
||||||
|
17a: df 91 pop r29
|
||||||
|
17c: 08 95 ret
|
||||||
|
|
||||||
|
0000017e <lcd_1s>:
|
||||||
|
|
||||||
|
void lcd_1s(void){
|
||||||
|
17e: df 93 push r29
|
||||||
|
180: cf 93 push r28
|
||||||
|
182: 0f 92 push r0
|
||||||
|
184: cd b7 in r28, 0x3d ; 61
|
||||||
|
186: de b7 in r29, 0x3e ; 62
|
||||||
|
for(uint8_t i=200;i>0;i--){
|
||||||
|
188: 88 ec ldi r24, 0xC8 ; 200
|
||||||
|
18a: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
18c: 05 c0 rjmp .+10 ; 0x198 <lcd_1s+0x1a>
|
||||||
|
lcd_5ms();
|
||||||
|
18e: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_5ms>
|
||||||
|
wait_100us();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_1s(void){
|
||||||
|
for(uint8_t i=200;i>0;i--){
|
||||||
|
192: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
194: 81 50 subi r24, 0x01 ; 1
|
||||||
|
196: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
198: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
19a: 88 23 and r24, r24
|
||||||
|
19c: c1 f7 brne .-16 ; 0x18e <lcd_1s+0x10>
|
||||||
|
lcd_5ms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
19e: 0f 90 pop r0
|
||||||
|
1a0: cf 91 pop r28
|
||||||
|
1a2: df 91 pop r29
|
||||||
|
1a4: 08 95 ret
|
||||||
|
|
||||||
|
000001a6 <lcd_instruct>:
|
||||||
|
|
||||||
|
void lcd_instruct(uint8_t zeichen){
|
||||||
|
1a6: df 93 push r29
|
||||||
|
1a8: cf 93 push r28
|
||||||
|
1aa: 0f 92 push r0
|
||||||
|
1ac: cd b7 in r28, 0x3d ; 61
|
||||||
|
1ae: de b7 in r29, 0x3e ; 62
|
||||||
|
1b0: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
lcd_write(instruct,zeichen,0);
|
||||||
|
1b2: 84 e0 ldi r24, 0x04 ; 4
|
||||||
|
1b4: 69 81 ldd r22, Y+1 ; 0x01
|
||||||
|
1b6: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
1b8: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
}
|
||||||
|
1bc: 0f 90 pop r0
|
||||||
|
1be: cf 91 pop r28
|
||||||
|
1c0: df 91 pop r29
|
||||||
|
1c2: 08 95 ret
|
||||||
|
|
||||||
|
000001c4 <lcd_write>:
|
||||||
|
|
||||||
|
void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){
|
||||||
|
1c4: df 93 push r29
|
||||||
|
1c6: cf 93 push r28
|
||||||
|
1c8: 00 d0 rcall .+0 ; 0x1ca <lcd_write+0x6>
|
||||||
|
1ca: 00 d0 rcall .+0 ; 0x1cc <lcd_write+0x8>
|
||||||
|
1cc: 0f 92 push r0
|
||||||
|
1ce: cd b7 in r28, 0x3d ; 61
|
||||||
|
1d0: de b7 in r29, 0x3e ; 62
|
||||||
|
1d2: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
1d4: 6a 83 std Y+2, r22 ; 0x02
|
||||||
|
1d6: 4b 83 std Y+3, r20 ; 0x03
|
||||||
|
switch (lcd_whichwrite){
|
||||||
|
1d8: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
1da: 28 2f mov r18, r24
|
||||||
|
1dc: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
1de: 3d 83 std Y+5, r19 ; 0x05
|
||||||
|
1e0: 2c 83 std Y+4, r18 ; 0x04
|
||||||
|
1e2: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
1e4: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
1e6: 84 30 cpi r24, 0x04 ; 4
|
||||||
|
1e8: 91 05 cpc r25, r1
|
||||||
|
1ea: 7c f4 brge .+30 ; 0x20a <lcd_write+0x46>
|
||||||
|
1ec: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
1ee: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
1f0: 22 30 cpi r18, 0x02 ; 2
|
||||||
|
1f2: 31 05 cpc r19, r1
|
||||||
|
1f4: bc f4 brge .+46 ; 0x224 <lcd_write+0x60>
|
||||||
|
1f6: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
1f8: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
1fa: 00 97 sbiw r24, 0x00 ; 0
|
||||||
|
1fc: 01 f1 breq .+64 ; 0x23e <lcd_write+0x7a>
|
||||||
|
1fe: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
200: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
202: 21 30 cpi r18, 0x01 ; 1
|
||||||
|
204: 31 05 cpc r19, r1
|
||||||
|
206: b9 f0 breq .+46 ; 0x236 <lcd_write+0x72>
|
||||||
|
208: 21 c0 rjmp .+66 ; 0x24c <lcd_write+0x88>
|
||||||
|
20a: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
20c: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
20e: 84 30 cpi r24, 0x04 ; 4
|
||||||
|
210: 91 05 cpc r25, r1
|
||||||
|
212: e1 f4 brne .+56 ; 0x24c <lcd_write+0x88>
|
||||||
|
case instruct :
|
||||||
|
unset_lcd_RS;
|
||||||
|
214: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
216: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
218: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
21a: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
21c: 80 81 ld r24, Z
|
||||||
|
21e: 87 7f andi r24, 0xF7 ; 247
|
||||||
|
220: 8c 93 st X, r24
|
||||||
|
222: 14 c0 rjmp .+40 ; 0x24c <lcd_write+0x88>
|
||||||
|
break;
|
||||||
|
case line2:
|
||||||
|
case line1:
|
||||||
|
position = position & 0x3f;
|
||||||
|
224: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
226: 8f 73 andi r24, 0x3F ; 63
|
||||||
|
228: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
if (lcd_whichwrite == line2){ position=position + 0x40; };
|
||||||
|
22a: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
22c: 83 30 cpi r24, 0x03 ; 3
|
||||||
|
22e: 19 f4 brne .+6 ; 0x236 <lcd_write+0x72>
|
||||||
|
230: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
232: 80 5c subi r24, 0xC0 ; 192
|
||||||
|
234: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
case therepos:
|
||||||
|
lcd_instruct(lcd_mask_Write_Adress(position));
|
||||||
|
236: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
238: 80 68 ori r24, 0x80 ; 128
|
||||||
|
23a: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <lcd_instruct>
|
||||||
|
case here:
|
||||||
|
set_lcd_RS;
|
||||||
|
23e: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
240: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
242: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
244: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
246: 80 81 ld r24, Z
|
||||||
|
248: 88 60 ori r24, 0x08 ; 8
|
||||||
|
24a: 8c 93 st X, r24
|
||||||
|
lcd_dataport=(lcd_dataport & ~lcd_dataport_mask) | (zeichen & lcd_dataport_mask);
|
||||||
|
lcd_dataport=(lcd_dataport & ~lcd_dataport_mask) | (zeichen & lcd_dataport_mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef lcd_bus4
|
||||||
|
zeichen = zeichen << 4;
|
||||||
|
24c: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
24e: 82 95 swap r24
|
||||||
|
250: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
252: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
unset_lcd_E;
|
||||||
|
254: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
256: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
258: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
25a: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
25c: 80 81 ld r24, Z
|
||||||
|
25e: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
260: 8c 93 st X, r24
|
||||||
|
wait_100us();
|
||||||
|
262: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
set_lcd_E;
|
||||||
|
266: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
268: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
26a: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
26c: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
26e: 80 81 ld r24, Z
|
||||||
|
270: 84 60 ori r24, 0x04 ; 4
|
||||||
|
272: 8c 93 st X, r24
|
||||||
|
set_lcd_E;
|
||||||
|
274: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
276: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
278: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
27a: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
27c: 80 81 ld r24, Z
|
||||||
|
27e: 84 60 ori r24, 0x04 ; 4
|
||||||
|
280: 8c 93 st X, r24
|
||||||
|
lcd_dataport=(lcd_dataport & ~lcd_dataport_mask) | (zeichen & lcd_dataport_mask);
|
||||||
|
282: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
284: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
286: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
288: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
28a: 80 81 ld r24, Z
|
||||||
|
28c: 98 2f mov r25, r24
|
||||||
|
28e: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
290: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
292: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
294: 89 2b or r24, r25
|
||||||
|
296: 8c 93 st X, r24
|
||||||
|
lcd_dataport=(lcd_dataport & ~lcd_dataport_mask) | (zeichen & lcd_dataport_mask);
|
||||||
|
298: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
29a: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
29c: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
29e: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
2a0: 80 81 ld r24, Z
|
||||||
|
2a2: 98 2f mov r25, r24
|
||||||
|
2a4: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
2a6: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
2a8: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
2aa: 89 2b or r24, r25
|
||||||
|
2ac: 8c 93 st X, r24
|
||||||
|
#endif
|
||||||
|
|
||||||
|
unset_lcd_E;
|
||||||
|
2ae: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
2b0: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
2b2: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
2b4: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
2b6: 80 81 ld r24, Z
|
||||||
|
2b8: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
2ba: 8c 93 st X, r24
|
||||||
|
wait_100us();
|
||||||
|
2bc: 0e 94 a9 01 call 0x352 ; 0x352 <wait_100us>
|
||||||
|
|
||||||
|
}
|
||||||
|
2c0: 0f 90 pop r0
|
||||||
|
2c2: 0f 90 pop r0
|
||||||
|
2c4: 0f 90 pop r0
|
||||||
|
2c6: 0f 90 pop r0
|
||||||
|
2c8: 0f 90 pop r0
|
||||||
|
2ca: cf 91 pop r28
|
||||||
|
2cc: df 91 pop r29
|
||||||
|
2ce: 08 95 ret
|
||||||
|
|
||||||
|
000002d0 <lcd_blank_line>:
|
||||||
|
|
||||||
|
void lcd_blank_line(uint8_t lcd_whichwrite)
|
||||||
|
{
|
||||||
|
2d0: df 93 push r29
|
||||||
|
2d2: cf 93 push r28
|
||||||
|
2d4: 00 d0 rcall .+0 ; 0x2d6 <lcd_blank_line+0x6>
|
||||||
|
2d6: 00 d0 rcall .+0 ; 0x2d8 <lcd_blank_line+0x8>
|
||||||
|
2d8: 0f 92 push r0
|
||||||
|
2da: cd b7 in r28, 0x3d ; 61
|
||||||
|
2dc: de b7 in r29, 0x3e ; 62
|
||||||
|
2de: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
uint8_t count;
|
||||||
|
uint8_t countin;
|
||||||
|
|
||||||
|
switch (lcd_whichwrite){
|
||||||
|
2e0: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
2e2: 28 2f mov r18, r24
|
||||||
|
2e4: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
2e6: 3d 83 std Y+5, r19 ; 0x05
|
||||||
|
2e8: 2c 83 std Y+4, r18 ; 0x04
|
||||||
|
2ea: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
2ec: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
2ee: 83 30 cpi r24, 0x03 ; 3
|
||||||
|
2f0: 91 05 cpc r25, r1
|
||||||
|
2f2: 71 f0 breq .+28 ; 0x310 <lcd_blank_line+0x40>
|
||||||
|
2f4: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
2f6: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
2f8: 24 30 cpi r18, 0x04 ; 4
|
||||||
|
2fa: 31 05 cpc r19, r1
|
||||||
|
2fc: 31 f0 breq .+12 ; 0x30a <lcd_blank_line+0x3a>
|
||||||
|
2fe: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
300: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
302: 82 30 cpi r24, 0x02 ; 2
|
||||||
|
304: 91 05 cpc r25, r1
|
||||||
|
306: 39 f0 breq .+14 ; 0x316 <lcd_blank_line+0x46>
|
||||||
|
308: 07 c0 rjmp .+14 ; 0x318 <lcd_blank_line+0x48>
|
||||||
|
case instruct:
|
||||||
|
lcd_blank_line(line1);
|
||||||
|
30a: 82 e0 ldi r24, 0x02 ; 2
|
||||||
|
30c: 0e 94 68 01 call 0x2d0 ; 0x2d0 <lcd_blank_line>
|
||||||
|
case line2:
|
||||||
|
count=0x40;
|
||||||
|
310: 80 e4 ldi r24, 0x40 ; 64
|
||||||
|
312: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
314: 01 c0 rjmp .+2 ; 0x318 <lcd_blank_line+0x48>
|
||||||
|
break;
|
||||||
|
case line1:
|
||||||
|
count=0;
|
||||||
|
316: 1a 82 std Y+2, r1 ; 0x02
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (countin=count; countin < count+15; countin++){
|
||||||
|
318: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
31a: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
31c: 08 c0 rjmp .+16 ; 0x32e <lcd_blank_line+0x5e>
|
||||||
|
lcd_write(therepos, 32, countin);
|
||||||
|
31e: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
320: 60 e2 ldi r22, 0x20 ; 32
|
||||||
|
322: 49 81 ldd r20, Y+1 ; 0x01
|
||||||
|
324: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
case line1:
|
||||||
|
count=0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (countin=count; countin < count+15; countin++){
|
||||||
|
328: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
32a: 8f 5f subi r24, 0xFF ; 255
|
||||||
|
32c: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
32e: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
330: 28 2f mov r18, r24
|
||||||
|
332: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
334: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
336: 88 2f mov r24, r24
|
||||||
|
338: 90 e0 ldi r25, 0x00 ; 0
|
||||||
|
33a: 0f 96 adiw r24, 0x0f ; 15
|
||||||
|
33c: 28 17 cp r18, r24
|
||||||
|
33e: 39 07 cpc r19, r25
|
||||||
|
340: 74 f3 brlt .-36 ; 0x31e <lcd_blank_line+0x4e>
|
||||||
|
lcd_write(therepos, 32, countin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
342: 0f 90 pop r0
|
||||||
|
344: 0f 90 pop r0
|
||||||
|
346: 0f 90 pop r0
|
||||||
|
348: 0f 90 pop r0
|
||||||
|
34a: 0f 90 pop r0
|
||||||
|
34c: cf 91 pop r28
|
||||||
|
34e: df 91 pop r29
|
||||||
|
350: 08 95 ret
|
||||||
|
|
||||||
|
00000352 <wait_100us>:
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
void wait_100us(void){
|
||||||
|
352: df 93 push r29
|
||||||
|
354: cf 93 push r28
|
||||||
|
356: 00 d0 rcall .+0 ; 0x358 <wait_100us+0x6>
|
||||||
|
358: 00 d0 rcall .+0 ; 0x35a <wait_100us+0x8>
|
||||||
|
35a: 0f 92 push r0
|
||||||
|
35c: cd b7 in r28, 0x3d ; 61
|
||||||
|
35e: de b7 in r29, 0x3e ; 62
|
||||||
|
for (volatile uint8_t i=68;i--;i>0){
|
||||||
|
360: 84 e4 ldi r24, 0x44 ; 68
|
||||||
|
362: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
364: 02 c0 rjmp .+4 ; 0x36a <wait_100us+0x18>
|
||||||
|
i;
|
||||||
|
366: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
void wait_100us(void){
|
||||||
|
for (volatile uint8_t i=68;i--;i>0){
|
||||||
|
368: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
36a: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
36c: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
36e: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
370: 8d 83 std Y+5, r24 ; 0x05
|
||||||
|
372: 8d 81 ldd r24, Y+5 ; 0x05
|
||||||
|
374: 88 23 and r24, r24
|
||||||
|
376: 11 f0 breq .+4 ; 0x37c <wait_100us+0x2a>
|
||||||
|
378: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
37a: 8d 83 std Y+5, r24 ; 0x05
|
||||||
|
37c: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
37e: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
380: 81 50 subi r24, 0x01 ; 1
|
||||||
|
382: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
384: 99 23 and r25, r25
|
||||||
|
386: 79 f7 brne .-34 ; 0x366 <wait_100us+0x14>
|
||||||
|
i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
388: 0f 90 pop r0
|
||||||
|
38a: 0f 90 pop r0
|
||||||
|
38c: 0f 90 pop r0
|
||||||
|
38e: 0f 90 pop r0
|
||||||
|
390: 0f 90 pop r0
|
||||||
|
392: cf 91 pop r28
|
||||||
|
394: df 91 pop r29
|
||||||
|
396: 08 95 ret
|
||||||
|
|
||||||
|
00000398 <main>:
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
398: df 93 push r29
|
||||||
|
39a: cf 93 push r28
|
||||||
|
39c: cd b7 in r28, 0x3d ; 61
|
||||||
|
39e: de b7 in r29, 0x3e ; 62
|
||||||
|
lcd_1s();
|
||||||
|
3a0: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
lcd_init();
|
||||||
|
3a4: 0e 94 49 00 call 0x92 ; 0x92 <lcd_init>
|
||||||
|
lcd_write(therepos,0x41,0x08);
|
||||||
|
3a8: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
3aa: 61 e4 ldi r22, 0x41 ; 65
|
||||||
|
3ac: 48 e0 ldi r20, 0x08 ; 8
|
||||||
|
3ae: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
lcd_write(here,0x42,0);
|
||||||
|
3b2: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3b4: 62 e4 ldi r22, 0x42 ; 66
|
||||||
|
3b6: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3b8: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
lcd_write(here,0x43,0);
|
||||||
|
3bc: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3be: 63 e4 ldi r22, 0x43 ; 67
|
||||||
|
3c0: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3c2: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
lcd_write(here,0x44,0);
|
||||||
|
3c6: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3c8: 64 e4 ldi r22, 0x44 ; 68
|
||||||
|
3ca: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3cc: 0e 94 e2 00 call 0x1c4 ; 0x1c4 <lcd_write>
|
||||||
|
lcd_1s();
|
||||||
|
3d0: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
3d4: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
DDRB = 0x0f;
|
||||||
|
3d8: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
3da: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3dc: 8f e0 ldi r24, 0x0F ; 15
|
||||||
|
3de: 80 83 st Z, r24
|
||||||
|
while(1==1){
|
||||||
|
PORTB = 0x0f;
|
||||||
|
3e0: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3e2: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3e4: 8f e0 ldi r24, 0x0F ; 15
|
||||||
|
3e6: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
3e8: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
PORTB = 0x05;
|
||||||
|
3ec: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3ee: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3f0: 85 e0 ldi r24, 0x05 ; 5
|
||||||
|
3f2: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
3f4: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
PORTB = 0x0A;
|
||||||
|
3f8: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3fa: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3fc: 8a e0 ldi r24, 0x0A ; 10
|
||||||
|
3fe: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
400: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_1s>
|
||||||
|
404: ed cf rjmp .-38 ; 0x3e0 <main+0x48>
|
||||||
|
|
||||||
|
00000406 <_exit>:
|
||||||
|
406: f8 94 cli
|
||||||
|
|
||||||
|
00000408 <__stop_program>:
|
||||||
|
408: ff cf rjmp .-2 ; 0x408 <__stop_program>
|
370
Libs/LCD4/Debug/LCD4.map
Normal file
370
Libs/LCD4/Debug/LCD4.map
Normal file
|
@ -0,0 +1,370 @@
|
||||||
|
Archive member included because of file (symbol)
|
||||||
|
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o (exit)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
./lcd4.o (__do_copy_data)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
./lcd4.o (__do_clear_bss)
|
||||||
|
|
||||||
|
Memory Configuration
|
||||||
|
|
||||||
|
Name Origin Length Attributes
|
||||||
|
text 0x00000000 0x00020000 xr
|
||||||
|
data 0x00800060 0x0000ffa0 rw !x
|
||||||
|
eeprom 0x00810000 0x00010000 rw !x
|
||||||
|
fuse 0x00820000 0x00000400 rw !x
|
||||||
|
lock 0x00830000 0x00000400 rw !x
|
||||||
|
signature 0x00840000 0x00000400 rw !x
|
||||||
|
*default* 0x00000000 0xffffffff
|
||||||
|
|
||||||
|
Linker script and memory map
|
||||||
|
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
LOAD ./lcd4.o
|
||||||
|
LOAD ./lcd_wait.o
|
||||||
|
LOAD ./lcdtest.o
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/libc.a
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a
|
||||||
|
|
||||||
|
.hash
|
||||||
|
*(.hash)
|
||||||
|
|
||||||
|
.dynsym
|
||||||
|
*(.dynsym)
|
||||||
|
|
||||||
|
.dynstr
|
||||||
|
*(.dynstr)
|
||||||
|
|
||||||
|
.gnu.version
|
||||||
|
*(.gnu.version)
|
||||||
|
|
||||||
|
.gnu.version_d
|
||||||
|
*(.gnu.version_d)
|
||||||
|
|
||||||
|
.gnu.version_r
|
||||||
|
*(.gnu.version_r)
|
||||||
|
|
||||||
|
.rel.init
|
||||||
|
*(.rel.init)
|
||||||
|
|
||||||
|
.rela.init
|
||||||
|
*(.rela.init)
|
||||||
|
|
||||||
|
.rel.text
|
||||||
|
*(.rel.text)
|
||||||
|
*(.rel.text.*)
|
||||||
|
*(.rel.gnu.linkonce.t*)
|
||||||
|
|
||||||
|
.rela.text
|
||||||
|
*(.rela.text)
|
||||||
|
*(.rela.text.*)
|
||||||
|
*(.rela.gnu.linkonce.t*)
|
||||||
|
|
||||||
|
.rel.fini
|
||||||
|
*(.rel.fini)
|
||||||
|
|
||||||
|
.rela.fini
|
||||||
|
*(.rela.fini)
|
||||||
|
|
||||||
|
.rel.rodata
|
||||||
|
*(.rel.rodata)
|
||||||
|
*(.rel.rodata.*)
|
||||||
|
*(.rel.gnu.linkonce.r*)
|
||||||
|
|
||||||
|
.rela.rodata
|
||||||
|
*(.rela.rodata)
|
||||||
|
*(.rela.rodata.*)
|
||||||
|
*(.rela.gnu.linkonce.r*)
|
||||||
|
|
||||||
|
.rel.data
|
||||||
|
*(.rel.data)
|
||||||
|
*(.rel.data.*)
|
||||||
|
*(.rel.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
.rela.data
|
||||||
|
*(.rela.data)
|
||||||
|
*(.rela.data.*)
|
||||||
|
*(.rela.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
.rel.ctors
|
||||||
|
*(.rel.ctors)
|
||||||
|
|
||||||
|
.rela.ctors
|
||||||
|
*(.rela.ctors)
|
||||||
|
|
||||||
|
.rel.dtors
|
||||||
|
*(.rel.dtors)
|
||||||
|
|
||||||
|
.rela.dtors
|
||||||
|
*(.rela.dtors)
|
||||||
|
|
||||||
|
.rel.got
|
||||||
|
*(.rel.got)
|
||||||
|
|
||||||
|
.rela.got
|
||||||
|
*(.rela.got)
|
||||||
|
|
||||||
|
.rel.bss
|
||||||
|
*(.rel.bss)
|
||||||
|
|
||||||
|
.rela.bss
|
||||||
|
*(.rela.bss)
|
||||||
|
|
||||||
|
.rel.plt
|
||||||
|
*(.rel.plt)
|
||||||
|
|
||||||
|
.rela.plt
|
||||||
|
*(.rela.plt)
|
||||||
|
|
||||||
|
.text 0x00000000 0x40a
|
||||||
|
*(.vectors)
|
||||||
|
.vectors 0x00000000 0x54 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
0x00000000 __vectors
|
||||||
|
0x00000000 __vector_default
|
||||||
|
*(.vectors)
|
||||||
|
*(.progmem.gcc*)
|
||||||
|
*(.progmem*)
|
||||||
|
0x00000054 . = ALIGN (0x2)
|
||||||
|
0x00000054 __trampolines_start = .
|
||||||
|
*(.trampolines)
|
||||||
|
.trampolines 0x00000054 0x0 linker stubs
|
||||||
|
*(.trampolines*)
|
||||||
|
0x00000054 __trampolines_end = .
|
||||||
|
*(.jumptables)
|
||||||
|
*(.jumptables*)
|
||||||
|
*(.lowtext)
|
||||||
|
*(.lowtext*)
|
||||||
|
0x00000054 __ctors_start = .
|
||||||
|
*(.ctors)
|
||||||
|
0x00000054 __ctors_end = .
|
||||||
|
0x00000054 __dtors_start = .
|
||||||
|
*(.dtors)
|
||||||
|
0x00000054 __dtors_end = .
|
||||||
|
SORT(*)(.ctors)
|
||||||
|
SORT(*)(.dtors)
|
||||||
|
*(.init0)
|
||||||
|
.init0 0x00000054 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
0x00000054 __init
|
||||||
|
*(.init0)
|
||||||
|
*(.init1)
|
||||||
|
*(.init1)
|
||||||
|
*(.init2)
|
||||||
|
.init2 0x00000054 0xc /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
*(.init2)
|
||||||
|
*(.init3)
|
||||||
|
*(.init3)
|
||||||
|
*(.init4)
|
||||||
|
.init4 0x00000060 0x16 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
0x00000060 __do_copy_data
|
||||||
|
.init4 0x00000076 0x10 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
0x00000076 __do_clear_bss
|
||||||
|
*(.init4)
|
||||||
|
*(.init5)
|
||||||
|
*(.init5)
|
||||||
|
*(.init6)
|
||||||
|
*(.init6)
|
||||||
|
*(.init7)
|
||||||
|
*(.init7)
|
||||||
|
*(.init8)
|
||||||
|
*(.init8)
|
||||||
|
*(.init9)
|
||||||
|
.init9 0x00000086 0x8 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
*(.init9)
|
||||||
|
*(.text)
|
||||||
|
.text 0x0000008e 0x4 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
0x0000008e __vector_1
|
||||||
|
0x0000008e __vector_12
|
||||||
|
0x0000008e __bad_interrupt
|
||||||
|
0x0000008e __vector_6
|
||||||
|
0x0000008e __vector_3
|
||||||
|
0x0000008e __vector_11
|
||||||
|
0x0000008e __vector_13
|
||||||
|
0x0000008e __vector_17
|
||||||
|
0x0000008e __vector_19
|
||||||
|
0x0000008e __vector_7
|
||||||
|
0x0000008e __vector_5
|
||||||
|
0x0000008e __vector_4
|
||||||
|
0x0000008e __vector_9
|
||||||
|
0x0000008e __vector_2
|
||||||
|
0x0000008e __vector_15
|
||||||
|
0x0000008e __vector_8
|
||||||
|
0x0000008e __vector_14
|
||||||
|
0x0000008e __vector_10
|
||||||
|
0x0000008e __vector_16
|
||||||
|
0x0000008e __vector_18
|
||||||
|
0x0000008e __vector_20
|
||||||
|
.text 0x00000092 0x2c0 ./lcd4.o
|
||||||
|
0x000001c4 lcd_write
|
||||||
|
0x0000017e lcd_1s
|
||||||
|
0x000002d0 lcd_blank_line
|
||||||
|
0x00000156 lcd_5ms
|
||||||
|
0x000001a6 lcd_instruct
|
||||||
|
0x00000092 lcd_init
|
||||||
|
.text 0x00000352 0x46 ./lcd_wait.o
|
||||||
|
0x00000352 wait_100us
|
||||||
|
.text 0x00000398 0x6e ./lcdtest.o
|
||||||
|
0x00000398 main
|
||||||
|
.text 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
.text 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
.text 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
0x00000406 . = ALIGN (0x2)
|
||||||
|
*(.text.*)
|
||||||
|
.text.libgcc 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
.text.libgcc 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
.text.libgcc 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
0x00000406 . = ALIGN (0x2)
|
||||||
|
*(.fini9)
|
||||||
|
.fini9 0x00000406 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
0x00000406 exit
|
||||||
|
0x00000406 _exit
|
||||||
|
*(.fini9)
|
||||||
|
*(.fini8)
|
||||||
|
*(.fini8)
|
||||||
|
*(.fini7)
|
||||||
|
*(.fini7)
|
||||||
|
*(.fini6)
|
||||||
|
*(.fini6)
|
||||||
|
*(.fini5)
|
||||||
|
*(.fini5)
|
||||||
|
*(.fini4)
|
||||||
|
*(.fini4)
|
||||||
|
*(.fini3)
|
||||||
|
*(.fini3)
|
||||||
|
*(.fini2)
|
||||||
|
*(.fini2)
|
||||||
|
*(.fini1)
|
||||||
|
*(.fini1)
|
||||||
|
*(.fini0)
|
||||||
|
.fini0 0x00000406 0x4 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
*(.fini0)
|
||||||
|
0x0000040a _etext = .
|
||||||
|
|
||||||
|
.data 0x00800060 0x0 load address 0x0000040a
|
||||||
|
0x00800060 PROVIDE (__data_start, .)
|
||||||
|
*(.data)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
.data 0x00800060 0x0 ./lcd4.o
|
||||||
|
.data 0x00800060 0x0 ./lcd_wait.o
|
||||||
|
.data 0x00800060 0x0 ./lcdtest.o
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
*(.data*)
|
||||||
|
*(.rodata)
|
||||||
|
*(.rodata*)
|
||||||
|
*(.gnu.linkonce.d*)
|
||||||
|
0x00800060 . = ALIGN (0x2)
|
||||||
|
0x00800060 _edata = .
|
||||||
|
0x00800060 PROVIDE (__data_end, .)
|
||||||
|
|
||||||
|
.bss 0x00800060 0x0 load address 0x0000040a
|
||||||
|
0x00800060 PROVIDE (__bss_start, .)
|
||||||
|
*(.bss)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
.bss 0x00800060 0x0 ./lcd4.o
|
||||||
|
.bss 0x00800060 0x0 ./lcd_wait.o
|
||||||
|
.bss 0x00800060 0x0 ./lcdtest.o
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_exit.o)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_copy_data.o)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr5/libgcc.a(_clear_bss.o)
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
0x00800060 PROVIDE (__bss_end, .)
|
||||||
|
0x0000040a __data_load_start = LOADADDR (.data)
|
||||||
|
0x0000040a __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||||
|
|
||||||
|
.noinit 0x00800060 0x0
|
||||||
|
0x00800060 PROVIDE (__noinit_start, .)
|
||||||
|
*(.noinit*)
|
||||||
|
0x00800060 PROVIDE (__noinit_end, .)
|
||||||
|
0x00800060 _end = .
|
||||||
|
0x00800060 PROVIDE (__heap_start, .)
|
||||||
|
|
||||||
|
.eeprom 0x00810000 0x0
|
||||||
|
*(.eeprom*)
|
||||||
|
0x00810000 __eeprom_end = .
|
||||||
|
|
||||||
|
.fuse
|
||||||
|
*(.fuse)
|
||||||
|
*(.lfuse)
|
||||||
|
*(.hfuse)
|
||||||
|
*(.efuse)
|
||||||
|
|
||||||
|
.lock
|
||||||
|
*(.lock*)
|
||||||
|
|
||||||
|
.signature
|
||||||
|
*(.signature*)
|
||||||
|
|
||||||
|
.stab 0x00000000 0x111c
|
||||||
|
*(.stab)
|
||||||
|
.stab 0x00000000 0x6b4 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
.stab 0x000006b4 0x708 ./lcd4.o
|
||||||
|
0x714 (size before relaxing)
|
||||||
|
.stab 0x00000dbc 0x180 ./lcd_wait.o
|
||||||
|
0x348 (size before relaxing)
|
||||||
|
.stab 0x00000f3c 0x1e0 ./lcdtest.o
|
||||||
|
0x3a8 (size before relaxing)
|
||||||
|
|
||||||
|
.stabstr 0x00000000 0x7cb
|
||||||
|
*(.stabstr)
|
||||||
|
.stabstr 0x00000000 0x7cb /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr5/crtm16.o
|
||||||
|
|
||||||
|
.stab.excl
|
||||||
|
*(.stab.excl)
|
||||||
|
|
||||||
|
.stab.exclstr
|
||||||
|
*(.stab.exclstr)
|
||||||
|
|
||||||
|
.stab.index
|
||||||
|
*(.stab.index)
|
||||||
|
|
||||||
|
.stab.indexstr
|
||||||
|
*(.stab.indexstr)
|
||||||
|
|
||||||
|
.comment
|
||||||
|
*(.comment)
|
||||||
|
|
||||||
|
.debug
|
||||||
|
*(.debug)
|
||||||
|
|
||||||
|
.line
|
||||||
|
*(.line)
|
||||||
|
|
||||||
|
.debug_srcinfo
|
||||||
|
*(.debug_srcinfo)
|
||||||
|
|
||||||
|
.debug_sfnames
|
||||||
|
*(.debug_sfnames)
|
||||||
|
|
||||||
|
.debug_aranges
|
||||||
|
*(.debug_aranges)
|
||||||
|
|
||||||
|
.debug_pubnames
|
||||||
|
*(.debug_pubnames)
|
||||||
|
|
||||||
|
.debug_info
|
||||||
|
*(.debug_info)
|
||||||
|
*(.gnu.linkonce.wi.*)
|
||||||
|
|
||||||
|
.debug_abbrev
|
||||||
|
*(.debug_abbrev)
|
||||||
|
|
||||||
|
.debug_line
|
||||||
|
*(.debug_line)
|
||||||
|
|
||||||
|
.debug_frame
|
||||||
|
*(.debug_frame)
|
||||||
|
|
||||||
|
.debug_str
|
||||||
|
*(.debug_str)
|
||||||
|
|
||||||
|
.debug_loc
|
||||||
|
*(.debug_loc)
|
||||||
|
|
||||||
|
.debug_macinfo
|
||||||
|
*(.debug_macinfo)
|
||||||
|
OUTPUT(LCD4.elf elf32-avr)
|
||||||
|
LOAD linker stubs
|
3
Libs/LCD4/Debug/lcd4.d
Normal file
3
Libs/LCD4/Debug/lcd4.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcd4.d lcd4.o: ../lcd4.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/Debug/lcd4.o
Normal file
BIN
Libs/LCD4/Debug/lcd4.o
Normal file
Binary file not shown.
3
Libs/LCD4/Debug/lcd_wait.d
Normal file
3
Libs/LCD4/Debug/lcd_wait.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcd_wait.d lcd_wait.o: ../lcd_wait.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/Debug/lcd_wait.o
Normal file
BIN
Libs/LCD4/Debug/lcd_wait.o
Normal file
Binary file not shown.
3
Libs/LCD4/Debug/lcdtest.d
Normal file
3
Libs/LCD4/Debug/lcdtest.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcdtest.d lcdtest.o: ../lcdtest.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/Debug/lcdtest.o
Normal file
BIN
Libs/LCD4/Debug/lcdtest.o
Normal file
Binary file not shown.
72
Libs/LCD4/Debug/makefile
Normal file
72
Libs/LCD4/Debug/makefile
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
-include ../makefile.init
|
||||||
|
|
||||||
|
RM := rm -rf
|
||||||
|
|
||||||
|
# All of the sources participating in the build are defined here
|
||||||
|
-include sources.mk
|
||||||
|
-include subdir.mk
|
||||||
|
-include objects.mk
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
ifneq ($(strip $(C_DEPS)),)
|
||||||
|
-include $(C_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(ASM_DEPS)),)
|
||||||
|
-include $(ASM_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(S_DEPS)),)
|
||||||
|
-include $(S_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(S_UPPER_DEPS)),)
|
||||||
|
-include $(S_UPPER_DEPS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-include ../makefile.defs
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
LSS += \
|
||||||
|
LCD4.lss \
|
||||||
|
|
||||||
|
SIZEDUMMY += \
|
||||||
|
sizedummy \
|
||||||
|
|
||||||
|
|
||||||
|
# All Target
|
||||||
|
all: LCD4.elf secondary-outputs
|
||||||
|
|
||||||
|
# Tool invocations
|
||||||
|
LCD4.elf: $(OBJS) $(USER_OBJS)
|
||||||
|
@echo 'Building target: $@'
|
||||||
|
@echo 'Invoking: AVR C Linker'
|
||||||
|
avr-gcc -Wl,-Map,LCD4.map -mmcu=atmega16 -o"LCD4.elf" $(OBJS) $(USER_OBJS) $(LIBS)
|
||||||
|
@echo 'Finished building target: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
LCD4.lss: LCD4.elf
|
||||||
|
@echo 'Invoking: AVR Create Extended Listing'
|
||||||
|
-avr-objdump -h -S LCD4.elf >"LCD4.lss"
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
sizedummy: LCD4.elf
|
||||||
|
@echo 'Invoking: Print Size'
|
||||||
|
-avr-size --format=avr --mcu=atmega16 LCD4.elf
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
# Other Targets
|
||||||
|
clean:
|
||||||
|
-$(RM) $(OBJS)$(C_DEPS)$(ASM_DEPS)$(ELFS)$(LSS)$(S_DEPS)$(SIZEDUMMY)$(S_UPPER_DEPS) LCD4.elf
|
||||||
|
-@echo ' '
|
||||||
|
|
||||||
|
secondary-outputs: $(LSS) $(SIZEDUMMY)
|
||||||
|
|
||||||
|
.PHONY: all clean dependents
|
||||||
|
.SECONDARY:
|
||||||
|
|
||||||
|
-include ../makefile.targets
|
7
Libs/LCD4/Debug/objects.mk
Normal file
7
Libs/LCD4/Debug/objects.mk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
USER_OBJS :=
|
||||||
|
|
||||||
|
LIBS :=
|
23
Libs/LCD4/Debug/sources.mk
Normal file
23
Libs/LCD4/Debug/sources.mk
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
O_SRCS :=
|
||||||
|
C_SRCS :=
|
||||||
|
S_UPPER_SRCS :=
|
||||||
|
S_SRCS :=
|
||||||
|
OBJ_SRCS :=
|
||||||
|
ASM_SRCS :=
|
||||||
|
OBJS :=
|
||||||
|
C_DEPS :=
|
||||||
|
ASM_DEPS :=
|
||||||
|
ELFS :=
|
||||||
|
LSS :=
|
||||||
|
S_DEPS :=
|
||||||
|
SIZEDUMMY :=
|
||||||
|
S_UPPER_DEPS :=
|
||||||
|
|
||||||
|
# Every subdirectory with source files must be described here
|
||||||
|
SUBDIRS := \
|
||||||
|
. \
|
||||||
|
|
30
Libs/LCD4/Debug/subdir.mk
Normal file
30
Libs/LCD4/Debug/subdir.mk
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
C_SRCS += \
|
||||||
|
../lcd4.c \
|
||||||
|
../lcd_wait.c \
|
||||||
|
../lcdtest.c
|
||||||
|
|
||||||
|
OBJS += \
|
||||||
|
./lcd4.o \
|
||||||
|
./lcd_wait.o \
|
||||||
|
./lcdtest.o
|
||||||
|
|
||||||
|
C_DEPS += \
|
||||||
|
./lcd4.d \
|
||||||
|
./lcd_wait.d \
|
||||||
|
./lcdtest.d
|
||||||
|
|
||||||
|
|
||||||
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
|
%.o: ../%.c
|
||||||
|
@echo 'Building file: $<'
|
||||||
|
@echo 'Invoking: AVR Compiler'
|
||||||
|
avr-gcc -Wall -g2 -gstabs -O0 -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega16 -DF_CPU=1000000UL -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -c -o"$@" "$<"
|
||||||
|
@echo 'Finished building: $<'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
|
429
Libs/LCD4/Makefile
Normal file
429
Libs/LCD4/Makefile
Normal file
|
@ -0,0 +1,429 @@
|
||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# WinAVR Sample makefile written by Eric B. Weddington, Jörg Wunsch, et al.
|
||||||
|
# Released to the Public Domain
|
||||||
|
# Please read the make user manual!
|
||||||
|
#
|
||||||
|
# Additional material for this makefile was submitted by:
|
||||||
|
# Tim Henigan
|
||||||
|
# Peter Fleury
|
||||||
|
# Reiner Patommel
|
||||||
|
# Sander Pool
|
||||||
|
# Frederik Rouleau
|
||||||
|
# Markus Pfaff
|
||||||
|
#
|
||||||
|
# On command line:
|
||||||
|
#
|
||||||
|
# make all = Make software.
|
||||||
|
#
|
||||||
|
# make clean = Clean out built project files.
|
||||||
|
#
|
||||||
|
# make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
|
||||||
|
#
|
||||||
|
# make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
|
||||||
|
# 4.07 or greater).
|
||||||
|
#
|
||||||
|
# make program = Download the hex file to the device, using avrdude. Please
|
||||||
|
# customize the avrdude settings below first!
|
||||||
|
#
|
||||||
|
# make filename.s = Just compile filename.c into the assembler code only
|
||||||
|
#
|
||||||
|
# To rebuild project do "make clean" then "make all".
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
MCU = at90s2313
|
||||||
|
|
||||||
|
# Output format. (can be srec, ihex, binary)
|
||||||
|
FORMAT = ihex
|
||||||
|
|
||||||
|
# Target file name (without extension).
|
||||||
|
TARGET = lcdtest
|
||||||
|
|
||||||
|
|
||||||
|
# List C source files here. (C dependencies are automatically generated.)
|
||||||
|
SRC = avrmb2313_lcd.c lcd_wait.c $(TARGET).c
|
||||||
|
# lcd.c
|
||||||
|
# avrmb2313.c
|
||||||
|
|
||||||
|
|
||||||
|
# List Assembler source files here.
|
||||||
|
# Make them always end in a capital .S. Files ending in a lowercase .s
|
||||||
|
# will not be considered source files but generated files (assembler
|
||||||
|
# output from the compiler), and will be deleted upon "make clean"!
|
||||||
|
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
||||||
|
# it will preserve the spelling of the filenames, and gcc itself does
|
||||||
|
# care about how the name is spelled on its command-line.
|
||||||
|
ASRC =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Optimization level, can be [0, 1, 2, 3, s].
|
||||||
|
# 0 = turn off optimization. s = optimize for size.
|
||||||
|
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
|
||||||
|
OPT = s
|
||||||
|
|
||||||
|
# Debugging format.
|
||||||
|
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
|
||||||
|
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
|
||||||
|
DEBUG = stabs
|
||||||
|
|
||||||
|
# List any extra directories to look for include files here.
|
||||||
|
# Each directory must be seperated by a space.
|
||||||
|
EXTRAINCDIRS =
|
||||||
|
|
||||||
|
|
||||||
|
# Compiler flag to set the C Standard level.
|
||||||
|
# c89 - "ANSI" C
|
||||||
|
# gnu89 - c89 plus GCC extensions
|
||||||
|
# c99 - ISO C99 standard (not yet fully implemented)
|
||||||
|
# gnu99 - c99 plus GCC extensions
|
||||||
|
CSTANDARD = -std=gnu99
|
||||||
|
|
||||||
|
# Place -D or -U options here
|
||||||
|
CDEFS =
|
||||||
|
|
||||||
|
# Place -I options here
|
||||||
|
CINCS =
|
||||||
|
|
||||||
|
|
||||||
|
# Compiler flags.
|
||||||
|
# -g*: generate debugging information
|
||||||
|
# -O*: optimization level
|
||||||
|
# -f...: tuning, see GCC manual and avr-libc documentation
|
||||||
|
# -Wall...: warning level
|
||||||
|
# -Wa,...: tell GCC to pass this to the assembler.
|
||||||
|
# -adhlns...: create assembler listing
|
||||||
|
CFLAGS = -g$(DEBUG)
|
||||||
|
CFLAGS += $(CDEFS) $(CINCS)
|
||||||
|
CFLAGS += -O$(OPT)
|
||||||
|
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
||||||
|
CFLAGS += -Wall -Wstrict-prototypes
|
||||||
|
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
|
||||||
|
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||||
|
CFLAGS += $(CSTANDARD)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Assembler flags.
|
||||||
|
# -Wa,...: tell GCC to pass this to the assembler.
|
||||||
|
# -ahlms: create listing
|
||||||
|
# -gstabs: have the assembler create line number information; note that
|
||||||
|
# for use in COFF files, additional information about filenames
|
||||||
|
# and function names needs to be present in the assembler source
|
||||||
|
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||||
|
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Additional libraries.
|
||||||
|
|
||||||
|
# Minimalistic printf version
|
||||||
|
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
|
||||||
|
|
||||||
|
# Floating point printf version (requires MATH_LIB = -lm below)
|
||||||
|
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
|
||||||
|
|
||||||
|
PRINTF_LIB =
|
||||||
|
|
||||||
|
# Minimalistic scanf version
|
||||||
|
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
|
||||||
|
|
||||||
|
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
|
||||||
|
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
|
||||||
|
|
||||||
|
SCANF_LIB =
|
||||||
|
|
||||||
|
MATH_LIB = -lm
|
||||||
|
|
||||||
|
# External memory options
|
||||||
|
|
||||||
|
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||||
|
# used for variables (.data/.bss) and heap (malloc()).
|
||||||
|
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
|
||||||
|
|
||||||
|
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||||
|
# only used for heap (malloc()).
|
||||||
|
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
|
||||||
|
|
||||||
|
EXTMEMOPTS =
|
||||||
|
|
||||||
|
# Linker flags.
|
||||||
|
# -Wl,...: tell GCC to pass this to linker.
|
||||||
|
# -Map: create map file
|
||||||
|
# --cref: add cross reference to map file
|
||||||
|
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
|
||||||
|
LDFLAGS += $(EXTMEMOPTS)
|
||||||
|
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Programming support using avrdude. Settings and variables.
|
||||||
|
|
||||||
|
# Programming hardware: alf avr910 avrisp bascom bsd
|
||||||
|
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
||||||
|
#
|
||||||
|
# Type: avrdude -c ?
|
||||||
|
# to get a full listing.
|
||||||
|
#
|
||||||
|
AVRDUDE_PROGRAMMER = stk500
|
||||||
|
|
||||||
|
# com1 = serial port. Use lpt1 to connect to parallel port.
|
||||||
|
AVRDUDE_PORT = com1 # programmer connected to serial device
|
||||||
|
|
||||||
|
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
|
||||||
|
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
||||||
|
|
||||||
|
|
||||||
|
# Uncomment the following if you want avrdude's erase cycle counter.
|
||||||
|
# Note that this counter needs to be initialized first using -Yn,
|
||||||
|
# see avrdude manual.
|
||||||
|
#AVRDUDE_ERASE_COUNTER = -y
|
||||||
|
|
||||||
|
# Uncomment the following if you do /not/ wish a verification to be
|
||||||
|
# performed after programming the device.
|
||||||
|
#AVRDUDE_NO_VERIFY = -V
|
||||||
|
|
||||||
|
# Increase verbosity level. Please use this when submitting bug
|
||||||
|
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
||||||
|
# to submit bug reports.
|
||||||
|
#AVRDUDE_VERBOSE = -v -v
|
||||||
|
|
||||||
|
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
|
||||||
|
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
|
||||||
|
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
|
||||||
|
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Define directories, if needed.
|
||||||
|
DIRAVR = c:/winavr
|
||||||
|
DIRAVRBIN = $(DIRAVR)/bin
|
||||||
|
DIRAVRUTILS = $(DIRAVR)/utils/bin
|
||||||
|
DIRINC = .
|
||||||
|
DIRLIB = $(DIRAVR)/avr/lib
|
||||||
|
|
||||||
|
|
||||||
|
# Define programs and commands.
|
||||||
|
SHELL = sh
|
||||||
|
CC = avr-gcc
|
||||||
|
OBJCOPY = avr-objcopy
|
||||||
|
OBJDUMP = avr-objdump
|
||||||
|
SIZE = avr-size
|
||||||
|
NM = avr-nm
|
||||||
|
AVRDUDE = avrdude
|
||||||
|
REMOVE = rm -f
|
||||||
|
COPY = cp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Define Messages
|
||||||
|
# English
|
||||||
|
MSG_ERRORS_NONE = Errors: none
|
||||||
|
MSG_BEGIN = -------- begin --------
|
||||||
|
MSG_END = -------- end --------
|
||||||
|
MSG_SIZE_BEFORE = Size before:
|
||||||
|
MSG_SIZE_AFTER = Size after:
|
||||||
|
MSG_COFF = Converting to AVR COFF:
|
||||||
|
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
||||||
|
MSG_FLASH = Creating load file for Flash:
|
||||||
|
MSG_EEPROM = Creating load file for EEPROM:
|
||||||
|
MSG_EXTENDED_LISTING = Creating Extended Listing:
|
||||||
|
MSG_SYMBOL_TABLE = Creating Symbol Table:
|
||||||
|
MSG_LINKING = Linking:
|
||||||
|
MSG_COMPILING = Compiling:
|
||||||
|
MSG_ASSEMBLING = Assembling:
|
||||||
|
MSG_CLEANING = Cleaning project:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Define all object files.
|
||||||
|
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
||||||
|
|
||||||
|
# Define all listing files.
|
||||||
|
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
|
||||||
|
|
||||||
|
|
||||||
|
# Compiler flags to generate dependency files.
|
||||||
|
GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
|
||||||
|
|
||||||
|
|
||||||
|
# Combine all necessary flags and optional flags.
|
||||||
|
# Add target processor to flags.
|
||||||
|
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
|
||||||
|
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Default target.
|
||||||
|
all: begin gccversion sizebefore build sizeafter finished end
|
||||||
|
|
||||||
|
build: elf hex eep lss sym extcoff
|
||||||
|
|
||||||
|
elf: $(TARGET).elf
|
||||||
|
hex: $(TARGET).hex
|
||||||
|
eep: $(TARGET).eep
|
||||||
|
lss: $(TARGET).lss
|
||||||
|
sym: $(TARGET).sym
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Eye candy.
|
||||||
|
# AVR Studio 3.x does not check make's exit code but relies on
|
||||||
|
# the following magic strings to be generated by the compile job.
|
||||||
|
begin:
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_BEGIN)
|
||||||
|
|
||||||
|
finished:
|
||||||
|
@echo $(MSG_ERRORS_NONE)
|
||||||
|
|
||||||
|
end:
|
||||||
|
@echo $(MSG_END)
|
||||||
|
@echo
|
||||||
|
|
||||||
|
|
||||||
|
# Display size of file.
|
||||||
|
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
|
||||||
|
ELFSIZE = $(SIZE) -A $(TARGET).elf
|
||||||
|
sizebefore:
|
||||||
|
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
|
||||||
|
|
||||||
|
sizeafter:
|
||||||
|
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Display compiler version information.
|
||||||
|
gccversion :
|
||||||
|
@$(CC) --version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Program the device.
|
||||||
|
program: $(TARGET).hex $(TARGET).eep
|
||||||
|
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
||||||
|
COFFCONVERT=$(OBJCOPY) --debugging \
|
||||||
|
--change-section-address .data-0x800000 \
|
||||||
|
--change-section-address .bss-0x800000 \
|
||||||
|
--change-section-address .noinit-0x800000 \
|
||||||
|
--change-section-address .eeprom-0x810000
|
||||||
|
|
||||||
|
|
||||||
|
coff: $(TARGET).elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_COFF) $(TARGET).cof
|
||||||
|
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
|
extcoff: $(TARGET).elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
||||||
|
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Create final output files (.hex, .eep) from ELF output file.
|
||||||
|
%.hex: %.elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_FLASH) $@
|
||||||
|
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||||
|
|
||||||
|
%.eep: %.elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_EEPROM) $@
|
||||||
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||||
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||||
|
|
||||||
|
# Create extended listing file from ELF output file.
|
||||||
|
%.lss: %.elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_EXTENDED_LISTING) $@
|
||||||
|
$(OBJDUMP) -h -S $< > $@
|
||||||
|
|
||||||
|
# Create a symbol table from ELF output file.
|
||||||
|
%.sym: %.elf
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_SYMBOL_TABLE) $@
|
||||||
|
$(NM) -n $< > $@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Link: create ELF output file from object files.
|
||||||
|
.SECONDARY : $(TARGET).elf
|
||||||
|
.PRECIOUS : $(OBJ)
|
||||||
|
%.elf: $(OBJ)
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_LINKING) $@
|
||||||
|
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
# Compile: create object files from C source files.
|
||||||
|
%.o : %.c
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_COMPILING) $<
|
||||||
|
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
# Compile: create assembler files from C source files.
|
||||||
|
%.s : %.c
|
||||||
|
$(CC) -S $(ALL_CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
# Assemble: create object files from assembler source files.
|
||||||
|
%.o : %.S
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_ASSEMBLING) $<
|
||||||
|
$(CC) -c $(ALL_ASFLAGS) $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Target: clean project.
|
||||||
|
clean: begin clean_list finished end
|
||||||
|
|
||||||
|
clean_list :
|
||||||
|
@echo
|
||||||
|
@echo $(MSG_CLEANING)
|
||||||
|
$(REMOVE) $(TARGET).hex
|
||||||
|
$(REMOVE) $(TARGET).eep
|
||||||
|
$(REMOVE) $(TARGET).obj
|
||||||
|
$(REMOVE) $(TARGET).cof
|
||||||
|
$(REMOVE) $(TARGET).elf
|
||||||
|
$(REMOVE) $(TARGET).map
|
||||||
|
$(REMOVE) $(TARGET).obj
|
||||||
|
$(REMOVE) $(TARGET).a90
|
||||||
|
$(REMOVE) $(TARGET).sym
|
||||||
|
$(REMOVE) $(TARGET).lnk
|
||||||
|
$(REMOVE) $(TARGET).lss
|
||||||
|
$(REMOVE) $(OBJ)
|
||||||
|
$(REMOVE) $(LST)
|
||||||
|
$(REMOVE) $(SRC:.c=.s)
|
||||||
|
$(REMOVE) $(SRC:.c=.d)
|
||||||
|
$(REMOVE) .dep/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Include the dependency files.
|
||||||
|
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
|
||||||
|
|
||||||
|
|
||||||
|
# Listing of phony targets.
|
||||||
|
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
||||||
|
build elf hex eep lss sym coff extcoff \
|
||||||
|
clean clean_list program
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
Libs/LCD4/avrmb2313_notkermobil/LCD4.elf
Normal file
BIN
Libs/LCD4/avrmb2313_notkermobil/LCD4.elf
Normal file
Binary file not shown.
65
Libs/LCD4/avrmb2313_notkermobil/LCD4.hex
Normal file
65
Libs/LCD4/avrmb2313_notkermobil/LCD4.hex
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
:1000000012C02AC029C028C027C026C025C024C0CD
|
||||||
|
:1000100023C022C021C020C01FC01EC01DC01CC0E4
|
||||||
|
:100020001BC01AC019C011241FBECFEDCDBF10E0F8
|
||||||
|
:10003000A0E6B0E0E2EFF3E002C005900D92A0363A
|
||||||
|
:10004000B107D9F710E0A0E6B0E001C01D92A036DC
|
||||||
|
:10005000B107E1F798D1CBC1D3CFDF93CF93CDB721
|
||||||
|
:10006000DEB7E7E3F0E08FEF8083A1E3B0E0E1E308
|
||||||
|
:10007000F0E0808188608C93A1E3B0E0E1E3F0E000
|
||||||
|
:10008000808184608C93E8E3F0E08FEF8083A2E3CB
|
||||||
|
:10009000B0E0E2E3F0E0808188608C93A2E3B0E01E
|
||||||
|
:1000A000E2E3F0E0808184608C931DD01CD01BD0F3
|
||||||
|
:1000B00080E33FD018D080E33CD042D180E339D0F8
|
||||||
|
:1000C00088E237D0A7E3B0E0E7E3F0E08081807F0B
|
||||||
|
:1000D0008C938CE02ED086E02CD082E02AD003D006
|
||||||
|
:1000E000CF91DF910895DF93CF930F92CDB7DEB715
|
||||||
|
:1000F00082E3898304C024D18981815089838981E5
|
||||||
|
:100100008823C9F70F90CF91DF910895DF93CF93A4
|
||||||
|
:100110000F92CDB7DEB788EC898304C0E4DF898114
|
||||||
|
:100120008150898389818823C9F70F90CF91DF910E
|
||||||
|
:100130000895DF93CF930F92CDB7DEB7898384E024
|
||||||
|
:10014000698140E004D00F90CF91DF910895DF9353
|
||||||
|
:10015000CF9300D000D00F92CDB7DEB789836A83EA
|
||||||
|
:100160004B838981282F30E03D832C838C819D81B6
|
||||||
|
:10017000843091057CF42C813D8122303105BCF422
|
||||||
|
:100180008C819D810097F9F02C813D8121303105D2
|
||||||
|
:10019000B9F020C08C819D8184309105D9F4A2E30F
|
||||||
|
:1001A000B0E0E2E3F0E08081877F8C9313C08B8125
|
||||||
|
:1001B0008F738B838981833019F48B81805C8B836F
|
||||||
|
:1001C0008B818068B6DFA2E3B0E0E2E3F0E08081FB
|
||||||
|
:1001D00088608C93A2E3B0E0E2E3F0E08081846089
|
||||||
|
:1001E0008C93A2E3B0E0E2E3F0E0808184608C9342
|
||||||
|
:1001F000A8E3B0E0E8E3F0E08081982F9F708A8167
|
||||||
|
:10020000807F892B8C93A8E3B0E0E8E3F0E0808165
|
||||||
|
:10021000982F9F708A81807F892B8C93A2E3B0E016
|
||||||
|
:10022000E2E3F0E080818B7F8C93A2E3B0E0E2E335
|
||||||
|
:10023000F0E080818B7F8C9383D0E7E3F0E08081D6
|
||||||
|
:10024000803FB9F58A818295807F8A83A2E3B0E0FE
|
||||||
|
:10025000E2E3F0E0808184608C93A2E3B0E0E2E32B
|
||||||
|
:10026000F0E0808184608C93A8E3B0E0E8E3F0E004
|
||||||
|
:100270008081982F9F708A81807F892B8C93A8E33F
|
||||||
|
:10028000B0E0E8E3F0E08081982F9F708A81807F62
|
||||||
|
:10029000892B8C93A2E3B0E0E2E3F0E080818B7FD6
|
||||||
|
:1002A0008C93A2E3B0E0E2E3F0E080818B7F8C935B
|
||||||
|
:1002B00047D00F900F900F900F900F90CF91DF913C
|
||||||
|
:1002C0000895DF93CF9300D000D00F92CDB7DEB763
|
||||||
|
:1002D0008B838B81282F30E03D832C838C819D8103
|
||||||
|
:1002E0008330910569F02C813D812430310531F056
|
||||||
|
:1002F0008C819D818230910531F006C082E0E1DF82
|
||||||
|
:1003000080E48A8301C01A828A81898307C081E0E0
|
||||||
|
:1003100060E249811CDF89818F5F89838981282F71
|
||||||
|
:1003200030E08A81882F90E00F96281739077CF3F8
|
||||||
|
:100330000F900F900F900F900F90CF91DF91089535
|
||||||
|
:10034000DF93CF9300D000D00F92CDB7DEB784E417
|
||||||
|
:10035000898302C08981898189818A838A818D8389
|
||||||
|
:100360008D81882311F081E08D839D818A81815068
|
||||||
|
:100370008983992379F70F900F900F900F900F902A
|
||||||
|
:10038000CF91DF910895DF93CF93CDB7DEB7BEDE77
|
||||||
|
:1003900064DEBCDEBBDE81E061E448E0D8DEB6DED0
|
||||||
|
:1003A000B5DE80E062E440E0D2DEB0DEAFDE80E0C9
|
||||||
|
:1003B00063E440E0CCDEAADEA9DE80E064E440E055
|
||||||
|
:1003C000C6DEA4DEA3DEE7E3F0E08FE08083E8E3AF
|
||||||
|
:1003D000F0E08FE080839ADEE8E3F0E085E0808360
|
||||||
|
:1003E00095DEE8E3F0E08AE0808390DEF0CFF894D9
|
||||||
|
:0203F000FFCF3D
|
||||||
|
:00000001FF
|
727
Libs/LCD4/avrmb2313_notkermobil/LCD4.lss
Normal file
727
Libs/LCD4/avrmb2313_notkermobil/LCD4.lss
Normal file
|
@ -0,0 +1,727 @@
|
||||||
|
|
||||||
|
LCD4.elf: file format elf32-avr
|
||||||
|
|
||||||
|
Sections:
|
||||||
|
Idx Name Size VMA LMA File off Algn
|
||||||
|
0 .text 000003f2 00000000 00000000 00000054 2**1
|
||||||
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||||
|
1 .stab 00001158 00000000 00000000 00000448 2**2
|
||||||
|
CONTENTS, READONLY, DEBUGGING
|
||||||
|
2 .stabstr 000007ee 00000000 00000000 000015a0 2**0
|
||||||
|
CONTENTS, READONLY, DEBUGGING
|
||||||
|
Disassembly of section .text:
|
||||||
|
|
||||||
|
00000000 <__vectors>:
|
||||||
|
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end>
|
||||||
|
2: 2a c0 rjmp .+84 ; 0x58 <__bad_interrupt>
|
||||||
|
4: 29 c0 rjmp .+82 ; 0x58 <__bad_interrupt>
|
||||||
|
6: 28 c0 rjmp .+80 ; 0x58 <__bad_interrupt>
|
||||||
|
8: 27 c0 rjmp .+78 ; 0x58 <__bad_interrupt>
|
||||||
|
a: 26 c0 rjmp .+76 ; 0x58 <__bad_interrupt>
|
||||||
|
c: 25 c0 rjmp .+74 ; 0x58 <__bad_interrupt>
|
||||||
|
e: 24 c0 rjmp .+72 ; 0x58 <__bad_interrupt>
|
||||||
|
10: 23 c0 rjmp .+70 ; 0x58 <__bad_interrupt>
|
||||||
|
12: 22 c0 rjmp .+68 ; 0x58 <__bad_interrupt>
|
||||||
|
14: 21 c0 rjmp .+66 ; 0x58 <__bad_interrupt>
|
||||||
|
16: 20 c0 rjmp .+64 ; 0x58 <__bad_interrupt>
|
||||||
|
18: 1f c0 rjmp .+62 ; 0x58 <__bad_interrupt>
|
||||||
|
1a: 1e c0 rjmp .+60 ; 0x58 <__bad_interrupt>
|
||||||
|
1c: 1d c0 rjmp .+58 ; 0x58 <__bad_interrupt>
|
||||||
|
1e: 1c c0 rjmp .+56 ; 0x58 <__bad_interrupt>
|
||||||
|
20: 1b c0 rjmp .+54 ; 0x58 <__bad_interrupt>
|
||||||
|
22: 1a c0 rjmp .+52 ; 0x58 <__bad_interrupt>
|
||||||
|
24: 19 c0 rjmp .+50 ; 0x58 <__bad_interrupt>
|
||||||
|
|
||||||
|
00000026 <__ctors_end>:
|
||||||
|
26: 11 24 eor r1, r1
|
||||||
|
28: 1f be out 0x3f, r1 ; 63
|
||||||
|
2a: cf ed ldi r28, 0xDF ; 223
|
||||||
|
2c: cd bf out 0x3d, r28 ; 61
|
||||||
|
|
||||||
|
0000002e <__do_copy_data>:
|
||||||
|
2e: 10 e0 ldi r17, 0x00 ; 0
|
||||||
|
30: a0 e6 ldi r26, 0x60 ; 96
|
||||||
|
32: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
34: e2 ef ldi r30, 0xF2 ; 242
|
||||||
|
36: f3 e0 ldi r31, 0x03 ; 3
|
||||||
|
38: 02 c0 rjmp .+4 ; 0x3e <__SP_H__>
|
||||||
|
|
||||||
|
0000003a <.do_copy_data_loop>:
|
||||||
|
3a: 05 90 lpm r0, Z+
|
||||||
|
3c: 0d 92 st X+, r0
|
||||||
|
|
||||||
|
0000003e <.do_copy_data_start>:
|
||||||
|
3e: a0 36 cpi r26, 0x60 ; 96
|
||||||
|
40: b1 07 cpc r27, r17
|
||||||
|
42: d9 f7 brne .-10 ; 0x3a <.do_copy_data_loop>
|
||||||
|
|
||||||
|
00000044 <__do_clear_bss>:
|
||||||
|
44: 10 e0 ldi r17, 0x00 ; 0
|
||||||
|
46: a0 e6 ldi r26, 0x60 ; 96
|
||||||
|
48: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
4a: 01 c0 rjmp .+2 ; 0x4e <.do_clear_bss_start>
|
||||||
|
|
||||||
|
0000004c <.do_clear_bss_loop>:
|
||||||
|
4c: 1d 92 st X+, r1
|
||||||
|
|
||||||
|
0000004e <.do_clear_bss_start>:
|
||||||
|
4e: a0 36 cpi r26, 0x60 ; 96
|
||||||
|
50: b1 07 cpc r27, r17
|
||||||
|
52: e1 f7 brne .-8 ; 0x4c <.do_clear_bss_loop>
|
||||||
|
54: 98 d1 rcall .+816 ; 0x386 <main>
|
||||||
|
56: cb c1 rjmp .+918 ; 0x3ee <_exit>
|
||||||
|
|
||||||
|
00000058 <__bad_interrupt>:
|
||||||
|
58: d3 cf rjmp .-90 ; 0x0 <__heap_end>
|
||||||
|
|
||||||
|
0000005a <lcd_init>:
|
||||||
|
|
||||||
|
#define lcd_mask_Write_Adress(position) ((position & 0x7F)| lcd_SET_DD_RAM)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void lcd_init(void){
|
||||||
|
5a: df 93 push r29
|
||||||
|
5c: cf 93 push r28
|
||||||
|
5e: cd b7 in r28, 0x3d ; 61
|
||||||
|
60: de b7 in r29, 0x3e ; 62
|
||||||
|
/* setting up ports first */
|
||||||
|
lcd_dataport_DDR=0xff;
|
||||||
|
62: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
64: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
66: 8f ef ldi r24, 0xFF ; 255
|
||||||
|
68: 80 83 st Z, r24
|
||||||
|
set_lcd_RS_DDR;
|
||||||
|
6a: a1 e3 ldi r26, 0x31 ; 49
|
||||||
|
6c: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
6e: e1 e3 ldi r30, 0x31 ; 49
|
||||||
|
70: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
72: 80 81 ld r24, Z
|
||||||
|
74: 88 60 ori r24, 0x08 ; 8
|
||||||
|
76: 8c 93 st X, r24
|
||||||
|
set_lcd_E_DDR;
|
||||||
|
78: a1 e3 ldi r26, 0x31 ; 49
|
||||||
|
7a: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
7c: e1 e3 ldi r30, 0x31 ; 49
|
||||||
|
7e: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
80: 80 81 ld r24, Z
|
||||||
|
82: 84 60 ori r24, 0x04 ; 4
|
||||||
|
84: 8c 93 st X, r24
|
||||||
|
/* end setting up ports */
|
||||||
|
lcd_dataport=0xff;
|
||||||
|
86: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
88: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
8a: 8f ef ldi r24, 0xFF ; 255
|
||||||
|
8c: 80 83 st Z, r24
|
||||||
|
set_lcd_RS;
|
||||||
|
8e: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
90: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
92: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
94: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
96: 80 81 ld r24, Z
|
||||||
|
98: 88 60 ori r24, 0x08 ; 8
|
||||||
|
9a: 8c 93 st X, r24
|
||||||
|
set_lcd_E;
|
||||||
|
9c: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
9e: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
a0: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
a2: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
a4: 80 81 ld r24, Z
|
||||||
|
a6: 84 60 ori r24, 0x04 ; 4
|
||||||
|
a8: 8c 93 st X, r24
|
||||||
|
lcd_5ms();
|
||||||
|
aa: 1d d0 rcall .+58 ; 0xe6 <lcd_5ms>
|
||||||
|
lcd_5ms();
|
||||||
|
ac: 1c d0 rcall .+56 ; 0xe6 <lcd_5ms>
|
||||||
|
lcd_5ms();
|
||||||
|
ae: 1b d0 rcall .+54 ; 0xe6 <lcd_5ms>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
b0: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
b2: 3f d0 rcall .+126 ; 0x132 <lcd_instruct>
|
||||||
|
lcd_5ms();
|
||||||
|
b4: 18 d0 rcall .+48 ; 0xe6 <lcd_5ms>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
b6: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
b8: 3c d0 rcall .+120 ; 0x132 <lcd_instruct>
|
||||||
|
wait_100us();
|
||||||
|
ba: 42 d1 rcall .+644 ; 0x340 <wait_100us>
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
bc: 80 e3 ldi r24, 0x30 ; 48
|
||||||
|
be: 39 d0 rcall .+114 ; 0x132 <lcd_instruct>
|
||||||
|
if (lcd_dataport_mask==0xf0){
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_4BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
c0: 88 e2 ldi r24, 0x28 ; 40
|
||||||
|
c2: 37 d0 rcall .+110 ; 0x132 <lcd_instruct>
|
||||||
|
}else{
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
}
|
||||||
|
lcd_dataport_DDR&=lcd_dataport_mask;
|
||||||
|
c4: a7 e3 ldi r26, 0x37 ; 55
|
||||||
|
c6: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
c8: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
ca: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
cc: 80 81 ld r24, Z
|
||||||
|
ce: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
d0: 8c 93 st X, r24
|
||||||
|
lcd_instruct(lcd_DISPLAY_OO_ON|lcd_DISPLAY_OO_CURSOR_OFF);
|
||||||
|
d2: 8c e0 ldi r24, 0x0C ; 12
|
||||||
|
d4: 2e d0 rcall .+92 ; 0x132 <lcd_instruct>
|
||||||
|
lcd_instruct(lcd_ENTRY_MODE_SET|lcd_ENTRY_MODE_SET_INCREASE | lcd_ENTRY_MS_DISPLAY_NOT_S);
|
||||||
|
d6: 86 e0 ldi r24, 0x06 ; 6
|
||||||
|
d8: 2c d0 rcall .+88 ; 0x132 <lcd_instruct>
|
||||||
|
lcd_instruct(lcd_RETURN_HOME);
|
||||||
|
da: 82 e0 ldi r24, 0x02 ; 2
|
||||||
|
dc: 2a d0 rcall .+84 ; 0x132 <lcd_instruct>
|
||||||
|
lcd_5ms();
|
||||||
|
de: 03 d0 rcall .+6 ; 0xe6 <lcd_5ms>
|
||||||
|
}
|
||||||
|
e0: cf 91 pop r28
|
||||||
|
e2: df 91 pop r29
|
||||||
|
e4: 08 95 ret
|
||||||
|
|
||||||
|
000000e6 <lcd_5ms>:
|
||||||
|
|
||||||
|
void lcd_5ms(void){
|
||||||
|
e6: df 93 push r29
|
||||||
|
e8: cf 93 push r28
|
||||||
|
ea: 0f 92 push r0
|
||||||
|
ec: cd b7 in r28, 0x3d ; 61
|
||||||
|
ee: de b7 in r29, 0x3e ; 62
|
||||||
|
for(uint8_t i=50;i>0;i--){
|
||||||
|
f0: 82 e3 ldi r24, 0x32 ; 50
|
||||||
|
f2: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
f4: 04 c0 rjmp .+8 ; 0xfe <lcd_5ms+0x18>
|
||||||
|
wait_100us();
|
||||||
|
f6: 24 d1 rcall .+584 ; 0x340 <wait_100us>
|
||||||
|
lcd_instruct(lcd_RETURN_HOME);
|
||||||
|
lcd_5ms();
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_5ms(void){
|
||||||
|
for(uint8_t i=50;i>0;i--){
|
||||||
|
f8: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
fa: 81 50 subi r24, 0x01 ; 1
|
||||||
|
fc: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
fe: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
100: 88 23 and r24, r24
|
||||||
|
102: c9 f7 brne .-14 ; 0xf6 <lcd_5ms+0x10>
|
||||||
|
wait_100us();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
104: 0f 90 pop r0
|
||||||
|
106: cf 91 pop r28
|
||||||
|
108: df 91 pop r29
|
||||||
|
10a: 08 95 ret
|
||||||
|
|
||||||
|
0000010c <lcd_1s>:
|
||||||
|
|
||||||
|
void lcd_1s(void){
|
||||||
|
10c: df 93 push r29
|
||||||
|
10e: cf 93 push r28
|
||||||
|
110: 0f 92 push r0
|
||||||
|
112: cd b7 in r28, 0x3d ; 61
|
||||||
|
114: de b7 in r29, 0x3e ; 62
|
||||||
|
for(uint8_t i=200;i>0;i--){
|
||||||
|
116: 88 ec ldi r24, 0xC8 ; 200
|
||||||
|
118: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
11a: 04 c0 rjmp .+8 ; 0x124 <lcd_1s+0x18>
|
||||||
|
lcd_5ms();
|
||||||
|
11c: e4 df rcall .-56 ; 0xe6 <lcd_5ms>
|
||||||
|
wait_100us();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_1s(void){
|
||||||
|
for(uint8_t i=200;i>0;i--){
|
||||||
|
11e: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
120: 81 50 subi r24, 0x01 ; 1
|
||||||
|
122: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
124: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
126: 88 23 and r24, r24
|
||||||
|
128: c9 f7 brne .-14 ; 0x11c <lcd_1s+0x10>
|
||||||
|
lcd_5ms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
12a: 0f 90 pop r0
|
||||||
|
12c: cf 91 pop r28
|
||||||
|
12e: df 91 pop r29
|
||||||
|
130: 08 95 ret
|
||||||
|
|
||||||
|
00000132 <lcd_instruct>:
|
||||||
|
|
||||||
|
void lcd_instruct(uint8_t zeichen){
|
||||||
|
132: df 93 push r29
|
||||||
|
134: cf 93 push r28
|
||||||
|
136: 0f 92 push r0
|
||||||
|
138: cd b7 in r28, 0x3d ; 61
|
||||||
|
13a: de b7 in r29, 0x3e ; 62
|
||||||
|
13c: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
lcd_write(instruct,zeichen,0);
|
||||||
|
13e: 84 e0 ldi r24, 0x04 ; 4
|
||||||
|
140: 69 81 ldd r22, Y+1 ; 0x01
|
||||||
|
142: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
144: 04 d0 rcall .+8 ; 0x14e <lcd_write>
|
||||||
|
}
|
||||||
|
146: 0f 90 pop r0
|
||||||
|
148: cf 91 pop r28
|
||||||
|
14a: df 91 pop r29
|
||||||
|
14c: 08 95 ret
|
||||||
|
|
||||||
|
0000014e <lcd_write>:
|
||||||
|
|
||||||
|
void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){
|
||||||
|
14e: df 93 push r29
|
||||||
|
150: cf 93 push r28
|
||||||
|
152: 00 d0 rcall .+0 ; 0x154 <lcd_write+0x6>
|
||||||
|
154: 00 d0 rcall .+0 ; 0x156 <lcd_write+0x8>
|
||||||
|
156: 0f 92 push r0
|
||||||
|
158: cd b7 in r28, 0x3d ; 61
|
||||||
|
15a: de b7 in r29, 0x3e ; 62
|
||||||
|
15c: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
15e: 6a 83 std Y+2, r22 ; 0x02
|
||||||
|
160: 4b 83 std Y+3, r20 ; 0x03
|
||||||
|
switch (lcd_whichwrite){
|
||||||
|
162: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
164: 28 2f mov r18, r24
|
||||||
|
166: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
168: 3d 83 std Y+5, r19 ; 0x05
|
||||||
|
16a: 2c 83 std Y+4, r18 ; 0x04
|
||||||
|
16c: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
16e: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
170: 84 30 cpi r24, 0x04 ; 4
|
||||||
|
172: 91 05 cpc r25, r1
|
||||||
|
174: 7c f4 brge .+30 ; 0x194 <lcd_write+0x46>
|
||||||
|
176: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
178: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
17a: 22 30 cpi r18, 0x02 ; 2
|
||||||
|
17c: 31 05 cpc r19, r1
|
||||||
|
17e: bc f4 brge .+46 ; 0x1ae <lcd_write+0x60>
|
||||||
|
180: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
182: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
184: 00 97 sbiw r24, 0x00 ; 0
|
||||||
|
186: f9 f0 breq .+62 ; 0x1c6 <lcd_write+0x78>
|
||||||
|
188: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
18a: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
18c: 21 30 cpi r18, 0x01 ; 1
|
||||||
|
18e: 31 05 cpc r19, r1
|
||||||
|
190: b9 f0 breq .+46 ; 0x1c0 <lcd_write+0x72>
|
||||||
|
192: 20 c0 rjmp .+64 ; 0x1d4 <lcd_write+0x86>
|
||||||
|
194: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
196: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
198: 84 30 cpi r24, 0x04 ; 4
|
||||||
|
19a: 91 05 cpc r25, r1
|
||||||
|
19c: d9 f4 brne .+54 ; 0x1d4 <lcd_write+0x86>
|
||||||
|
case instruct :
|
||||||
|
unset_lcd_RS;
|
||||||
|
19e: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
1a0: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
1a2: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
1a4: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
1a6: 80 81 ld r24, Z
|
||||||
|
1a8: 87 7f andi r24, 0xF7 ; 247
|
||||||
|
1aa: 8c 93 st X, r24
|
||||||
|
1ac: 13 c0 rjmp .+38 ; 0x1d4 <lcd_write+0x86>
|
||||||
|
break;
|
||||||
|
case line2:
|
||||||
|
case line1:
|
||||||
|
position = position & 0x3f;
|
||||||
|
1ae: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
1b0: 8f 73 andi r24, 0x3F ; 63
|
||||||
|
1b2: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
if (lcd_whichwrite == line2){ position=position + 0x40; };
|
||||||
|
1b4: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
1b6: 83 30 cpi r24, 0x03 ; 3
|
||||||
|
1b8: 19 f4 brne .+6 ; 0x1c0 <lcd_write+0x72>
|
||||||
|
1ba: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
1bc: 80 5c subi r24, 0xC0 ; 192
|
||||||
|
1be: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
case therepos:
|
||||||
|
lcd_instruct(lcd_mask_Write_Adress(position));
|
||||||
|
1c0: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
1c2: 80 68 ori r24, 0x80 ; 128
|
||||||
|
1c4: b6 df rcall .-148 ; 0x132 <lcd_instruct>
|
||||||
|
case here:
|
||||||
|
set_lcd_RS;
|
||||||
|
1c6: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
1c8: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
1ca: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
1cc: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
1ce: 80 81 ld r24, Z
|
||||||
|
1d0: 88 60 ori r24, 0x08 ; 8
|
||||||
|
1d2: 8c 93 st X, r24
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
set_lcd_E;
|
||||||
|
1d4: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
1d6: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
1d8: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
1da: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
1dc: 80 81 ld r24, Z
|
||||||
|
1de: 84 60 ori r24, 0x04 ; 4
|
||||||
|
1e0: 8c 93 st X, r24
|
||||||
|
set_lcd_E;
|
||||||
|
1e2: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
1e4: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
1e6: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
1e8: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
1ea: 80 81 ld r24, Z
|
||||||
|
1ec: 84 60 ori r24, 0x04 ; 4
|
||||||
|
1ee: 8c 93 st X, r24
|
||||||
|
lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask;
|
||||||
|
1f0: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
1f2: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
1f4: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
1f6: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
1f8: 80 81 ld r24, Z
|
||||||
|
1fa: 98 2f mov r25, r24
|
||||||
|
1fc: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
1fe: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
200: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
202: 89 2b or r24, r25
|
||||||
|
204: 8c 93 st X, r24
|
||||||
|
lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask;
|
||||||
|
206: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
208: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
20a: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
20c: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
20e: 80 81 ld r24, Z
|
||||||
|
210: 98 2f mov r25, r24
|
||||||
|
212: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
214: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
216: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
218: 89 2b or r24, r25
|
||||||
|
21a: 8c 93 st X, r24
|
||||||
|
unset_lcd_E;
|
||||||
|
21c: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
21e: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
220: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
222: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
224: 80 81 ld r24, Z
|
||||||
|
226: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
228: 8c 93 st X, r24
|
||||||
|
unset_lcd_E;
|
||||||
|
22a: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
22c: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
22e: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
230: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
232: 80 81 ld r24, Z
|
||||||
|
234: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
236: 8c 93 st X, r24
|
||||||
|
wait_100us();
|
||||||
|
238: 83 d0 rcall .+262 ; 0x340 <wait_100us>
|
||||||
|
if (lcd_dataport_DDR==0xf0){
|
||||||
|
23a: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
23c: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
23e: 80 81 ld r24, Z
|
||||||
|
240: 80 3f cpi r24, 0xF0 ; 240
|
||||||
|
242: b9 f5 brne .+110 ; 0x2b2 <lcd_write+0x164>
|
||||||
|
zeichen=zeichen << 4;
|
||||||
|
244: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
246: 82 95 swap r24
|
||||||
|
248: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
24a: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
set_lcd_E;
|
||||||
|
24c: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
24e: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
250: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
252: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
254: 80 81 ld r24, Z
|
||||||
|
256: 84 60 ori r24, 0x04 ; 4
|
||||||
|
258: 8c 93 st X, r24
|
||||||
|
set_lcd_E;
|
||||||
|
25a: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
25c: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
25e: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
260: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
262: 80 81 ld r24, Z
|
||||||
|
264: 84 60 ori r24, 0x04 ; 4
|
||||||
|
266: 8c 93 st X, r24
|
||||||
|
lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask;
|
||||||
|
268: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
26a: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
26c: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
26e: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
270: 80 81 ld r24, Z
|
||||||
|
272: 98 2f mov r25, r24
|
||||||
|
274: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
276: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
278: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
27a: 89 2b or r24, r25
|
||||||
|
27c: 8c 93 st X, r24
|
||||||
|
lcd_dataport=lcd_dataport&~lcd_dataport_mask|zeichen&lcd_dataport_mask;
|
||||||
|
27e: a8 e3 ldi r26, 0x38 ; 56
|
||||||
|
280: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
282: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
284: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
286: 80 81 ld r24, Z
|
||||||
|
288: 98 2f mov r25, r24
|
||||||
|
28a: 9f 70 andi r25, 0x0F ; 15
|
||||||
|
28c: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
28e: 80 7f andi r24, 0xF0 ; 240
|
||||||
|
290: 89 2b or r24, r25
|
||||||
|
292: 8c 93 st X, r24
|
||||||
|
unset_lcd_E;
|
||||||
|
294: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
296: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
298: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
29a: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
29c: 80 81 ld r24, Z
|
||||||
|
29e: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
2a0: 8c 93 st X, r24
|
||||||
|
unset_lcd_E;
|
||||||
|
2a2: a2 e3 ldi r26, 0x32 ; 50
|
||||||
|
2a4: b0 e0 ldi r27, 0x00 ; 0
|
||||||
|
2a6: e2 e3 ldi r30, 0x32 ; 50
|
||||||
|
2a8: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
2aa: 80 81 ld r24, Z
|
||||||
|
2ac: 8b 7f andi r24, 0xFB ; 251
|
||||||
|
2ae: 8c 93 st X, r24
|
||||||
|
wait_100us();
|
||||||
|
2b0: 47 d0 rcall .+142 ; 0x340 <wait_100us>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2b2: 0f 90 pop r0
|
||||||
|
2b4: 0f 90 pop r0
|
||||||
|
2b6: 0f 90 pop r0
|
||||||
|
2b8: 0f 90 pop r0
|
||||||
|
2ba: 0f 90 pop r0
|
||||||
|
2bc: cf 91 pop r28
|
||||||
|
2be: df 91 pop r29
|
||||||
|
2c0: 08 95 ret
|
||||||
|
|
||||||
|
000002c2 <lcd_blank_line>:
|
||||||
|
|
||||||
|
void lcd_blank_line(uint8_t lcd_whichwrite)
|
||||||
|
{
|
||||||
|
2c2: df 93 push r29
|
||||||
|
2c4: cf 93 push r28
|
||||||
|
2c6: 00 d0 rcall .+0 ; 0x2c8 <lcd_blank_line+0x6>
|
||||||
|
2c8: 00 d0 rcall .+0 ; 0x2ca <lcd_blank_line+0x8>
|
||||||
|
2ca: 0f 92 push r0
|
||||||
|
2cc: cd b7 in r28, 0x3d ; 61
|
||||||
|
2ce: de b7 in r29, 0x3e ; 62
|
||||||
|
2d0: 8b 83 std Y+3, r24 ; 0x03
|
||||||
|
uint8_t count;
|
||||||
|
uint8_t countin;
|
||||||
|
|
||||||
|
switch (lcd_whichwrite){
|
||||||
|
2d2: 8b 81 ldd r24, Y+3 ; 0x03
|
||||||
|
2d4: 28 2f mov r18, r24
|
||||||
|
2d6: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
2d8: 3d 83 std Y+5, r19 ; 0x05
|
||||||
|
2da: 2c 83 std Y+4, r18 ; 0x04
|
||||||
|
2dc: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
2de: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
2e0: 83 30 cpi r24, 0x03 ; 3
|
||||||
|
2e2: 91 05 cpc r25, r1
|
||||||
|
2e4: 69 f0 breq .+26 ; 0x300 <lcd_blank_line+0x3e>
|
||||||
|
2e6: 2c 81 ldd r18, Y+4 ; 0x04
|
||||||
|
2e8: 3d 81 ldd r19, Y+5 ; 0x05
|
||||||
|
2ea: 24 30 cpi r18, 0x04 ; 4
|
||||||
|
2ec: 31 05 cpc r19, r1
|
||||||
|
2ee: 31 f0 breq .+12 ; 0x2fc <lcd_blank_line+0x3a>
|
||||||
|
2f0: 8c 81 ldd r24, Y+4 ; 0x04
|
||||||
|
2f2: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
2f4: 82 30 cpi r24, 0x02 ; 2
|
||||||
|
2f6: 91 05 cpc r25, r1
|
||||||
|
2f8: 31 f0 breq .+12 ; 0x306 <lcd_blank_line+0x44>
|
||||||
|
2fa: 06 c0 rjmp .+12 ; 0x308 <lcd_blank_line+0x46>
|
||||||
|
case instruct:
|
||||||
|
lcd_blank_line(line1);
|
||||||
|
2fc: 82 e0 ldi r24, 0x02 ; 2
|
||||||
|
2fe: e1 df rcall .-62 ; 0x2c2 <lcd_blank_line>
|
||||||
|
case line2:
|
||||||
|
count=0x40;
|
||||||
|
300: 80 e4 ldi r24, 0x40 ; 64
|
||||||
|
302: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
304: 01 c0 rjmp .+2 ; 0x308 <lcd_blank_line+0x46>
|
||||||
|
break;
|
||||||
|
case line1:
|
||||||
|
count=0;
|
||||||
|
306: 1a 82 std Y+2, r1 ; 0x02
|
||||||
|
}
|
||||||
|
|
||||||
|
for (countin=count; countin < count+15; countin++){
|
||||||
|
308: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
30a: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
30c: 07 c0 rjmp .+14 ; 0x31c <lcd_blank_line+0x5a>
|
||||||
|
lcd_write(therepos, 32, countin);
|
||||||
|
30e: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
310: 60 e2 ldi r22, 0x20 ; 32
|
||||||
|
312: 49 81 ldd r20, Y+1 ; 0x01
|
||||||
|
314: 1c df rcall .-456 ; 0x14e <lcd_write>
|
||||||
|
break;
|
||||||
|
case line1:
|
||||||
|
count=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (countin=count; countin < count+15; countin++){
|
||||||
|
316: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
318: 8f 5f subi r24, 0xFF ; 255
|
||||||
|
31a: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
31c: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
31e: 28 2f mov r18, r24
|
||||||
|
320: 30 e0 ldi r19, 0x00 ; 0
|
||||||
|
322: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
324: 88 2f mov r24, r24
|
||||||
|
326: 90 e0 ldi r25, 0x00 ; 0
|
||||||
|
328: 0f 96 adiw r24, 0x0f ; 15
|
||||||
|
32a: 28 17 cp r18, r24
|
||||||
|
32c: 39 07 cpc r19, r25
|
||||||
|
32e: 7c f3 brlt .-34 ; 0x30e <lcd_blank_line+0x4c>
|
||||||
|
lcd_write(therepos, 32, countin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
330: 0f 90 pop r0
|
||||||
|
332: 0f 90 pop r0
|
||||||
|
334: 0f 90 pop r0
|
||||||
|
336: 0f 90 pop r0
|
||||||
|
338: 0f 90 pop r0
|
||||||
|
33a: cf 91 pop r28
|
||||||
|
33c: df 91 pop r29
|
||||||
|
33e: 08 95 ret
|
||||||
|
|
||||||
|
00000340 <wait_100us>:
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
void wait_100us(void){
|
||||||
|
340: df 93 push r29
|
||||||
|
342: cf 93 push r28
|
||||||
|
344: 00 d0 rcall .+0 ; 0x346 <wait_100us+0x6>
|
||||||
|
346: 00 d0 rcall .+0 ; 0x348 <wait_100us+0x8>
|
||||||
|
348: 0f 92 push r0
|
||||||
|
34a: cd b7 in r28, 0x3d ; 61
|
||||||
|
34c: de b7 in r29, 0x3e ; 62
|
||||||
|
for (volatile uint8_t i=68;i--;i>0){
|
||||||
|
34e: 84 e4 ldi r24, 0x44 ; 68
|
||||||
|
350: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
352: 02 c0 rjmp .+4 ; 0x358 <wait_100us+0x18>
|
||||||
|
i;
|
||||||
|
354: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
void wait_100us(void){
|
||||||
|
for (volatile uint8_t i=68;i--;i>0){
|
||||||
|
356: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
358: 89 81 ldd r24, Y+1 ; 0x01
|
||||||
|
35a: 8a 83 std Y+2, r24 ; 0x02
|
||||||
|
35c: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
35e: 8d 83 std Y+5, r24 ; 0x05
|
||||||
|
360: 8d 81 ldd r24, Y+5 ; 0x05
|
||||||
|
362: 88 23 and r24, r24
|
||||||
|
364: 11 f0 breq .+4 ; 0x36a <wait_100us+0x2a>
|
||||||
|
366: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
368: 8d 83 std Y+5, r24 ; 0x05
|
||||||
|
36a: 9d 81 ldd r25, Y+5 ; 0x05
|
||||||
|
36c: 8a 81 ldd r24, Y+2 ; 0x02
|
||||||
|
36e: 81 50 subi r24, 0x01 ; 1
|
||||||
|
370: 89 83 std Y+1, r24 ; 0x01
|
||||||
|
372: 99 23 and r25, r25
|
||||||
|
374: 79 f7 brne .-34 ; 0x354 <wait_100us+0x14>
|
||||||
|
i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
376: 0f 90 pop r0
|
||||||
|
378: 0f 90 pop r0
|
||||||
|
37a: 0f 90 pop r0
|
||||||
|
37c: 0f 90 pop r0
|
||||||
|
37e: 0f 90 pop r0
|
||||||
|
380: cf 91 pop r28
|
||||||
|
382: df 91 pop r29
|
||||||
|
384: 08 95 ret
|
||||||
|
|
||||||
|
00000386 <main>:
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#define lcd_bus8
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
386: df 93 push r29
|
||||||
|
388: cf 93 push r28
|
||||||
|
38a: cd b7 in r28, 0x3d ; 61
|
||||||
|
38c: de b7 in r29, 0x3e ; 62
|
||||||
|
lcd_1s();
|
||||||
|
38e: be de rcall .-644 ; 0x10c <lcd_1s>
|
||||||
|
lcd_init();
|
||||||
|
390: 64 de rcall .-824 ; 0x5a <lcd_init>
|
||||||
|
lcd_1s();
|
||||||
|
392: bc de rcall .-648 ; 0x10c <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
394: bb de rcall .-650 ; 0x10c <lcd_1s>
|
||||||
|
lcd_write(therepos,0x41,0x08);
|
||||||
|
396: 81 e0 ldi r24, 0x01 ; 1
|
||||||
|
398: 61 e4 ldi r22, 0x41 ; 65
|
||||||
|
39a: 48 e0 ldi r20, 0x08 ; 8
|
||||||
|
39c: d8 de rcall .-592 ; 0x14e <lcd_write>
|
||||||
|
lcd_1s();
|
||||||
|
39e: b6 de rcall .-660 ; 0x10c <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
3a0: b5 de rcall .-662 ; 0x10c <lcd_1s>
|
||||||
|
lcd_write(here,0x42,0);
|
||||||
|
3a2: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3a4: 62 e4 ldi r22, 0x42 ; 66
|
||||||
|
3a6: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3a8: d2 de rcall .-604 ; 0x14e <lcd_write>
|
||||||
|
lcd_1s();
|
||||||
|
3aa: b0 de rcall .-672 ; 0x10c <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
3ac: af de rcall .-674 ; 0x10c <lcd_1s>
|
||||||
|
lcd_write(here,0x43,0);
|
||||||
|
3ae: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3b0: 63 e4 ldi r22, 0x43 ; 67
|
||||||
|
3b2: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3b4: cc de rcall .-616 ; 0x14e <lcd_write>
|
||||||
|
lcd_1s();
|
||||||
|
3b6: aa de rcall .-684 ; 0x10c <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
3b8: a9 de rcall .-686 ; 0x10c <lcd_1s>
|
||||||
|
lcd_write(here,0x44,0);
|
||||||
|
3ba: 80 e0 ldi r24, 0x00 ; 0
|
||||||
|
3bc: 64 e4 ldi r22, 0x44 ; 68
|
||||||
|
3be: 40 e0 ldi r20, 0x00 ; 0
|
||||||
|
3c0: c6 de rcall .-628 ; 0x14e <lcd_write>
|
||||||
|
lcd_1s();
|
||||||
|
3c2: a4 de rcall .-696 ; 0x10c <lcd_1s>
|
||||||
|
lcd_1s();
|
||||||
|
3c4: a3 de rcall .-698 ; 0x10c <lcd_1s>
|
||||||
|
DDRB = 0x0f;
|
||||||
|
3c6: e7 e3 ldi r30, 0x37 ; 55
|
||||||
|
3c8: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3ca: 8f e0 ldi r24, 0x0F ; 15
|
||||||
|
3cc: 80 83 st Z, r24
|
||||||
|
while(1==1){
|
||||||
|
PORTB = 0x0f;
|
||||||
|
3ce: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3d0: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3d2: 8f e0 ldi r24, 0x0F ; 15
|
||||||
|
3d4: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
3d6: 9a de rcall .-716 ; 0x10c <lcd_1s>
|
||||||
|
PORTB = 0x05;
|
||||||
|
3d8: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3da: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3dc: 85 e0 ldi r24, 0x05 ; 5
|
||||||
|
3de: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
3e0: 95 de rcall .-726 ; 0x10c <lcd_1s>
|
||||||
|
PORTB = 0x0A;
|
||||||
|
3e2: e8 e3 ldi r30, 0x38 ; 56
|
||||||
|
3e4: f0 e0 ldi r31, 0x00 ; 0
|
||||||
|
3e6: 8a e0 ldi r24, 0x0A ; 10
|
||||||
|
3e8: 80 83 st Z, r24
|
||||||
|
lcd_1s();
|
||||||
|
3ea: 90 de rcall .-736 ; 0x10c <lcd_1s>
|
||||||
|
3ec: f0 cf rjmp .-32 ; 0x3ce <main+0x48>
|
||||||
|
|
||||||
|
000003ee <_exit>:
|
||||||
|
3ee: f8 94 cli
|
||||||
|
|
||||||
|
000003f0 <__stop_program>:
|
||||||
|
3f0: ff cf rjmp .-2 ; 0x3f0 <__stop_program>
|
368
Libs/LCD4/avrmb2313_notkermobil/LCD4.map
Normal file
368
Libs/LCD4/avrmb2313_notkermobil/LCD4.map
Normal file
|
@ -0,0 +1,368 @@
|
||||||
|
Archive member included because of file (symbol)
|
||||||
|
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o (exit)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
./lcd4.o (__do_copy_data)
|
||||||
|
/usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
./lcd4.o (__do_clear_bss)
|
||||||
|
|
||||||
|
Memory Configuration
|
||||||
|
|
||||||
|
Name Origin Length Attributes
|
||||||
|
text 0x00000000 0x00002000 xr
|
||||||
|
data 0x00800060 0x0000ffa0 rw !x
|
||||||
|
eeprom 0x00810000 0x00010000 rw !x
|
||||||
|
fuse 0x00820000 0x00000400 rw !x
|
||||||
|
lock 0x00830000 0x00000400 rw !x
|
||||||
|
signature 0x00840000 0x00000400 rw !x
|
||||||
|
*default* 0x00000000 0xffffffff
|
||||||
|
|
||||||
|
Linker script and memory map
|
||||||
|
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
LOAD ./lcd4.o
|
||||||
|
LOAD ./lcd_wait.o
|
||||||
|
LOAD ./lcdtest.o
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/libc.a
|
||||||
|
LOAD /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a
|
||||||
|
|
||||||
|
.hash
|
||||||
|
*(.hash)
|
||||||
|
|
||||||
|
.dynsym
|
||||||
|
*(.dynsym)
|
||||||
|
|
||||||
|
.dynstr
|
||||||
|
*(.dynstr)
|
||||||
|
|
||||||
|
.gnu.version
|
||||||
|
*(.gnu.version)
|
||||||
|
|
||||||
|
.gnu.version_d
|
||||||
|
*(.gnu.version_d)
|
||||||
|
|
||||||
|
.gnu.version_r
|
||||||
|
*(.gnu.version_r)
|
||||||
|
|
||||||
|
.rel.init
|
||||||
|
*(.rel.init)
|
||||||
|
|
||||||
|
.rela.init
|
||||||
|
*(.rela.init)
|
||||||
|
|
||||||
|
.rel.text
|
||||||
|
*(.rel.text)
|
||||||
|
*(.rel.text.*)
|
||||||
|
*(.rel.gnu.linkonce.t*)
|
||||||
|
|
||||||
|
.rela.text
|
||||||
|
*(.rela.text)
|
||||||
|
*(.rela.text.*)
|
||||||
|
*(.rela.gnu.linkonce.t*)
|
||||||
|
|
||||||
|
.rel.fini
|
||||||
|
*(.rel.fini)
|
||||||
|
|
||||||
|
.rela.fini
|
||||||
|
*(.rela.fini)
|
||||||
|
|
||||||
|
.rel.rodata
|
||||||
|
*(.rel.rodata)
|
||||||
|
*(.rel.rodata.*)
|
||||||
|
*(.rel.gnu.linkonce.r*)
|
||||||
|
|
||||||
|
.rela.rodata
|
||||||
|
*(.rela.rodata)
|
||||||
|
*(.rela.rodata.*)
|
||||||
|
*(.rela.gnu.linkonce.r*)
|
||||||
|
|
||||||
|
.rel.data
|
||||||
|
*(.rel.data)
|
||||||
|
*(.rel.data.*)
|
||||||
|
*(.rel.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
.rela.data
|
||||||
|
*(.rela.data)
|
||||||
|
*(.rela.data.*)
|
||||||
|
*(.rela.gnu.linkonce.d*)
|
||||||
|
|
||||||
|
.rel.ctors
|
||||||
|
*(.rel.ctors)
|
||||||
|
|
||||||
|
.rela.ctors
|
||||||
|
*(.rela.ctors)
|
||||||
|
|
||||||
|
.rel.dtors
|
||||||
|
*(.rel.dtors)
|
||||||
|
|
||||||
|
.rela.dtors
|
||||||
|
*(.rela.dtors)
|
||||||
|
|
||||||
|
.rel.got
|
||||||
|
*(.rel.got)
|
||||||
|
|
||||||
|
.rela.got
|
||||||
|
*(.rela.got)
|
||||||
|
|
||||||
|
.rel.bss
|
||||||
|
*(.rel.bss)
|
||||||
|
|
||||||
|
.rela.bss
|
||||||
|
*(.rela.bss)
|
||||||
|
|
||||||
|
.rel.plt
|
||||||
|
*(.rel.plt)
|
||||||
|
|
||||||
|
.rela.plt
|
||||||
|
*(.rela.plt)
|
||||||
|
|
||||||
|
.text 0x00000000 0x3f2
|
||||||
|
*(.vectors)
|
||||||
|
.vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
0x00000000 __vectors
|
||||||
|
0x00000000 __vector_default
|
||||||
|
*(.vectors)
|
||||||
|
*(.progmem.gcc*)
|
||||||
|
*(.progmem*)
|
||||||
|
0x00000026 . = ALIGN (0x2)
|
||||||
|
0x00000026 __trampolines_start = .
|
||||||
|
*(.trampolines)
|
||||||
|
.trampolines 0x00000026 0x0 linker stubs
|
||||||
|
*(.trampolines*)
|
||||||
|
0x00000026 __trampolines_end = .
|
||||||
|
*(.jumptables)
|
||||||
|
*(.jumptables*)
|
||||||
|
*(.lowtext)
|
||||||
|
*(.lowtext*)
|
||||||
|
0x00000026 __ctors_start = .
|
||||||
|
*(.ctors)
|
||||||
|
0x00000026 __ctors_end = .
|
||||||
|
0x00000026 __dtors_start = .
|
||||||
|
*(.dtors)
|
||||||
|
0x00000026 __dtors_end = .
|
||||||
|
SORT(*)(.ctors)
|
||||||
|
SORT(*)(.dtors)
|
||||||
|
*(.init0)
|
||||||
|
.init0 0x00000026 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
0x00000026 __init
|
||||||
|
*(.init0)
|
||||||
|
*(.init1)
|
||||||
|
*(.init1)
|
||||||
|
*(.init2)
|
||||||
|
.init2 0x00000026 0x8 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
*(.init2)
|
||||||
|
*(.init3)
|
||||||
|
*(.init3)
|
||||||
|
*(.init4)
|
||||||
|
.init4 0x0000002e 0x16 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
0x0000002e __do_copy_data
|
||||||
|
.init4 0x00000044 0x10 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
0x00000044 __do_clear_bss
|
||||||
|
*(.init4)
|
||||||
|
*(.init5)
|
||||||
|
*(.init5)
|
||||||
|
*(.init6)
|
||||||
|
*(.init6)
|
||||||
|
*(.init7)
|
||||||
|
*(.init7)
|
||||||
|
*(.init8)
|
||||||
|
*(.init8)
|
||||||
|
*(.init9)
|
||||||
|
.init9 0x00000054 0x4 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
*(.init9)
|
||||||
|
*(.text)
|
||||||
|
.text 0x00000058 0x2 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
0x00000058 __vector_1
|
||||||
|
0x00000058 __vector_12
|
||||||
|
0x00000058 __bad_interrupt
|
||||||
|
0x00000058 __vector_6
|
||||||
|
0x00000058 __vector_3
|
||||||
|
0x00000058 __vector_11
|
||||||
|
0x00000058 __vector_13
|
||||||
|
0x00000058 __vector_17
|
||||||
|
0x00000058 __vector_7
|
||||||
|
0x00000058 __vector_5
|
||||||
|
0x00000058 __vector_4
|
||||||
|
0x00000058 __vector_9
|
||||||
|
0x00000058 __vector_2
|
||||||
|
0x00000058 __vector_15
|
||||||
|
0x00000058 __vector_8
|
||||||
|
0x00000058 __vector_14
|
||||||
|
0x00000058 __vector_10
|
||||||
|
0x00000058 __vector_16
|
||||||
|
0x00000058 __vector_18
|
||||||
|
.text 0x0000005a 0x2e6 ./lcd4.o
|
||||||
|
0x0000014e lcd_write
|
||||||
|
0x0000010c lcd_1s
|
||||||
|
0x000002c2 lcd_blank_line
|
||||||
|
0x000000e6 lcd_5ms
|
||||||
|
0x00000132 lcd_instruct
|
||||||
|
0x0000005a lcd_init
|
||||||
|
.text 0x00000340 0x46 ./lcd_wait.o
|
||||||
|
0x00000340 wait_100us
|
||||||
|
.text 0x00000386 0x68 ./lcdtest.o
|
||||||
|
0x00000386 main
|
||||||
|
.text 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
.text 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
.text 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
0x000003ee . = ALIGN (0x2)
|
||||||
|
*(.text.*)
|
||||||
|
.text.libgcc 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
.text.libgcc 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
.text.libgcc 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
0x000003ee . = ALIGN (0x2)
|
||||||
|
*(.fini9)
|
||||||
|
.fini9 0x000003ee 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
0x000003ee exit
|
||||||
|
0x000003ee _exit
|
||||||
|
*(.fini9)
|
||||||
|
*(.fini8)
|
||||||
|
*(.fini8)
|
||||||
|
*(.fini7)
|
||||||
|
*(.fini7)
|
||||||
|
*(.fini6)
|
||||||
|
*(.fini6)
|
||||||
|
*(.fini5)
|
||||||
|
*(.fini5)
|
||||||
|
*(.fini4)
|
||||||
|
*(.fini4)
|
||||||
|
*(.fini3)
|
||||||
|
*(.fini3)
|
||||||
|
*(.fini2)
|
||||||
|
*(.fini2)
|
||||||
|
*(.fini1)
|
||||||
|
*(.fini1)
|
||||||
|
*(.fini0)
|
||||||
|
.fini0 0x000003ee 0x4 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
*(.fini0)
|
||||||
|
0x000003f2 _etext = .
|
||||||
|
|
||||||
|
.data 0x00800060 0x0 load address 0x000003f2
|
||||||
|
0x00800060 PROVIDE (__data_start, .)
|
||||||
|
*(.data)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
.data 0x00800060 0x0 ./lcd4.o
|
||||||
|
.data 0x00800060 0x0 ./lcd_wait.o
|
||||||
|
.data 0x00800060 0x0 ./lcdtest.o
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
*(.data*)
|
||||||
|
*(.rodata)
|
||||||
|
*(.rodata*)
|
||||||
|
*(.gnu.linkonce.d*)
|
||||||
|
0x00800060 . = ALIGN (0x2)
|
||||||
|
0x00800060 _edata = .
|
||||||
|
0x00800060 PROVIDE (__data_end, .)
|
||||||
|
|
||||||
|
.bss 0x00800060 0x0 load address 0x000003f2
|
||||||
|
0x00800060 PROVIDE (__bss_start, .)
|
||||||
|
*(.bss)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
.bss 0x00800060 0x0 ./lcd4.o
|
||||||
|
.bss 0x00800060 0x0 ./lcd_wait.o
|
||||||
|
.bss 0x00800060 0x0 ./lcdtest.o
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_copy_data.o)
|
||||||
|
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.3.2/avr25/libgcc.a(_clear_bss.o)
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
0x00800060 PROVIDE (__bss_end, .)
|
||||||
|
0x000003f2 __data_load_start = LOADADDR (.data)
|
||||||
|
0x000003f2 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||||
|
|
||||||
|
.noinit 0x00800060 0x0
|
||||||
|
0x00800060 PROVIDE (__noinit_start, .)
|
||||||
|
*(.noinit*)
|
||||||
|
0x00800060 PROVIDE (__noinit_end, .)
|
||||||
|
0x00800060 _end = .
|
||||||
|
0x00800060 PROVIDE (__heap_start, .)
|
||||||
|
|
||||||
|
.eeprom 0x00810000 0x0
|
||||||
|
*(.eeprom*)
|
||||||
|
0x00810000 __eeprom_end = .
|
||||||
|
|
||||||
|
.fuse
|
||||||
|
*(.fuse)
|
||||||
|
*(.lfuse)
|
||||||
|
*(.hfuse)
|
||||||
|
*(.efuse)
|
||||||
|
|
||||||
|
.lock
|
||||||
|
*(.lock*)
|
||||||
|
|
||||||
|
.signature
|
||||||
|
*(.signature*)
|
||||||
|
|
||||||
|
.stab 0x00000000 0x1158
|
||||||
|
*(.stab)
|
||||||
|
.stab 0x00000000 0x69c /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
.stab 0x0000069c 0x6fc ./lcd4.o
|
||||||
|
0x708 (size before relaxing)
|
||||||
|
.stab 0x00000d98 0x180 ./lcd_wait.o
|
||||||
|
0x348 (size before relaxing)
|
||||||
|
.stab 0x00000f18 0x240 ./lcdtest.o
|
||||||
|
0x408 (size before relaxing)
|
||||||
|
|
||||||
|
.stabstr 0x00000000 0x7ee
|
||||||
|
*(.stabstr)
|
||||||
|
.stabstr 0x00000000 0x7ee /usr/lib/gcc/avr/4.3.2/../../../avr/lib/avr25/crttn2313.o
|
||||||
|
|
||||||
|
.stab.excl
|
||||||
|
*(.stab.excl)
|
||||||
|
|
||||||
|
.stab.exclstr
|
||||||
|
*(.stab.exclstr)
|
||||||
|
|
||||||
|
.stab.index
|
||||||
|
*(.stab.index)
|
||||||
|
|
||||||
|
.stab.indexstr
|
||||||
|
*(.stab.indexstr)
|
||||||
|
|
||||||
|
.comment
|
||||||
|
*(.comment)
|
||||||
|
|
||||||
|
.debug
|
||||||
|
*(.debug)
|
||||||
|
|
||||||
|
.line
|
||||||
|
*(.line)
|
||||||
|
|
||||||
|
.debug_srcinfo
|
||||||
|
*(.debug_srcinfo)
|
||||||
|
|
||||||
|
.debug_sfnames
|
||||||
|
*(.debug_sfnames)
|
||||||
|
|
||||||
|
.debug_aranges
|
||||||
|
*(.debug_aranges)
|
||||||
|
|
||||||
|
.debug_pubnames
|
||||||
|
*(.debug_pubnames)
|
||||||
|
|
||||||
|
.debug_info
|
||||||
|
*(.debug_info)
|
||||||
|
*(.gnu.linkonce.wi.*)
|
||||||
|
|
||||||
|
.debug_abbrev
|
||||||
|
*(.debug_abbrev)
|
||||||
|
|
||||||
|
.debug_line
|
||||||
|
*(.debug_line)
|
||||||
|
|
||||||
|
.debug_frame
|
||||||
|
*(.debug_frame)
|
||||||
|
|
||||||
|
.debug_str
|
||||||
|
*(.debug_str)
|
||||||
|
|
||||||
|
.debug_loc
|
||||||
|
*(.debug_loc)
|
||||||
|
|
||||||
|
.debug_macinfo
|
||||||
|
*(.debug_macinfo)
|
||||||
|
OUTPUT(LCD4.elf elf32-avr)
|
||||||
|
LOAD linker stubs
|
3
Libs/LCD4/avrmb2313_notkermobil/lcd4.d
Normal file
3
Libs/LCD4/avrmb2313_notkermobil/lcd4.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcd4.d lcd4.o: ../lcd4.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/avrmb2313_notkermobil/lcd4.o
Normal file
BIN
Libs/LCD4/avrmb2313_notkermobil/lcd4.o
Normal file
Binary file not shown.
3
Libs/LCD4/avrmb2313_notkermobil/lcd_wait.d
Normal file
3
Libs/LCD4/avrmb2313_notkermobil/lcd_wait.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcd_wait.d lcd_wait.o: ../lcd_wait.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/avrmb2313_notkermobil/lcd_wait.o
Normal file
BIN
Libs/LCD4/avrmb2313_notkermobil/lcd_wait.o
Normal file
Binary file not shown.
3
Libs/LCD4/avrmb2313_notkermobil/lcdtest.d
Normal file
3
Libs/LCD4/avrmb2313_notkermobil/lcdtest.d
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lcdtest.d lcdtest.o: ../lcdtest.c ../lcd4.h
|
||||||
|
|
||||||
|
../lcd4.h:
|
BIN
Libs/LCD4/avrmb2313_notkermobil/lcdtest.o
Normal file
BIN
Libs/LCD4/avrmb2313_notkermobil/lcdtest.o
Normal file
Binary file not shown.
90
Libs/LCD4/avrmb2313_notkermobil/makefile
Normal file
90
Libs/LCD4/avrmb2313_notkermobil/makefile
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
-include ../makefile.init
|
||||||
|
|
||||||
|
RM := rm -rf
|
||||||
|
|
||||||
|
# All of the sources participating in the build are defined here
|
||||||
|
-include sources.mk
|
||||||
|
-include subdir.mk
|
||||||
|
-include objects.mk
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
ifneq ($(strip $(C_DEPS)),)
|
||||||
|
-include $(C_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(ASM_DEPS)),)
|
||||||
|
-include $(ASM_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(S_DEPS)),)
|
||||||
|
-include $(S_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(S_UPPER_DEPS)),)
|
||||||
|
-include $(S_UPPER_DEPS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-include ../makefile.defs
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
LSS += \
|
||||||
|
LCD4.lss \
|
||||||
|
|
||||||
|
FLASH_IMAGE += \
|
||||||
|
LCD4.hex \
|
||||||
|
|
||||||
|
EEPROM_IMAGE += \
|
||||||
|
LCD4.eep \
|
||||||
|
|
||||||
|
SIZEDUMMY += \
|
||||||
|
sizedummy \
|
||||||
|
|
||||||
|
|
||||||
|
# All Target
|
||||||
|
all: LCD4.elf secondary-outputs
|
||||||
|
|
||||||
|
# Tool invocations
|
||||||
|
LCD4.elf: $(OBJS) $(USER_OBJS)
|
||||||
|
@echo 'Building target: $@'
|
||||||
|
@echo 'Invoking: AVR C Linker'
|
||||||
|
avr-gcc -Wl,-Map,LCD4.map -mmcu=attiny2313 -o"LCD4.elf" $(OBJS) $(USER_OBJS) $(LIBS)
|
||||||
|
@echo 'Finished building target: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
LCD4.lss: LCD4.elf
|
||||||
|
@echo 'Invoking: AVR Create Extended Listing'
|
||||||
|
-avr-objdump -h -S LCD4.elf >"LCD4.lss"
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
LCD4.hex: LCD4.elf
|
||||||
|
@echo 'Create Flash image (ihex format)'
|
||||||
|
-avr-objcopy -R .eeprom -O ihex LCD4.elf "LCD4.hex"
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
LCD4.eep: LCD4.elf
|
||||||
|
@echo 'Create eeprom image (ihex format)'
|
||||||
|
-avr-objcopy -j .eeprom --no-change-warnings --change-section-lma .eeprom=0 -O ihex LCD4.elf "LCD4.eep"
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
sizedummy: LCD4.elf
|
||||||
|
@echo 'Invoking: Print Size'
|
||||||
|
-avr-size --format=avr --mcu=attiny2313 LCD4.elf
|
||||||
|
@echo 'Finished building: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
# Other Targets
|
||||||
|
clean:
|
||||||
|
-$(RM) $(OBJS)$(C_DEPS)$(ASM_DEPS)$(EEPROM_IMAGE)$(FLASH_IMAGE)$(ELFS)$(LSS)$(S_DEPS)$(SIZEDUMMY)$(S_UPPER_DEPS) LCD4.elf
|
||||||
|
-@echo ' '
|
||||||
|
|
||||||
|
secondary-outputs: $(LSS) $(FLASH_IMAGE) $(EEPROM_IMAGE) $(SIZEDUMMY)
|
||||||
|
|
||||||
|
.PHONY: all clean dependents
|
||||||
|
.SECONDARY:
|
||||||
|
|
||||||
|
-include ../makefile.targets
|
7
Libs/LCD4/avrmb2313_notkermobil/objects.mk
Normal file
7
Libs/LCD4/avrmb2313_notkermobil/objects.mk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
USER_OBJS :=
|
||||||
|
|
||||||
|
LIBS :=
|
25
Libs/LCD4/avrmb2313_notkermobil/sources.mk
Normal file
25
Libs/LCD4/avrmb2313_notkermobil/sources.mk
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
O_SRCS :=
|
||||||
|
C_SRCS :=
|
||||||
|
S_UPPER_SRCS :=
|
||||||
|
S_SRCS :=
|
||||||
|
OBJ_SRCS :=
|
||||||
|
ASM_SRCS :=
|
||||||
|
OBJS :=
|
||||||
|
C_DEPS :=
|
||||||
|
ASM_DEPS :=
|
||||||
|
EEPROM_IMAGE :=
|
||||||
|
FLASH_IMAGE :=
|
||||||
|
ELFS :=
|
||||||
|
LSS :=
|
||||||
|
S_DEPS :=
|
||||||
|
SIZEDUMMY :=
|
||||||
|
S_UPPER_DEPS :=
|
||||||
|
|
||||||
|
# Every subdirectory with source files must be described here
|
||||||
|
SUBDIRS := \
|
||||||
|
. \
|
||||||
|
|
30
Libs/LCD4/avrmb2313_notkermobil/subdir.mk
Normal file
30
Libs/LCD4/avrmb2313_notkermobil/subdir.mk
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
C_SRCS += \
|
||||||
|
../lcd4.c \
|
||||||
|
../lcd_wait.c \
|
||||||
|
../lcdtest.c
|
||||||
|
|
||||||
|
OBJS += \
|
||||||
|
./lcd4.o \
|
||||||
|
./lcd_wait.o \
|
||||||
|
./lcdtest.o
|
||||||
|
|
||||||
|
C_DEPS += \
|
||||||
|
./lcd4.d \
|
||||||
|
./lcd_wait.d \
|
||||||
|
./lcdtest.d
|
||||||
|
|
||||||
|
|
||||||
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
|
%.o: ../%.c
|
||||||
|
@echo 'Building file: $<'
|
||||||
|
@echo 'Invoking: AVR Compiler'
|
||||||
|
avr-gcc -Wall -g2 -gstabs -O0 -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=attiny2313 -DF_CPU=10000000UL -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -c -o"$@" "$<"
|
||||||
|
@echo 'Finished building: $<'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
|
132
Libs/LCD4/lcd4.c
Normal file
132
Libs/LCD4/lcd4.c
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
/************************************
|
||||||
|
* lcd-Treiber-Bibliothek für Hitachi 44780 und kompatible
|
||||||
|
* z.B. KS0070B
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
135
Libs/LCD4/lcd4.c2
Normal file
135
Libs/LCD4/lcd4.c2
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
/************************************
|
||||||
|
* lcd-Treiber-Bibliothek für Hitachi 44780 und kompatible
|
||||||
|
* z.B. KS0070B
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#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)
|
||||||
|
// 4-Bit to be added, no indent
|
||||||
|
// enum whichtype{instruct, data};
|
||||||
|
void lcd_init(void){
|
||||||
|
/* setting up ports first */
|
||||||
|
lcd_dataport_DDR=0xff;
|
||||||
|
lcd_dataport=0xff;
|
||||||
|
set_lcd_RS_DDR;
|
||||||
|
set_lcd_E_DDR;
|
||||||
|
/* end setting up ports */
|
||||||
|
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);
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_8BIT);
|
||||||
|
#ifdef lcd_bus8
|
||||||
|
lcd_preinstruct(lcd_SET_FUNCTION_8BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
#endif
|
||||||
|
lcd_dataport_DDR|=lcd_dataport_mask;
|
||||||
|
#ifdef lcd_bus4
|
||||||
|
lcd_instruct(lcd_SET_FUNCTION_4BIT|lcd_SET_FUNCTION_2LINE|lcd_SET_FUNCTION_7X5);
|
||||||
|
#endif
|
||||||
|
lcd_5ms();
|
||||||
|
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_preinstruct(uint8_t zeichen){
|
||||||
|
lcd_write(preinstruct,zeichen,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_write(uint8_t lcd_whichwrite, uint8_t zeichen, uint8_t position){
|
||||||
|
switch (lcd_whichwrite){
|
||||||
|
case instruct :
|
||||||
|
case preinstruct :
|
||||||
|
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;
|
||||||
|
asm volatile ("nop");
|
||||||
|
lcd_dataport=( zeichen & lcd_dataport_mask);
|
||||||
|
asm volatile ("nop");
|
||||||
|
#ifdef lcd_bus4
|
||||||
|
if (!(lcd_whichwrite==preinstruct)){
|
||||||
|
unset_lcd_E;
|
||||||
|
zeichen = zeichen << 4;
|
||||||
|
wait_100us();
|
||||||
|
set_lcd_E;
|
||||||
|
asm volatile ("nop");
|
||||||
|
lcd_dataport|=( zeichen & lcd_dataport_mask);
|
||||||
|
asm volatile ("nop");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
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;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (countin=count; countin < count+15; countin++){
|
||||||
|
lcd_write(therepos, 32, countin);
|
||||||
|
}
|
||||||
|
}
|
95
Libs/LCD4/lcd4.h
Normal file
95
Libs/LCD4/lcd4.h
Normal file
|
@ -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 <inttypes.h>
|
||||||
|
/* 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 <avr/io.h>
|
||||||
|
#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
|
||||||
|
|
9
Libs/LCD4/lcd_wait.c
Normal file
9
Libs/LCD4/lcd_wait.c
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "lcd4.h"
|
||||||
|
|
||||||
|
void wait_100us(void){
|
||||||
|
for (volatile uint8_t i=68;i--;i>0){
|
||||||
|
i;
|
||||||
|
}
|
||||||
|
}
|
34
Libs/LCD4/lcdtest.c
Normal file
34
Libs/LCD4/lcdtest.c
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue