⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thermometer.lss

📁 ds18b20 thermometer with lcd, ds18b20 thermometer with lcd, ds18b20 thermometer with lcd
💻 LSS
📖 第 1 页 / 共 5 页
字号:

Thermometer.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00001a7e  00000000  00000000  00000074  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000120  00800060  00001a7e  00001af2  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000003d  00800180  00001b9e  00001c12  2**0
                  ALLOC
  3 .debug_aranges 000000a0  00000000  00000000  00001c12  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_pubnames 0000027a  00000000  00000000  00001cb2  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_info   00001936  00000000  00000000  00001f2c  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_abbrev 00000695  00000000  00000000  00003862  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_line   0000116b  00000000  00000000  00003ef7  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame  00000250  00000000  00000000  00005064  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    000003d6  00000000  00000000  000052b4  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_loc    000009d4  00000000  00000000  0000568a  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 00000498  00000000  00000000  0000605e  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
       0:	0c 94 8b 01 	jmp	0x316	; 0x316 <__ctors_end>
       4:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
       8:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
       c:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      10:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      14:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      18:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      1c:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      20:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      24:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      28:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      2c:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      30:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      34:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      38:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      3c:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      40:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      44:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      48:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      4c:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>
      50:	0c 94 a8 01 	jmp	0x350	; 0x350 <__bad_interrupt>

00000054 <font5x7>:
      54:	00 00 00 00 00 00 00 2f 00 00 00 07 00 07 00 14     ......./........
      64:	7f 14 7f 14 24 2a 7f 2a 12 32 34 08 16 26 36 49     ....$*.*.24..&6I
      74:	55 22 50 00 05 03 00 00 00 1c 22 41 00 00 41 22     U"P......."A..A"
      84:	1c 00 14 08 3e 08 14 08 08 3e 08 08 00 00 50 30     ....>....>....P0
      94:	00 10 10 10 10 10 00 60 60 00 00 20 10 08 04 02     .......``.. ....
      a4:	3e 51 49 45 3e 00 42 7f 40 00 42 61 51 49 46 21     >QIE>.B.@.BaQIF!
      b4:	41 45 4b 31 18 14 12 7f 10 27 45 45 45 39 3c 4a     AEK1.....'EEE9<J
      c4:	49 49 30 01 71 09 05 03 36 49 49 49 36 06 49 49     II0.q...6III6.II
      d4:	29 1e 00 36 36 00 00 00 56 36 00 00 08 14 22 41     )..66...V6...."A
      e4:	00 14 14 14 14 14 00 41 22 14 08 02 01 51 09 06     .......A"....Q..
      f4:	32 49 59 51 3e 7e 11 11 11 7e 7f 49 49 49 36 3e     2IYQ>~...~.III6>
     104:	41 41 41 22 7f 41 41 22 1c 7f 49 49 49 41 7f 09     AAA".AA"..IIIA..
     114:	09 09 01 3e 41 49 49 7a 7f 08 08 08 7f 00 41 7f     ...>AIIz......A.
     124:	41 00 20 40 41 3f 01 7f 08 14 22 41 7f 40 40 40     A. @A?...."A.@@@
     134:	40 7f 02 0c 02 7f 7f 04 08 10 7f 3e 41 41 41 3e     @..........>AAA>
     144:	7f 09 09 09 06 3e 41 51 21 5e 7f 09 19 29 46 46     .....>AQ!^...)FF
     154:	49 49 49 31 01 01 7f 01 01 3f 40 40 40 3f 1f 20     III1.....?@@@?. 
     164:	40 20 1f 3f 40 38 40 3f 63 14 08 14 63 07 08 70     @ .?@8@?c...c..p
     174:	08 07 61 51 49 45 43 00 7f 41 41 00 55 2a 55 2a     ..aQIEC..AA.U*U*
     184:	55 00 41 41 7f 00 04 02 01 02 04 40 40 40 40 40     U.AA.......@@@@@
     194:	00 01 02 04 00 20 54 54 54 78 7f 48 44 44 38 38     ..... TTTx.HDD88
     1a4:	44 44 44 20 38 44 44 48 7f 38 54 54 54 18 08 7e     DDD 8DDH.8TTT..~
     1b4:	09 01 02 0c 52 52 52 3e 7f 08 04 04 78 00 44 7d     ....RRR>....x.D}
     1c4:	40 00 20 40 44 3d 00 7f 10 28 44 00 00 41 7f 40     @. @D=...(D..A.@
     1d4:	00 7c 04 18 04 78 7c 08 04 04 78 38 44 44 44 38     .|...x|...x8DDD8
     1e4:	7c 14 14 14 08 08 14 14 18 7c 7c 08 04 04 08 48     |........||....H
     1f4:	54 54 54 20 04 3f 44 40 20 3c 40 40 20 7c 1c 20     TTT .?D@ <@@ |. 
     204:	40 20 1c 3c 40 30 40 3c 44 28 10 28 44 0c 50 50     @ .<@0@<D(.(D.PP
     214:	50 3c 44 64 54 4c 44 00 40 7a 10 f3 5a 00 a0 72     P<DdTLD.@z..Z..r
     224:	4e 18 09 00 10 a5 d4 e8 00 00 e8 76 48 17 00 00     N..........vH...
     234:	e4 0b 54 02 00 00 ca 9a 3b 00 00 00 e1 f5 05 00     ..T.....;.......
     244:	00 80 96 98 00 00 00 40 42 0f 00 00 00 a0 86 01     .......@B.......
     254:	00 00 00 10 27 00 00 00 00 e8 03 00 00 00 00 64     ....'..........d
     264:	00 00 00 00 00 0a 00 00 00 00 00 01 00 00 00 00     ................
     274:	00 2c 76 d8 88 dc 67 4f 08 23 df c1 df ae 59 e1     .,v...gO.#....Y.
     284:	b1 b7 96 e5 e3 e4 53 c6 3a e6 51 99 76 96 e8 e6     ......S.:.Q.v...
     294:	c2 84 26 eb 89 8c 9b 62 ed 40 7c 6f fc ef bc 9c     ..&....b.@|o....
     2a4:	9f 40 f2 ba a5 6f a5 f4 90 05 5a 2a f7 5c 93 6b     .@...o....Z*.\.k
     2b4:	6c f9 67 6d c1 1b fc e0 e4 0d 47 fe f5 20 e6 b5     l.gm......G.. ..
     2c4:	00 d0 ed 90 2e 03 00 94 35 77 05 00 80 84 1e 08     ........5w......
     2d4:	00 00 20 4e 0a 00 00 00 c8 0c 33 33 33 33 0f 98     .. N......3333..
     2e4:	6e 12 83 11 41 ef 8d 21 14 89 3b e6 55 16 cf fe     n...A..!..;.U...
     2f4:	e6 db 18 d1 84 4b 38 1b f7 7c 1d 90 1d a4 bb e4     .....K8..|......
     304:	24 20 32 84 72 5e 22 81 00 c9 f1 24 ec a1 e5 3d     $ 2.r^"....$...=
     314:	27 00                                               '.

00000316 <__ctors_end>:
     316:	11 24       	eor	r1, r1
     318:	1f be       	out	0x3f, r1	; 63
     31a:	cf e5       	ldi	r28, 0x5F	; 95
     31c:	d8 e0       	ldi	r29, 0x08	; 8
     31e:	de bf       	out	0x3e, r29	; 62
     320:	cd bf       	out	0x3d, r28	; 61

00000322 <__do_copy_data>:
     322:	11 e0       	ldi	r17, 0x01	; 1
     324:	a0 e6       	ldi	r26, 0x60	; 96
     326:	b0 e0       	ldi	r27, 0x00	; 0
     328:	ee e7       	ldi	r30, 0x7E	; 126
     32a:	fa e1       	ldi	r31, 0x1A	; 26
     32c:	02 c0       	rjmp	.+4      	; 0x332 <.do_copy_data_start>

0000032e <.do_copy_data_loop>:
     32e:	05 90       	lpm	r0, Z+
     330:	0d 92       	st	X+, r0

00000332 <.do_copy_data_start>:
     332:	a0 38       	cpi	r26, 0x80	; 128
     334:	b1 07       	cpc	r27, r17
     336:	d9 f7       	brne	.-10     	; 0x32e <.do_copy_data_loop>

00000338 <__do_clear_bss>:
     338:	11 e0       	ldi	r17, 0x01	; 1
     33a:	a0 e8       	ldi	r26, 0x80	; 128
     33c:	b1 e0       	ldi	r27, 0x01	; 1
     33e:	01 c0       	rjmp	.+2      	; 0x342 <.do_clear_bss_start>

00000340 <.do_clear_bss_loop>:
     340:	1d 92       	st	X+, r1

00000342 <.do_clear_bss_start>:
     342:	ad 3b       	cpi	r26, 0xBD	; 189
     344:	b1 07       	cpc	r27, r17
     346:	e1 f7       	brne	.-8      	; 0x340 <.do_clear_bss_loop>
     348:	0e 94 aa 01 	call	0x354	; 0x354 <main>
     34c:	0c 94 3d 0d 	jmp	0x1a7a	; 0x1a7a <_exit>

00000350 <__bad_interrupt>:
     350:	0c 94 00 00 	jmp	0	; 0x0 <__vectors>

00000354 <main>:
#include "lcd.h"
#include "functions.h"
#include <avr/io.h>

int main(void)
{	
     354:	1f 93       	push	r17
	unsigned char BUTTON;
	unsigned char pin_state;

	DDRD = 0; 			                //set PIN D as input
     356:	11 ba       	out	0x11, r1	; 17
	
	InitSystem();
     358:	0e 94 f8 02 	call	0x5f0	; 0x5f0 <InitSystem>
	ShowMe();
     35c:	0e 94 e0 02 	call	0x5c0	; 0x5c0 <ShowMe>

	SB2();	
     360:	0e 94 e4 02 	call	0x5c8	; 0x5c8 <SB2>

	while(1)
	{
		pin_state = PIND;
     364:	10 b3       	in	r17, 0x10	; 16
		BUTTON = ~pin_state & (0x01);
		if (BUTTON) SB1();
     366:	10 fd       	sbrc	r17, 0
     368:	02 c0       	rjmp	.+4      	; 0x36e <main+0x1a>
     36a:	0e 94 e7 02 	call	0x5ce	; 0x5ce <SB1>
		BUTTON = ~pin_state & (0x02);
     36e:	10 95       	com	r17
		if (BUTTON) SB2();
     370:	11 ff       	sbrs	r17, 1
     372:	02 c0       	rjmp	.+4      	; 0x378 <main+0x24>
     374:	0e 94 e4 02 	call	0x5c8	; 0x5c8 <SB2>
	    BUTTON = ~pin_state & (0x04);
		if (BUTTON) SB3();
     378:	12 ff       	sbrs	r17, 2
     37a:	f4 cf       	rjmp	.-24     	; 0x364 <main+0x10>
     37c:	0e 94 e1 02 	call	0x5c2	; 0x5c2 <SB3>
     380:	f1 cf       	rjmp	.-30     	; 0x364 <main+0x10>

00000382 <lcd_goto_xy>:
    lcd_clear_area(line, 1, LCD_X_RES);
}

/* Sets cursor location to xy location corresponding to basic font size */
void lcd_goto_xy(unsigned char x, unsigned char y)
{
     382:	96 e0       	ldi	r25, 0x06	; 6
     384:	89 9f       	mul	r24, r25
     386:	c0 01       	movw	r24, r0
     388:	11 24       	eor	r1, r1
     38a:	8a 55       	subi	r24, 0x5A	; 90
     38c:	90 40       	sbci	r25, 0x00	; 0
     38e:	24 e5       	ldi	r18, 0x54	; 84
     390:	62 9f       	mul	r22, r18
     392:	b0 01       	movw	r22, r0
     394:	11 24       	eor	r1, r1
     396:	86 0f       	add	r24, r22
     398:	97 1f       	adc	r25, r23
     39a:	90 93 81 01 	sts	0x0181, r25
     39e:	80 93 80 01 	sts	0x0180, r24
    lcdCacheIdx = (x-1)*6 + (y-1)*84;
}
     3a2:	08 95       	ret

000003a4 <lcd_goto_xy_exact>:

/* Sets cursor location to exact xy pixel location on the lcd */
void lcd_goto_xy_exact(unsigned char x, unsigned char y)
{
     3a4:	90 e0       	ldi	r25, 0x00	; 0
     3a6:	85 55       	subi	r24, 0x55	; 85
     3a8:	90 40       	sbci	r25, 0x00	; 0
     3aa:	24 e5       	ldi	r18, 0x54	; 84
     3ac:	62 9f       	mul	r22, r18
     3ae:	b0 01       	movw	r22, r0
     3b0:	11 24       	eor	r1, r1
     3b2:	86 0f       	add	r24, r22
     3b4:	97 1f       	adc	r25, r23
     3b6:	90 93 81 01 	sts	0x0181, r25
     3ba:	80 93 80 01 	sts	0x0180, r24
    lcdCacheIdx = (x-1) + (y-1)*84;
}
     3be:	08 95       	ret

000003c0 <lcd_send>:
	lcd_send(0x40 |(addr / LCD_X_RES), LCD_CMD);
}

/* Sends data to display controller */
void lcd_send(unsigned char data, LcdCmdData cd)
{
     3c0:	98 2f       	mov	r25, r24
	// Data/DC are outputs for the lcd (all low)
	LCD_DDR |= LCD_DATA_PIN | LCD_DC_PIN;
     3c2:	87 b3       	in	r24, 0x17	; 23
     3c4:	81 62       	ori	r24, 0x21	; 33
     3c6:	87 bb       	out	0x17, r24	; 23
	
    // Enable display controller (active low)
    LCD_PORT &= ~LCD_CE_PIN;
     3c8:	c4 98       	cbi	0x18, 4	; 24

    // Either command or data
    if(cd == LCD_DATA) {
     3ca:	61 30       	cpi	r22, 0x01	; 1
     3cc:	11 f4       	brne	.+4      	; 0x3d2 <lcd_send+0x12>
        LCD_PORT |= LCD_DC_PIN;
     3ce:	c0 9a       	sbi	0x18, 0	; 24
     3d0:	01 c0       	rjmp	.+2      	; 0x3d4 <lcd_send+0x14>
    } else {
        LCD_PORT &= ~LCD_DC_PIN;
     3d2:	c0 98       	cbi	0x18, 0	; 24
     3d4:	27 e0       	ldi	r18, 0x07	; 7
     3d6:	30 e0       	ldi	r19, 0x00	; 0
    }
	
	for(unsigned char i=0;i<8;i++) {
	
		// Set the DATA pin value
		if((data>>(7-i)) & 0x01) {
     3d8:	49 2f       	mov	r20, r25
     3da:	50 e0       	ldi	r21, 0x00	; 0
     3dc:	ca 01       	movw	r24, r20
     3de:	02 2e       	mov	r0, r18
     3e0:	02 c0       	rjmp	.+4      	; 0x3e6 <lcd_send+0x26>
     3e2:	95 95       	asr	r25
     3e4:	87 95       	ror	r24
     3e6:	0a 94       	dec	r0
     3e8:	e2 f7       	brpl	.-8      	; 0x3e2 <lcd_send+0x22>
     3ea:	80 ff       	sbrs	r24, 0
     3ec:	02 c0       	rjmp	.+4      	; 0x3f2 <lcd_send+0x32>
			LCD_PORT |= LCD_DATA_PIN;
     3ee:	c5 9a       	sbi	0x18, 5	; 24
     3f0:	01 c0       	rjmp	.+2      	; 0x3f4 <lcd_send+0x34>
		} else {
			LCD_PORT &= ~LCD_DATA_PIN;
     3f2:	c5 98       	cbi	0x18, 5	; 24
		}
		
		// Toggle the clock
		LCD_PORT |= LCD_CLK_PIN;
     3f4:	c7 9a       	sbi	0x18, 7	; 24
		LCD_PORT &= ~LCD_CLK_PIN;
     3f6:	c7 98       	cbi	0x18, 7	; 24
     3f8:	21 50       	subi	r18, 0x01	; 1
     3fa:	30 40       	sbci	r19, 0x00	; 0
        LCD_PORT |= LCD_DC_PIN;
    } else {
        LCD_PORT &= ~LCD_DC_PIN;
    }
	
	for(unsigned char i=0;i<8;i++) {
     3fc:	8f ef       	ldi	r24, 0xFF	; 255
     3fe:	2f 3f       	cpi	r18, 0xFF	; 255
     400:	38 07       	cpc	r19, r24
     402:	61 f7       	brne	.-40     	; 0x3dc <lcd_send+0x1c>
		LCD_PORT |= LCD_CLK_PIN;
		LCD_PORT &= ~LCD_CLK_PIN;
	}

	// Disable display controller
    LCD_PORT |= LCD_CE_PIN;
     404:	c4 9a       	sbi	0x18, 4	; 24
	
	// Data/DC can be used as button inputs when not sending to LCD (/w pullups)
	LCD_DDR &= ~(LCD_DATA_PIN | LCD_DC_PIN);
     406:	87 b3       	in	r24, 0x17	; 23
     408:	8e 7d       	andi	r24, 0xDE	; 222
     40a:	87 bb       	out	0x17, r24	; 23
	LCD_PORT |= LCD_DATA_PIN | LCD_DC_PIN;
     40c:	88 b3       	in	r24, 0x18	; 24
     40e:	81 62       	ori	r24, 0x21	; 33
     410:	88 bb       	out	0x18, r24	; 24
}
     412:	08 95       	ret

00000414 <lcd_base_addr>:
        lcd_chr(*str++);
    }
}

// Set the base address of the lcd
void lcd_base_addr(unsigned int addr) {
     414:	0f 93       	push	r16
     416:	1f 93       	push	r17
     418:	8c 01       	movw	r16, r24
	lcd_send(0x80 |(addr % LCD_X_RES), LCD_CMD);
     41a:	64 e5       	ldi	r22, 0x54	; 84
     41c:	70 e0       	ldi	r23, 0x00	; 0
     41e:	0e 94 f2 0c 	call	0x19e4	; 0x19e4 <__udivmodhi4>
     422:	60 e0       	ldi	r22, 0x00	; 0
     424:	80 68       	ori	r24, 0x80	; 128
     426:	0e 94 e0 01 	call	0x3c0	; 0x3c0 <lcd_send>
	lcd_send(0x40 |(addr / LCD_X_RES), LCD_CMD);
     42a:	c8 01       	movw	r24, r16
     42c:	64 e5       	ldi	r22, 0x54	; 84
     42e:	70 e0       	ldi	r23, 0x00	; 0
     430:	0e 94 f2 0c 	call	0x19e4	; 0x19e4 <__udivmodhi4>
     434:	86 2f       	mov	r24, r22
     436:	60 e0       	ldi	r22, 0x00	; 0
     438:	80 64       	ori	r24, 0x40	; 64
     43a:	0e 94 e0 01 	call	0x3c0	; 0x3c0 <lcd_send>
}
     43e:	1f 91       	pop	r17
     440:	0f 91       	pop	r16
     442:	08 95       	ret

00000444 <lcd_chr>:
    lcdCacheIdx = (x-1) + (y-1)*84;
}

/* Displays a character at current cursor location */
void lcd_chr(char chr)
{
     444:	0f 93       	push	r16
     446:	1f 93       	push	r17
     448:	cf 93       	push	r28
     44a:	df 93       	push	r29
     44c:	08 2f       	mov	r16, r24
	lcd_base_addr(lcdCacheIdx);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -