📄 main.lss
字号:
2ba: 0e 94 9d 00 call 0x13a ; 0x13a <LCD_set_XY>
2be: 8e 01 movw r16, r28
2c0: 0f 5f subi r16, 0xFF ; 255
2c2: 1f 4f sbci r17, 0xFF ; 255
2c4: 61 e0 ldi r22, 0x01 ; 1
2c6: f8 01 movw r30, r16
2c8: 81 91 ld r24, Z+
2ca: 8f 01 movw r16, r30
2cc: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
2d0: ce 01 movw r24, r28
2d2: 8c 5a subi r24, 0xAC ; 172
2d4: 9f 4f sbci r25, 0xFF ; 255
2d6: 08 17 cp r16, r24
2d8: 19 07 cpc r17, r25
2da: a1 f7 brne .-24 ; 0x2c4 <LCD_move_chinese_string+0xe4>
2dc: c5 01 movw r24, r10
2de: 0e 94 64 00 call 0xc8 ; 0xc8 <delay_s>
2e2: 08 94 sec
2e4: e1 1c adc r14, r1
2e6: f1 1c adc r15, r1
2e8: f4 e5 ldi r31, 0x54 ; 84
2ea: ef 16 cp r14, r31
2ec: f1 04 cpc r15, r1
2ee: 09 f0 breq .+2 ; 0x2f2 <LCD_move_chinese_string+0x112>
2f0: 9e cf rjmp .-196 ; 0x22e <LCD_move_chinese_string+0x4e>
2f2: c8 55 subi r28, 0x58 ; 88
2f4: df 4f sbci r29, 0xFF ; 255
2f6: 0f b6 in r0, 0x3f ; 63
2f8: f8 94 cli
2fa: de bf out 0x3e, r29 ; 62
2fc: 0f be out 0x3f, r0 ; 63
2fe: cd bf out 0x3d, r28 ; 61
300: df 91 pop r29
302: cf 91 pop r28
304: 1f 91 pop r17
306: 0f 91 pop r16
308: ff 90 pop r15
30a: ef 90 pop r14
30c: df 90 pop r13
30e: cf 90 pop r12
310: bf 90 pop r11
312: af 90 pop r10
314: 9f 90 pop r9
316: 08 95 ret
00000318 <LCD_write_chinese_string>:
318: 2f 92 push r2
31a: 3f 92 push r3
31c: 4f 92 push r4
31e: 5f 92 push r5
320: 6f 92 push r6
322: 7f 92 push r7
324: 8f 92 push r8
326: 9f 92 push r9
328: af 92 push r10
32a: bf 92 push r11
32c: cf 92 push r12
32e: df 92 push r13
330: ef 92 push r14
332: ff 92 push r15
334: 0f 93 push r16
336: 1f 93 push r17
338: cf 93 push r28
33a: df 93 push r29
33c: cd b7 in r28, 0x3d ; 61
33e: de b7 in r29, 0x3e ; 62
340: 24 97 sbiw r28, 0x04 ; 4
342: 0f b6 in r0, 0x3f ; 63
344: f8 94 cli
346: de bf out 0x3e, r29 ; 62
348: 0f be out 0x3f, r0 ; 63
34a: cd bf out 0x3d, r28 ; 61
34c: d8 2e mov r13, r24
34e: 96 2e mov r9, r22
350: 34 2e mov r3, r20
352: 29 83 std Y+1, r18 ; 0x01
354: 0a 83 std Y+2, r16 ; 0x02
356: 2e 2c mov r2, r14
358: 0e 94 9d 00 call 0x13a ; 0x13a <LCD_set_XY>
35c: 63 2c mov r6, r3
35e: 77 24 eor r7, r7
360: 23 01 movw r4, r6
362: 44 0c add r4, r4
364: 55 1c adc r5, r5
366: cc 24 eor r12, r12
368: 2f c0 rjmp .+94 ; 0x3c8 <LCD_write_chinese_string+0xb0>
36a: 83 15 cp r24, r3
36c: 49 f4 brne .+18 ; 0x380 <LCD_write_chinese_string+0x68>
36e: 69 2d mov r22, r9
370: 6f 5f subi r22, 0xFF ; 255
372: cc 20 and r12, r12
374: 11 f4 brne .+4 ; 0x37a <LCD_write_chinese_string+0x62>
376: 8d 2d mov r24, r13
378: 01 c0 rjmp .+2 ; 0x37c <LCD_write_chinese_string+0x64>
37a: 88 2d mov r24, r8
37c: 0e 94 9d 00 call 0x13a ; 0x13a <LCD_set_XY>
380: d7 01 movw r26, r14
382: 8a 81 ldd r24, Y+2 ; 0x02
384: a8 0f add r26, r24
386: b1 1d adc r27, r1
388: 85 e0 ldi r24, 0x05 ; 5
38a: aa 0f add r26, r26
38c: bb 1f adc r27, r27
38e: 8a 95 dec r24
390: e1 f7 brne .-8 ; 0x38a <LCD_write_chinese_string+0x72>
392: a5 57 subi r26, 0x75 ; 117
394: bd 4f sbci r27, 0xFD ; 253
396: a0 0f add r26, r16
398: b1 1f adc r27, r17
39a: 61 e0 ldi r22, 0x01 ; 1
39c: 8c 91 ld r24, X
39e: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
3a2: eb 81 ldd r30, Y+3 ; 0x03
3a4: fc 81 ldd r31, Y+4 ; 0x04
3a6: 31 96 adiw r30, 0x01 ; 1
3a8: fc 83 std Y+4, r31 ; 0x04
3aa: eb 83 std Y+3, r30 ; 0x03
3ac: 8b 81 ldd r24, Y+3 ; 0x03
3ae: 08 2f mov r16, r24
3b0: 11 27 eor r17, r17
3b2: 04 15 cp r16, r4
3b4: 15 05 cpc r17, r5
3b6: cc f2 brlt .-78 ; 0x36a <LCD_write_chinese_string+0x52>
3b8: c3 94 inc r12
3ba: ca 9c mul r12, r10
3bc: 80 2d mov r24, r0
3be: 11 24 eor r1, r1
3c0: 69 2d mov r22, r9
3c2: 8d 0d add r24, r13
3c4: 0e 94 9d 00 call 0x13a ; 0x13a <LCD_set_XY>
3c8: f9 81 ldd r31, Y+1 ; 0x01
3ca: cf 16 cp r12, r31
3cc: 89 f0 breq .+34 ; 0x3f0 <LCD_write_chinese_string+0xd8>
3ce: 53 01 movw r10, r6
3d0: a2 0c add r10, r2
3d2: b1 1c adc r11, r1
3d4: ec 2c mov r14, r12
3d6: ff 24 eor r15, r15
3d8: ae 9c mul r10, r14
3da: c0 01 movw r24, r0
3dc: af 9c mul r10, r15
3de: 90 0d add r25, r0
3e0: be 9c mul r11, r14
3e2: 90 0d add r25, r0
3e4: 11 24 eor r1, r1
3e6: 8d 2c mov r8, r13
3e8: 88 0e add r8, r24
3ea: 1c 82 std Y+4, r1 ; 0x04
3ec: 1b 82 std Y+3, r1 ; 0x03
3ee: de cf rjmp .-68 ; 0x3ac <LCD_write_chinese_string+0x94>
3f0: 24 96 adiw r28, 0x04 ; 4
3f2: 0f b6 in r0, 0x3f ; 63
3f4: f8 94 cli
3f6: de bf out 0x3e, r29 ; 62
3f8: 0f be out 0x3f, r0 ; 63
3fa: cd bf out 0x3d, r28 ; 61
3fc: df 91 pop r29
3fe: cf 91 pop r28
400: 1f 91 pop r17
402: 0f 91 pop r16
404: ff 90 pop r15
406: ef 90 pop r14
408: df 90 pop r13
40a: cf 90 pop r12
40c: bf 90 pop r11
40e: af 90 pop r10
410: 9f 90 pop r9
412: 8f 90 pop r8
414: 7f 90 pop r7
416: 6f 90 pop r6
418: 5f 90 pop r5
41a: 4f 90 pop r4
41c: 3f 90 pop r3
41e: 2f 90 pop r2
420: 08 95 ret
00000422 <LCD_write_english_string>:
422: cf 93 push r28
424: df 93 push r29
426: ea 01 movw r28, r20
428: 0e 94 9d 00 call 0x13a ; 0x13a <LCD_set_XY>
42c: 03 c0 rjmp .+6 ; 0x434 <LCD_write_english_string+0x12>
42e: 0e 94 87 00 call 0x10e ; 0x10e <LCD_write_char>
432: 21 96 adiw r28, 0x01 ; 1
434: 88 81 ld r24, Y
436: 88 23 and r24, r24
438: d1 f7 brne .-12 ; 0x42e <LCD_write_english_string+0xc>
43a: df 91 pop r29
43c: cf 91 pop r28
43e: 08 95 ret
00000440 <LCD_clear>:
440: cf 93 push r28
442: df 93 push r29
444: 60 e0 ldi r22, 0x00 ; 0
446: 8c e0 ldi r24, 0x0C ; 12
448: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
44c: 60 e0 ldi r22, 0x00 ; 0
44e: 80 e8 ldi r24, 0x80 ; 128
450: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
454: c0 e0 ldi r28, 0x00 ; 0
456: d0 e0 ldi r29, 0x00 ; 0
458: 61 e0 ldi r22, 0x01 ; 1
45a: 80 e0 ldi r24, 0x00 ; 0
45c: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
460: 21 96 adiw r28, 0x01 ; 1
462: 81 e0 ldi r24, 0x01 ; 1
464: c8 3f cpi r28, 0xF8 ; 248
466: d8 07 cpc r29, r24
468: b9 f7 brne .-18 ; 0x458 <LCD_clear+0x18>
46a: df 91 pop r29
46c: cf 91 pop r28
46e: 08 95 ret
00000470 <LCD_init>:
470: c1 98 cbi 0x18, 1 ; 24
472: 80 e0 ldi r24, 0x00 ; 0
474: 90 e0 ldi r25, 0x00 ; 0
系统时钟:8M
-----------------------------------------------------------------------*/
void delay_1us(void) //1us延时函数
{
asm("nop");
476: 00 00 nop
// _delay_loop_2(250);//4
}
void delay_nus(unsigned int n) //N us延时函数
{
unsigned int i=0;
for (i=0;i<n;i++)
478: 01 96 adiw r24, 0x01 ; 1
47a: 8a 30 cpi r24, 0x0A ; 10
47c: 91 05 cpc r25, r1
47e: d9 f7 brne .-10 ; 0x476 <LCD_init+0x6>
void LCD_init(void)
{
PORTB &= ~LCD_RST; // 产生一个让LCD复位的低电平脉冲
delay_nus(10);
PORTB |= LCD_RST;
480: c1 9a sbi 0x18, 1 ; 24
PORTB &= ~LCD_CE ; // 关闭LCD
482: c4 98 cbi 0x18, 4 ; 24
484: 80 e0 ldi r24, 0x00 ; 0
486: 90 e0 ldi r25, 0x00 ; 0
系统时钟:8M
-----------------------------------------------------------------------*/
void delay_1us(void) //1us延时函数
{
asm("nop");
488: 00 00 nop
// _delay_loop_2(250);//4
}
void delay_nus(unsigned int n) //N us延时函数
{
unsigned int i=0;
for (i=0;i<n;i++)
48a: 01 96 adiw r24, 0x01 ; 1
48c: 8a 30 cpi r24, 0x0A ; 10
48e: 91 05 cpc r25, r1
490: d9 f7 brne .-10 ; 0x488 <LCD_init+0x18>
PORTB |= LCD_RST;
PORTB &= ~LCD_CE ; // 关闭LCD
delay_nus(10);
PORTB |= LCD_CE; // 使能LCD
492: c4 9a sbi 0x18, 4 ; 24
494: 80 e0 ldi r24, 0x00 ; 0
496: 90 e0 ldi r25, 0x00 ; 0
系统时钟:8M
-----------------------------------------------------------------------*/
void delay_1us(void) //1us延时函数
{
asm("nop");
498: 00 00 nop
// _delay_loop_2(250);//4
}
void delay_nus(unsigned int n) //N us延时函数
{
unsigned int i=0;
for (i=0;i<n;i++)
49a: 01 96 adiw r24, 0x01 ; 1
49c: 8a 30 cpi r24, 0x0A ; 10
49e: 91 05 cpc r25, r1
4a0: d9 f7 brne .-10 ; 0x498 <LCD_init+0x28>
delay_nus(10);
PORTB |= LCD_CE; // 使能LCD
delay_nus(10);
LCD_write_byte(0x21, 0); // 使用扩展命令设置LCD模式
4a2: 60 e0 ldi r22, 0x00 ; 0
4a4: 81 e2 ldi r24, 0x21 ; 33
4a6: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
LCD_write_byte(0xc8, 0); // 设置偏置电压
4aa: 60 e0 ldi r22, 0x00 ; 0
4ac: 88 ec ldi r24, 0xC8 ; 200
4ae: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
LCD_write_byte(0x06, 0); // 温度校正
4b2: 60 e0 ldi r22, 0x00 ; 0
4b4: 86 e0 ldi r24, 0x06 ; 6
4b6: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
LCD_write_byte(0x13, 0); // 1:48
4ba: 60 e0 ldi r22, 0x00 ; 0
4bc: 83 e1 ldi r24, 0x13 ; 19
4be: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
LCD_write_byte(0x20, 0); // 使用基本命令
4c2: 60 e0 ldi r22, 0x00 ; 0
4c4: 80 e2 ldi r24, 0x20 ; 32
4c6: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
LCD_clear(); // 清屏
4ca: 0e 94 20 02 call 0x440 ; 0x440 <LCD_clear>
LCD_write_byte(0x0c, 0); // 设定显示模式,正常显示
4ce: 60 e0 ldi r22, 0x00 ; 0
4d0: 8c e0 ldi r24, 0x0C ; 12
4d2: 0e 94 7c 00 call 0xf8 ; 0xf8 <LCD_write_byte>
PORTB &= ~LCD_CE ; // 关闭LCD
4d6: c4 98 cbi 0x18, 4 ; 24
4d8: 08 95 ret
000004da <main>:
int main(void)
{
// OSCCAL=0x9d; // 8M系统内部时钟校准
//设置MCU的I/O口
DDRB |= LCD_RST | LCD_DC | LCD_CE | SPI_MOSI | SPI_CLK;
4da: 87 b3 in r24, 0x17 ; 23
4dc: 82 6f ori r24, 0xF2 ; 242
4de: 87 bb out 0x17, r24 ; 23
// SPSR |= _BV(SPI2X); // 设置SPI时钟倍速
SPCR |= _BV(SPE) | _BV(MSTR); // 使能SPI接口,主机模式,4M时钟
4e0: 8d b1 in r24, 0x0d ; 13
4e2: 80 65 ori r24, 0x50 ; 80
4e4: 8d b9 out 0x0d, r24 ; 13
LCD_init(); //初始化液晶
4e6: 0e 94 38 02 call 0x470 ; 0x470 <LCD_init>
// char s="hello";
while(1)
{
LCD_write_english_string(0,0,"26");
4ea: 40 e6 ldi r20, 0x60 ; 96
4ec: 50 e0 ldi r21, 0x00 ; 0
4ee: 60 e0 ldi r22, 0x00 ; 0
4f0: 80 e0 ldi r24, 0x00 ; 0
4f2: 0e 94 11 02 call 0x422 ; 0x422 <LCD_write_english_string>
4f6: 20 e0 ldi r18, 0x00 ; 0
4f8: 30 e0 ldi r19, 0x00 ; 0
4fa: e0 ed ldi r30, 0xD0 ; 208
4fc: f7 e0 ldi r31, 0x07 ; 7
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
4fe: cf 01 movw r24, r30
500: 01 97 sbiw r24, 0x01 ; 1
502: f1 f7 brne .-4 ; 0x500 <main+0x26>
void DelayMs(unsigned int t)
{
unsigned int i;
for(i=0;i<t;i++)
504: 2f 5f subi r18, 0xFF ; 255
506: 3f 4f sbci r19, 0xFF ; 255
508: 81 e0 ldi r24, 0x01 ; 1
50a: 24 3f cpi r18, 0xF4 ; 244
50c: 38 07 cpc r19, r24
50e: b9 f7 brne .-18 ; 0x4fe <main+0x24>
510: 20 e0 ldi r18, 0x00 ; 0
512: 30 e0 ldi r19, 0x00 ; 0
514: e0 ed ldi r30, 0xD0 ; 208
516: f7 e0 ldi r31, 0x07 ; 7
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
518: cf 01 movw r24, r30
51a: 01 97 sbiw r24, 0x01 ; 1
51c: f1 f7 brne .-4 ; 0x51a <main+0x40>
void DelayMs(unsigned int t)
{
unsigned int i;
for(i=0;i<t;i++)
51e: 2f 5f subi r18, 0xFF ; 255
520: 3f 4f sbci r19, 0xFF ; 255
522: 81 e0 ldi r24, 0x01 ; 1
524: 24 3f cpi r18, 0xF4 ; 244
526: 38 07 cpc r19, r24
528: b9 f7 brne .-18 ; 0x518 <main+0x3e>
52a: 20 e0 ldi r18, 0x00 ; 0
52c: 30 e0 ldi r19, 0x00 ; 0
52e: e0 ed ldi r30, 0xD0 ; 208
530: f7 e0 ldi r31, 0x07 ; 7
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
532: cf 01 movw r24, r30
534: 01 97 sbiw r24, 0x01 ; 1
536: f1 f7 brne .-4 ; 0x534 <main+0x5a>
void DelayMs(unsigned int t)
{
unsigned int i;
for(i=0;i<t;i++)
538: 2f 5f subi r18, 0xFF ; 255
53a: 3f 4f sbci r19, 0xFF ; 255
53c: 81 e0 ldi r24, 0x01 ; 1
53e: 24 3f cpi r18, 0xF4 ; 244
540: 38 07 cpc r19, r24
542: b9 f7 brne .-18 ; 0x532 <main+0x58>
DelayMs(500);
DelayMs(500);
DelayMs(500);
LCD_clear();
544: 0e 94 20 02 call 0x440 ; 0x440 <LCD_clear>
548: d0 cf rjmp .-96 ; 0x4ea <main+0x10>
0000054a <__udivmodqi4>:
54a: 99 1b sub r25, r25
54c: 79 e0 ldi r23, 0x09 ; 9
54e: 04 c0 rjmp .+8 ; 0x558 <__udivmodqi4_ep>
00000550 <__udivmodqi4_loop>:
550: 99 1f adc r25, r25
552: 96 17 cp r25, r22
554: 08 f0 brcs .+2 ; 0x558 <__udivmodqi4_ep>
556: 96 1b sub r25, r22
00000558 <__udivmodqi4_ep>:
558: 88 1f adc r24, r24
55a: 7a 95 dec r23
55c: c9 f7 brne .-14 ; 0x550 <__udivmodqi4_loop>
55e: 80 95 com r24
560: 08 95 ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -