📄 lcd.lss
字号:
LCD.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000578 00000000 00000000 00000054 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .debug_aranges 00000020 00000000 00000000 000005cc 2**0
CONTENTS, READONLY, DEBUGGING
2 .debug_pubnames 000001e8 00000000 00000000 000005ec 2**0
CONTENTS, READONLY, DEBUGGING
3 .debug_info 00000e01 00000000 00000000 000007d4 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_abbrev 00000239 00000000 00000000 000015d5 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_line 000007e4 00000000 00000000 0000180e 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_frame 00000190 00000000 00000000 00001ff4 2**2
CONTENTS, READONLY, DEBUGGING
7 .debug_str 0000024c 00000000 00000000 00002184 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_loc 0000076b 00000000 00000000 000023d0 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_ranges 000000f0 00000000 00000000 00002b3b 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 55 c0 rjmp .+170 ; 0xac <__ctors_end>
2: 6f c0 rjmp .+222 ; 0xe2 <__bad_interrupt>
4: 6e c0 rjmp .+220 ; 0xe2 <__bad_interrupt>
6: 6d c0 rjmp .+218 ; 0xe2 <__bad_interrupt>
8: 6c c0 rjmp .+216 ; 0xe2 <__bad_interrupt>
a: 6b c0 rjmp .+214 ; 0xe2 <__bad_interrupt>
c: 6a c0 rjmp .+212 ; 0xe2 <__bad_interrupt>
e: 69 c0 rjmp .+210 ; 0xe2 <__bad_interrupt>
10: 68 c0 rjmp .+208 ; 0xe2 <__bad_interrupt>
12: 67 c0 rjmp .+206 ; 0xe2 <__bad_interrupt>
14: 66 c0 rjmp .+204 ; 0xe2 <__bad_interrupt>
16: 65 c0 rjmp .+202 ; 0xe2 <__bad_interrupt>
18: 64 c0 rjmp .+200 ; 0xe2 <__bad_interrupt>
1a: 63 c0 rjmp .+198 ; 0xe2 <__bad_interrupt>
1c: 62 c0 rjmp .+196 ; 0xe2 <__bad_interrupt>
1e: 61 c0 rjmp .+194 ; 0xe2 <__bad_interrupt>
20: 60 c0 rjmp .+192 ; 0xe2 <__bad_interrupt>
22: 5f c0 rjmp .+190 ; 0xe2 <__bad_interrupt>
24: 5e c0 rjmp .+188 ; 0xe2 <__bad_interrupt>
26: 5d c0 rjmp .+186 ; 0xe2 <__bad_interrupt>
28: 5c c0 rjmp .+184 ; 0xe2 <__bad_interrupt>
0000002a <LcdCustomChar>:
2a: 00 1f 00 00 00 00 1f 00 00 1f 10 10 10 10 1f 00 ................
3a: 00 1f 18 18 18 18 1f 00 00 1f 1c 1c 1c 1c 1f 00 ................
4a: 00 1f 1e 1e 1e 1e 1f 00 00 1f 1f 1f 1f 1f 1f 00 ................
5a: 03 07 0f 1f 0f 07 03 00 18 1c 1e 1f 1e 1c 18 00 ................
0000006a <LCDwelcomeln1>:
6a: 4c 43 44 20 34 2d 62 69 74 00 00 LCD 4-bit..
00000075 <LCDprogress>:
75: 4c 6f 61 64 69 6e 67 2e 2e 2e 00 00 Loading.....
00000081 <LCDanimation>:
81: 20 4c 43 44 20 61 6e 69 6d 61 74 69 6f 6e 20 00 LCD animation .
91: 00 .
00000092 <LCDname>:
92: 62 79 3a 20 41 6e 67 67 72 69 61 77 61 6e 20 57 by: Anggriawan W
a2: 00 00 ..
000000a4 <backslash>:
a4: 00 10 08 04 02 01 00 00 ........
000000ac <__ctors_end>:
ac: 11 24 eor r1, r1
ae: 1f be out 0x3f, r1 ; 63
b0: cf e5 ldi r28, 0x5F ; 95
b2: d2 e0 ldi r29, 0x02 ; 2
b4: de bf out 0x3e, r29 ; 62
b6: cd bf out 0x3d, r28 ; 61
000000b8 <__do_copy_data>:
b8: 10 e0 ldi r17, 0x00 ; 0
ba: a0 e6 ldi r26, 0x60 ; 96
bc: b0 e0 ldi r27, 0x00 ; 0
be: e8 e7 ldi r30, 0x78 ; 120
c0: f5 e0 ldi r31, 0x05 ; 5
c2: 02 c0 rjmp .+4 ; 0xc8 <.do_copy_data_start>
000000c4 <.do_copy_data_loop>:
c4: 05 90 lpm r0, Z+
c6: 0d 92 st X+, r0
000000c8 <.do_copy_data_start>:
c8: a0 36 cpi r26, 0x60 ; 96
ca: b1 07 cpc r27, r17
cc: d9 f7 brne .-10 ; 0xc4 <.do_copy_data_loop>
000000ce <__do_clear_bss>:
ce: 10 e0 ldi r17, 0x00 ; 0
d0: a0 e6 ldi r26, 0x60 ; 96
d2: b0 e0 ldi r27, 0x00 ; 0
d4: 01 c0 rjmp .+2 ; 0xd8 <.do_clear_bss_start>
000000d6 <.do_clear_bss_loop>:
d6: 1d 92 st X+, r1
000000d8 <.do_clear_bss_start>:
d8: a0 36 cpi r26, 0x60 ; 96
da: b1 07 cpc r27, r17
dc: e1 f7 brne .-8 ; 0xd6 <.do_clear_bss_loop>
de: 14 d2 rcall .+1064 ; 0x508 <main>
e0: 49 c2 rjmp .+1170 ; 0x574 <_exit>
000000e2 <__bad_interrupt>:
e2: 8e cf rjmp .-228 ; 0x0 <__vectors>
000000e4 <LCDsendChar>:
0x18, 0x1C, 0x1E, 0x1F, 0x1E, 0x1C, 0x18, 0x00 // 7. fast-forward arrow
};
void LCDsendChar(uint8_t ch) //Sends Char to LCD
{
e4: 28 2f mov r18, r24
e6: 20 7f andi r18, 0xF0 ; 240
e8: 22 bb out 0x12, r18 ; 18
LDP=(ch&0b11110000);
LCP|=1<<LCD_RS;
ea: 90 9a sbi 0x12, 0 ; 18
LCP|=1<<LCD_E;
ec: 92 9a sbi 0x12, 2 ; 18
milliseconds can be achieved.
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
ee: 20 ed ldi r18, 0xD0 ; 208
f0: 37 e0 ldi r19, 0x07 ; 7
f2: f9 01 movw r30, r18
f4: 31 97 sbiw r30, 0x01 ; 1
f6: f1 f7 brne .-4 ; 0xf4 <LCDsendChar+0x10>
_delay_ms(1);
LCP&=~(1<<LCD_E);
f8: 92 98 cbi 0x12, 2 ; 18
LCP&=~(1<<LCD_RS);
fa: 90 98 cbi 0x12, 0 ; 18
fc: f9 01 movw r30, r18
fe: 31 97 sbiw r30, 0x01 ; 1
100: f1 f7 brne .-4 ; 0xfe <LCDsendChar+0x1a>
_delay_ms(1);
LDP=((ch&0b00001111)<<4);
102: 90 e0 ldi r25, 0x00 ; 0
104: 44 e0 ldi r20, 0x04 ; 4
106: 88 0f add r24, r24
108: 99 1f adc r25, r25
10a: 4a 95 dec r20
10c: e1 f7 brne .-8 ; 0x106 <LCDsendChar+0x22>
10e: 82 bb out 0x12, r24 ; 18
LCP|=1<<LCD_RS;
110: 90 9a sbi 0x12, 0 ; 18
LCP|=1<<LCD_E;
112: 92 9a sbi 0x12, 2 ; 18
114: c9 01 movw r24, r18
116: 01 97 sbiw r24, 0x01 ; 1
118: f1 f7 brne .-4 ; 0x116 <LCDsendChar+0x32>
_delay_ms(1);
LCP&=~(1<<LCD_E);
11a: 92 98 cbi 0x12, 2 ; 18
LCP&=~(1<<LCD_RS);
11c: 90 98 cbi 0x12, 0 ; 18
11e: c9 01 movw r24, r18
120: 01 97 sbiw r24, 0x01 ; 1
122: f1 f7 brne .-4 ; 0x120 <LCDsendChar+0x3c>
_delay_ms(1);
}
124: 08 95 ret
00000126 <LCDsendCommand>:
void LCDsendCommand(uint8_t cmd) //Sends Command to LCD
{
126: 28 2f mov r18, r24
128: 20 7f andi r18, 0xF0 ; 240
12a: 22 bb out 0x12, r18 ; 18
LDP=(cmd&0b11110000);
LCP|=1<<LCD_E;
12c: 92 9a sbi 0x12, 2 ; 18
12e: 20 ed ldi r18, 0xD0 ; 208
130: 37 e0 ldi r19, 0x07 ; 7
132: f9 01 movw r30, r18
134: 31 97 sbiw r30, 0x01 ; 1
136: f1 f7 brne .-4 ; 0x134 <LCDsendCommand+0xe>
_delay_ms(1);
LCP&=~(1<<LCD_E);
138: 92 98 cbi 0x12, 2 ; 18
13a: f9 01 movw r30, r18
13c: 31 97 sbiw r30, 0x01 ; 1
13e: f1 f7 brne .-4 ; 0x13c <LCDsendCommand+0x16>
_delay_ms(1);
LDP=((cmd&0b00001111)<<4);
140: 90 e0 ldi r25, 0x00 ; 0
142: 54 e0 ldi r21, 0x04 ; 4
144: 88 0f add r24, r24
146: 99 1f adc r25, r25
148: 5a 95 dec r21
14a: e1 f7 brne .-8 ; 0x144 <LCDsendCommand+0x1e>
14c: 82 bb out 0x12, r24 ; 18
LCP|=1<<LCD_E;
14e: 92 9a sbi 0x12, 2 ; 18
150: c9 01 movw r24, r18
152: 01 97 sbiw r24, 0x01 ; 1
154: f1 f7 brne .-4 ; 0x152 <LCDsendCommand+0x2c>
_delay_ms(1);
LCP&=~(1<<LCD_E);
156: 92 98 cbi 0x12, 2 ; 18
158: c9 01 movw r24, r18
15a: 01 97 sbiw r24, 0x01 ; 1
15c: f1 f7 brne .-4 ; 0x15a <LCDsendCommand+0x34>
_delay_ms(1);
}
15e: 08 95 ret
00000160 <LCDclr>:
ch=ch+8;
}
}
void LCDclr(void) //Clears LCD
{
160: 81 e0 ldi r24, 0x01 ; 1
162: e1 df rcall .-62 ; 0x126 <LCDsendCommand>
LCDsendCommand(1<<LCD_CLR);
}
164: 08 95 ret
00000166 <LCDhome>:
void LCDhome(void) //LCD cursor home
{
166: 82 e0 ldi r24, 0x02 ; 2
168: de df rcall .-68 ; 0x126 <LCDsendCommand>
LCDsendCommand(1<<LCD_HOME);
}
16a: 08 95 ret
0000016c <LCDstring>:
void LCDstring(uint8_t* data, uint8_t nBytes) //Outputs string to LCD
{
16c: 0f 93 push r16
16e: 1f 93 push r17
170: cf 93 push r28
172: df 93 push r29
174: 06 2f mov r16, r22
register uint8_t i;
// check to make sure we have a good pointer
if (!data) return;
176: 00 97 sbiw r24, 0x00 ; 0
178: 41 f0 breq .+16 ; 0x18a <LCDstring+0x1e>
17a: ec 01 movw r28, r24
17c: 10 e0 ldi r17, 0x00 ; 0
17e: 03 c0 rjmp .+6 ; 0x186 <LCDstring+0x1a>
// print data
for(i=0; i<nBytes; i++)
{
LCDsendChar(data[i]);
180: 89 91 ld r24, Y+
182: b0 df rcall .-160 ; 0xe4 <LCDsendChar>
// check to make sure we have a good pointer
if (!data) return;
// print data
for(i=0; i<nBytes; i++)
184: 1f 5f subi r17, 0xFF ; 255
186: 10 17 cp r17, r16
188: d8 f3 brcs .-10 ; 0x180 <LCDstring+0x14>
{
LCDsendChar(data[i]);
}
}
18a: df 91 pop r29
18c: cf 91 pop r28
18e: 1f 91 pop r17
190: 0f 91 pop r16
192: 08 95 ret
00000194 <LCDGotoXY>:
void LCDGotoXY(uint8_t x, uint8_t y) //Cursor to X Y position
{
194: 62 30 cpi r22, 0x02 ; 2
196: 31 f0 breq .+12 ; 0x1a4 <LCDGotoXY+0x10>
198: 63 30 cpi r22, 0x03 ; 3
19a: 31 f0 breq .+12 ; 0x1a8 <LCDGotoXY+0x14>
19c: 61 30 cpi r22, 0x01 ; 1
19e: 29 f4 brne .+10 ; 0x1aa <LCDGotoXY+0x16>
register uint8_t DDRAMAddr;
// remap lines into proper order
switch(y)
{
case 0: DDRAMAddr = LCD_LINE0_DDRAMADDR+x; break;
case 1: DDRAMAddr = LCD_LINE1_DDRAMADDR+x; break;
1a0: 80 5c subi r24, 0xC0 ; 192
1a2: 03 c0 rjmp .+6 ; 0x1aa <LCDGotoXY+0x16>
case 2: DDRAMAddr = LCD_LINE2_DDRAMADDR+x; break;
1a4: 8c 5e subi r24, 0xEC ; 236
1a6: 01 c0 rjmp .+2 ; 0x1aa <LCDGotoXY+0x16>
case 3: DDRAMAddr = LCD_LINE3_DDRAMADDR+x; break;
1a8: 8c 5a subi r24, 0xAC ; 172
default: DDRAMAddr = LCD_LINE0_DDRAMADDR+x;
}
// set data address
LCDsendCommand(1<<LCD_DDRAM | DDRAMAddr);
1aa: 80 68 ori r24, 0x80 ; 128
1ac: bc df rcall .-136 ; 0x126 <LCDsendCommand>
}
1ae: 08 95 ret
000001b0 <CopyStringtoLCD>:
//Copies string from flash memory to LCD at x y position
//const uint8_t welcomeln1[] PROGMEM="AVR LCD DEMO\0";
//CopyStringtoLCD(welcomeln1, 3, 1);
void CopyStringtoLCD(const uint8_t *FlashLoc, uint8_t x, uint8_t y)
{
1b0: 1f 93 push r17
1b2: cf 93 push r28
1b4: df 93 push r29
1b6: ec 01 movw r28, r24
1b8: 86 2f mov r24, r22
uint8_t i;
LCDGotoXY(x,y);
1ba: 64 2f mov r22, r20
1bc: eb df rcall .-42 ; 0x194 <LCDGotoXY>
1be: 10 e0 ldi r17, 0x00 ; 0
1c0: 02 c0 rjmp .+4 ; 0x1c6 <CopyStringtoLCD+0x16>
for(i=0;(uint8_t)pgm_read_byte(&FlashLoc[i]);i++)
{
LCDsendChar((uint8_t)pgm_read_byte(&FlashLoc[i]));
1c2: 90 df rcall .-224 ; 0xe4 <LCDsendChar>
void CopyStringtoLCD(const uint8_t *FlashLoc, uint8_t x, uint8_t y)
{
uint8_t i;
LCDGotoXY(x,y);
for(i=0;(uint8_t)pgm_read_byte(&FlashLoc[i]);i++)
1c4: 1f 5f subi r17, 0xFF ; 255
1c6: fe 01 movw r30, r28
1c8: e1 0f add r30, r17
1ca: f1 1d adc r31, r1
1cc: 84 91 lpm r24, Z+
1ce: 88 23 and r24, r24
1d0: c1 f7 brne .-16 ; 0x1c2 <CopyStringtoLCD+0x12>
{
LCDsendChar((uint8_t)pgm_read_byte(&FlashLoc[i]));
}
}
1d2: df 91 pop r29
1d4: cf 91 pop r28
1d6: 1f 91 pop r17
1d8: 08 95 ret
000001da <LCDdefinechar>:
void LCDdefinechar(const uint8_t *pc,uint8_t char_code){
1da: ef 92 push r14
1dc: ff 92 push r15
1de: 0f 93 push r16
1e0: 1f 93 push r17
1e2: cf 93 push r28
1e4: df 93 push r29
1e6: 7c 01 movw r14, r24
1e8: 16 2f mov r17, r22
uint8_t a, pcc;
uint16_t i;
a=(char_code<<3)|0x40;
1ea: 11 0f add r17, r17
1ec: 11 0f add r17, r17
1ee: 11 0f add r17, r17
1f0: 10 64 ori r17, 0x40 ; 64
1f2: c0 e0 ldi r28, 0x00 ; 0
1f4: d0 e0 ldi r29, 0x00 ; 0
for (i=0; i<8; i++){
pcc=pgm_read_byte(&pc[i]);
1f6: f7 01 movw r30, r14
1f8: ec 0f add r30, r28
1fa: fd 1f adc r31, r29
1fc: 04 91 lpm r16, Z+
LCDsendCommand(a++);
1fe: 81 2f mov r24, r17
200: 8c 0f add r24, r28
202: 91 df rcall .-222 ; 0x126 <LCDsendCommand>
LCDsendChar(pcc);
204: 80 2f mov r24, r16
206: 6e df rcall .-292 ; 0xe4 <LCDsendChar>
void LCDdefinechar(const uint8_t *pc,uint8_t char_code){
uint8_t a, pcc;
uint16_t i;
a=(char_code<<3)|0x40;
for (i=0; i<8; i++){
208: 21 96 adiw r28, 0x01 ; 1
20a: c8 30 cpi r28, 0x08 ; 8
20c: d1 05 cpc r29, r1
20e: 99 f7 brne .-26 ; 0x1f6 <LCDdefinechar+0x1c>
pcc=pgm_read_byte(&pc[i]);
LCDsendCommand(a++);
LCDsendChar(pcc);
}
}
210: df 91 pop r29
212: cf 91 pop r28
214: 1f 91 pop r17
216: 0f 91 pop r16
218: ff 90 pop r15
21a: ef 90 pop r14
21c: 08 95 ret
0000021e <LCDinit>:
LCP&=~(1<<LCD_E);
_delay_ms(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -