📄 lcd3310.lss
字号:
29e: df 91 pop r29
2a0: cf 91 pop r28
2a2: 1f 91 pop r17
2a4: 0f 91 pop r16
2a6: ff 90 pop r15
2a8: ef 90 pop r14
2aa: df 90 pop r13
2ac: cf 90 pop r12
2ae: bf 90 pop r11
2b0: af 90 pop r10
2b2: 9f 90 pop r9
2b4: 8f 90 pop r8
2b6: 7f 90 pop r7
2b8: 6f 90 pop r6
2ba: 5f 90 pop r5
2bc: 4f 90 pop r4
2be: 3f 90 pop r3
2c0: 2f 90 pop r2
2c2: 08 95 ret
000002c4 <LCD_write_english_string>:
2c4: cf 93 push r28
2c6: df 93 push r29
2c8: ea 01 movw r28, r20
2ca: 0e 94 86 00 call 0x10c ; 0x10c <LCD_set_XY>
2ce: 03 c0 rjmp .+6 ; 0x2d6 <LCD_write_english_string+0x12>
2d0: 0e 94 70 00 call 0xe0 ; 0xe0 <LCD_write_char>
2d4: 21 96 adiw r28, 0x01 ; 1
2d6: 88 81 ld r24, Y
2d8: 88 23 and r24, r24
2da: d1 f7 brne .-12 ; 0x2d0 <LCD_write_english_string+0xc>
2dc: df 91 pop r29
2de: cf 91 pop r28
2e0: 08 95 ret
000002e2 <LCD_clear>:
2e2: cf 93 push r28
2e4: df 93 push r29
2e6: 60 e0 ldi r22, 0x00 ; 0
2e8: 8c e0 ldi r24, 0x0C ; 12
2ea: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
2ee: 60 e0 ldi r22, 0x00 ; 0
2f0: 80 e8 ldi r24, 0x80 ; 128
2f2: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
2f6: c0 e0 ldi r28, 0x00 ; 0
2f8: d0 e0 ldi r29, 0x00 ; 0
2fa: 61 e0 ldi r22, 0x01 ; 1
2fc: 80 e0 ldi r24, 0x00 ; 0
2fe: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
302: 21 96 adiw r28, 0x01 ; 1
304: 81 e0 ldi r24, 0x01 ; 1
306: c8 3f cpi r28, 0xF8 ; 248
308: d8 07 cpc r29, r24
30a: b9 f7 brne .-18 ; 0x2fa <LCD_clear+0x18>
30c: df 91 pop r29
30e: cf 91 pop r28
310: 08 95 ret
00000312 <LCD_init>:
312: c6 98 cbi 0x18, 6 ; 24
系统时钟:8M
-----------------------------------------------------------------------*/
void delay_1us(void) //1us延时函数
{
asm("nop");
314: 00 00 nop
316: c6 9a sbi 0x18, 6 ; 24
318: c4 98 cbi 0x18, 4 ; 24
31a: 00 00 nop
31c: c4 9a sbi 0x18, 4 ; 24
31e: 00 00 nop
320: 60 e0 ldi r22, 0x00 ; 0
322: 81 e2 ldi r24, 0x21 ; 33
324: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
328: 60 e0 ldi r22, 0x00 ; 0
32a: 88 ec ldi r24, 0xC8 ; 200
32c: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
330: 60 e0 ldi r22, 0x00 ; 0
332: 86 e0 ldi r24, 0x06 ; 6
334: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
338: 60 e0 ldi r22, 0x00 ; 0
33a: 83 e1 ldi r24, 0x13 ; 19
33c: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
340: 60 e0 ldi r22, 0x00 ; 0
342: 80 e2 ldi r24, 0x20 ; 32
344: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
348: 0e 94 71 01 call 0x2e2 ; 0x2e2 <LCD_clear>
34c: 60 e0 ldi r22, 0x00 ; 0
34e: 8c e0 ldi r24, 0x0C ; 12
350: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
354: c4 98 cbi 0x18, 4 ; 24
356: 08 95 ret
00000358 <delay_1us>:
358: 00 00 nop
35a: 08 95 ret
0000035c <delay_1ms>:
}
void delay_nus(unsigned int n) //N us延时函数
{
unsigned int i=0;
for (i=0;i<n;i++)
delay_1us();
}
void delay_1ms(void) //1ms延时函数
{
35c: 08 95 ret
0000035e <delay_nms>:
unsigned int i;
for (i=0;i<1140;i++);
}
void delay_nms(unsigned int n) //N ms延时函数
{
35e: 08 95 ret
00000360 <LCD_move_chinese_string>:
360: af 92 push r10
362: bf 92 push r11
364: cf 92 push r12
366: df 92 push r13
368: ef 92 push r14
36a: ff 92 push r15
36c: 0f 93 push r16
36e: 1f 93 push r17
370: cf 93 push r28
372: df 93 push r29
374: cd b7 in r28, 0x3d ; 61
376: de b7 in r29, 0x3e ; 62
378: c8 5a subi r28, 0xA8 ; 168
37a: d0 40 sbci r29, 0x00 ; 0
37c: 0f b6 in r0, 0x3f ; 63
37e: f8 94 cli
380: de bf out 0x3e, r29 ; 62
382: 0f be out 0x3f, r0 ; 63
384: cd bf out 0x3d, r28 ; 61
386: b8 2e mov r11, r24
388: c6 2e mov r12, r22
38a: a4 2e mov r10, r20
38c: 84 e5 ldi r24, 0x54 ; 84
38e: fe 01 movw r30, r28
390: eb 5a subi r30, 0xAB ; 171
392: ff 4f sbci r31, 0xFF ; 255
394: 28 2f mov r18, r24
396: 11 92 st Z+, r1
398: 2a 95 dec r18
39a: e9 f7 brne .-6 ; 0x396 <LCD_move_chinese_string+0x36>
39c: fe 01 movw r30, r28
39e: 31 96 adiw r30, 0x01 ; 1
3a0: 11 92 st Z+, r1
3a2: 8a 95 dec r24
3a4: e9 f7 brne .-6 ; 0x3a0 <LCD_move_chinese_string+0x40>
3a6: dd 24 eor r13, r13
3a8: ee 24 eor r14, r14
3aa: ff 24 eor r15, r15
3ac: 8e 2d mov r24, r14
3ae: 6c e0 ldi r22, 0x0C ; 12
3b0: 0e 94 80 02 call 0x500 ; 0x500 <__udivmodqi4>
3b4: 99 27 eor r25, r25
3b6: 28 e1 ldi r18, 0x18 ; 24
3b8: 30 e0 ldi r19, 0x00 ; 0
3ba: 82 9f mul r24, r18
3bc: f0 01 movw r30, r0
3be: 83 9f mul r24, r19
3c0: f0 0d add r31, r0
3c2: 92 9f mul r25, r18
3c4: f0 0d add r31, r0
3c6: 11 24 eor r1, r1
3c8: e1 58 subi r30, 0x81 ; 129
3ca: fc 4f sbci r31, 0xFC ; 252
3cc: ed 0d add r30, r13
3ce: f1 1d adc r31, r1
3d0: 80 81 ld r24, Z
3d2: 94 85 ldd r25, Z+12 ; 0x0c
3d4: d3 94 inc r13
3d6: d6 16 cp r13, r22
3d8: 09 f4 brne .+2 ; 0x3dc <LCD_move_chinese_string+0x7c>
3da: dd 24 eor r13, r13
3dc: fe 01 movw r30, r28
3de: e8 55 subi r30, 0x58 ; 88
3e0: ff 4f sbci r31, 0xFF ; 255
3e2: 80 83 st Z, r24
3e4: fe 01 movw r30, r28
3e6: ec 5a subi r30, 0xAC ; 172
3e8: ff 4f sbci r31, 0xFF ; 255
3ea: 90 83 st Z, r25
3ec: 80 e0 ldi r24, 0x00 ; 0
3ee: 90 e0 ldi r25, 0x00 ; 0
3f0: 8e 01 movw r16, r28
3f2: 0b 5a subi r16, 0xAB ; 171
3f4: 1f 4f sbci r17, 0xFF ; 255
3f6: de 01 movw r26, r28
3f8: 11 96 adiw r26, 0x01 ; 1
3fa: a8 01 movw r20, r16
3fc: 01 96 adiw r24, 0x01 ; 1
3fe: fa 01 movw r30, r20
400: 21 81 ldd r18, Z+1 ; 0x01
402: 21 93 st Z+, r18
404: af 01 movw r20, r30
406: fd 01 movw r30, r26
408: 21 81 ldd r18, Z+1 ; 0x01
40a: 2d 93 st X+, r18
40c: 83 35 cpi r24, 0x53 ; 83
40e: 91 05 cpc r25, r1
410: a9 f7 brne .-22 ; 0x3fc <LCD_move_chinese_string+0x9c>
412: 6c 2d mov r22, r12
414: 8b 2d mov r24, r11
416: 0e 94 86 00 call 0x10c ; 0x10c <LCD_set_XY>
41a: 61 e0 ldi r22, 0x01 ; 1
41c: f8 01 movw r30, r16
41e: 81 91 ld r24, Z+
420: 8f 01 movw r16, r30
422: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
426: ce 01 movw r24, r28
428: 88 55 subi r24, 0x58 ; 88
42a: 9f 4f sbci r25, 0xFF ; 255
42c: 08 17 cp r16, r24
42e: 19 07 cpc r17, r25
430: a1 f7 brne .-24 ; 0x41a <LCD_move_chinese_string+0xba>
432: 6c 2d mov r22, r12
434: 6f 5f subi r22, 0xFF ; 255
436: 8b 2d mov r24, r11
438: 0e 94 86 00 call 0x10c ; 0x10c <LCD_set_XY>
43c: 8e 01 movw r16, r28
43e: 0f 5f subi r16, 0xFF ; 255
440: 1f 4f sbci r17, 0xFF ; 255
442: 61 e0 ldi r22, 0x01 ; 1
444: f8 01 movw r30, r16
446: 81 91 ld r24, Z+
448: 8f 01 movw r16, r30
44a: 0e 94 65 00 call 0xca ; 0xca <LCD_write_byte>
44e: ce 01 movw r24, r28
450: 8c 5a subi r24, 0xAC ; 172
452: 9f 4f sbci r25, 0xFF ; 255
454: 08 17 cp r16, r24
456: 19 07 cpc r17, r25
458: a1 f7 brne .-24 ; 0x442 <LCD_move_chinese_string+0xe2>
45a: 8a 2d mov r24, r10
45c: 99 27 eor r25, r25
45e: 0e 94 af 01 call 0x35e ; 0x35e <delay_nms>
462: 08 94 sec
464: e1 1c adc r14, r1
466: f1 1c adc r15, r1
468: fc e9 ldi r31, 0x9C ; 156
46a: ef 16 cp r14, r31
46c: f1 04 cpc r15, r1
46e: 09 f0 breq .+2 ; 0x472 <LCD_move_chinese_string+0x112>
470: 9d cf rjmp .-198 ; 0x3ac <LCD_move_chinese_string+0x4c>
472: c8 55 subi r28, 0x58 ; 88
474: df 4f sbci r29, 0xFF ; 255
476: 0f b6 in r0, 0x3f ; 63
478: f8 94 cli
47a: de bf out 0x3e, r29 ; 62
47c: 0f be out 0x3f, r0 ; 63
47e: cd bf out 0x3d, r28 ; 61
480: df 91 pop r29
482: cf 91 pop r28
484: 1f 91 pop r17
486: 0f 91 pop r16
488: ff 90 pop r15
48a: ef 90 pop r14
48c: df 90 pop r13
48e: cf 90 pop r12
490: bf 90 pop r11
492: af 90 pop r10
494: 08 95 ret
00000496 <main>:
/******************************************************************************/
void main(void)
{
496: ef 92 push r14
498: 0f 93 push r16
OSCCAL=0x9d; // 8M系统内部时钟校准
49a: 8d e9 ldi r24, 0x9D ; 157
49c: 80 93 6f 00 sts 0x006F, r24
//设置MCU的I/O口
DDRB |= LCD_RST | LCD_DC | LCD_CE | SPI_MOSI | SPI_CLK;
4a0: 87 b3 in r24, 0x17 ; 23
4a2: 88 6f ori r24, 0xF8 ; 248
4a4: 87 bb out 0x17, r24 ; 23
SPSR |= (SPI2X); // 设置SPI时钟倍速
4a6: 8e b1 in r24, 0x0e ; 14
4a8: 8e b9 out 0x0e, r24 ; 14
SPCR |= (SPE)|(MSTR); // 使能SPI接口,主机模式,4M时钟
4aa: 8d b1 in r24, 0x0d ; 13
4ac: 86 60 ori r24, 0x06 ; 6
4ae: 8d b9 out 0x0d, r24 ; 13
LCD_init(); //初始化液晶
4b0: 0e 94 89 01 call 0x312 ; 0x312 <LCD_init>
while(1)
{
LCD_write_chinese_string(0,3,12,3,0,0); //显示“我们的”,在x=0,y=2位置,显示write_chinese_string的12点阵汉字,显示4个,从第0个开始显示,行距为0,
4b4: ee 24 eor r14, r14
4b6: 00 e0 ldi r16, 0x00 ; 0
4b8: 23 e0 ldi r18, 0x03 ; 3
4ba: 4c e0 ldi r20, 0x0C ; 12
4bc: 63 e0 ldi r22, 0x03 ; 3
4be: 80 e0 ldi r24, 0x00 ; 0
4c0: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <LCD_write_chinese_string>
LCD_draw_bmp_pixel(36,2,AVR_bmp,48,32); //显示AVR大图
4c4: 00 e2 ldi r16, 0x20 ; 32
4c6: 20 e3 ldi r18, 0x30 ; 48
4c8: 4f e3 ldi r20, 0x3F ; 63
4ca: 54 e0 ldi r21, 0x04 ; 4
4cc: 62 e0 ldi r22, 0x02 ; 2
4ce: 84 e2 ldi r24, 0x24 ; 36
4d0: 0e 94 94 00 call 0x128 ; 0x128 <LCD_draw_bmp_pixel>
LCD_write_english_string(0,5,"www.OurAVR.com");
4d4: 40 e0 ldi r20, 0x00 ; 0
4d6: 51 e0 ldi r21, 0x01 ; 1
4d8: 65 e0 ldi r22, 0x05 ; 5
4da: 80 e0 ldi r24, 0x00 ; 0
4dc: 0e 94 62 01 call 0x2c4 ; 0x2c4 <LCD_write_english_string>
LCD_move_chinese_string(0, 0, 100); //在屏幕最上面一行显示:欢迎光临本网站!显示速度为100,数值越大,速度越慢。
4e0: 44 e6 ldi r20, 0x64 ; 100
4e2: 60 e0 ldi r22, 0x00 ; 0
4e4: 80 e0 ldi r24, 0x00 ; 0
4e6: 0e 94 b0 01 call 0x360 ; 0x360 <LCD_move_chinese_string>
4ea: e4 cf rjmp .-56 ; 0x4b4 <main+0x1e>
000004ec <delay_nus>:
4ec: 20 e0 ldi r18, 0x00 ; 0
4ee: 30 e0 ldi r19, 0x00 ; 0
4f0: 03 c0 rjmp .+6 ; 0x4f8 <delay_nus+0xc>
4f2: 00 00 nop
4f4: 2f 5f subi r18, 0xFF ; 255
4f6: 3f 4f sbci r19, 0xFF ; 255
4f8: 28 17 cp r18, r24
4fa: 39 07 cpc r19, r25
4fc: d1 f7 brne .-12 ; 0x4f2 <delay_nus+0x6>
4fe: 08 95 ret
00000500 <__udivmodqi4>:
500: 99 1b sub r25, r25
502: 79 e0 ldi r23, 0x09 ; 9
504: 04 c0 rjmp .+8 ; 0x50e <__udivmodqi4_ep>
00000506 <__udivmodqi4_loop>:
506: 99 1f adc r25, r25
508: 96 17 cp r25, r22
50a: 08 f0 brcs .+2 ; 0x50e <__udivmodqi4_ep>
50c: 96 1b sub r25, r22
0000050e <__udivmodqi4_ep>:
50e: 88 1f adc r24, r24
510: 7a 95 dec r23
512: c9 f7 brne .-14 ; 0x506 <__udivmodqi4_loop>
514: 80 95 com r24
516: 08 95 ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -