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

📄 dtmf2.lss

📁 avr dtmf decode.base on the mega2321
💻 LSS
📖 第 1 页 / 共 3 页
字号:

dtmf2.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0000060a  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000000  00800060  0000060a  0000069e  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000001a  00800060  00800060  0000069e  2**0
                  ALLOC
  3 .noinit       00000000  0080007a  0080007a  0000069e  2**0
                  CONTENTS
  4 .eeprom       00000000  00810000  00810000  0000069e  2**0
                  CONTENTS
  5 .debug_aranges 00000014  00000000  00000000  0000069e  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_pubnames 0000013c  00000000  00000000  000006b2  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_info   00000453  00000000  00000000  000007ee  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 000001ab  00000000  00000000  00000c41  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_line   00000593  00000000  00000000  00000dec  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_str    00000187  00000000  00000000  0000137f  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 0000000c  0000060a  0000060a  00001506  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
   0:	23 c0       	rjmp	.+70     	; 0x48
   2:	3b c0       	rjmp	.+118    	; 0x7a
   4:	cc c2       	rjmp	.+1432   	; 0x59e
   6:	39 c0       	rjmp	.+114    	; 0x7a
   8:	38 c0       	rjmp	.+112    	; 0x7a
   a:	37 c0       	rjmp	.+110    	; 0x7a
   c:	de c1       	rjmp	.+956    	; 0x3ca
   e:	35 c0       	rjmp	.+106    	; 0x7a
  10:	34 c0       	rjmp	.+104    	; 0x7a
  12:	33 c0       	rjmp	.+102    	; 0x7a
  14:	32 c0       	rjmp	.+100    	; 0x7a
  16:	31 c0       	rjmp	.+98     	; 0x7a
  18:	30 c0       	rjmp	.+96     	; 0x7a
  1a:	2f c0       	rjmp	.+94     	; 0x7a
  1c:	2e c0       	rjmp	.+92     	; 0x7a
  1e:	2d c0       	rjmp	.+90     	; 0x7a
  20:	2c c0       	rjmp	.+88     	; 0x7a
  22:	2b c0       	rjmp	.+86     	; 0x7a
  24:	2a c0       	rjmp	.+84     	; 0x7a

00000026 <__ctors_end>:
  26:	44 54       	subi	r20, 0x44	; 68
  28:	4d 46       	sbci	r20, 0x6D	; 109
  2a:	20 44       	sbci	r18, 0x40	; 64
  2c:	65 63       	ori	r22, 0x35	; 53
  2e:	6f 64       	ori	r22, 0x4F	; 79
  30:	65 72       	andi	r22, 0x25	; 37
  32:	20 62       	ori	r18, 0x20	; 32
  34:	79 20       	and	r7, r9
  36:	77 77       	andi	r23, 0x77	; 119
  38:	77 2e       	mov	r7, r23
  3a:	69 6e       	ori	r22, 0xE9	; 233
  3c:	66 69       	ori	r22, 0x96	; 150
  3e:	64 69       	ori	r22, 0x94	; 148
  40:	67 6d       	ori	r22, 0xD7	; 215
  42:	2e 6e       	ori	r18, 0xEE	; 238
  44:	65 74       	andi	r22, 0x45	; 69
	...

00000048 <__init>:
  48:	11 24       	eor	r1, r1
  4a:	1f be       	out	0x3f, r1	; 63
  4c:	cf ed       	ldi	r28, 0xDF	; 223
  4e:	cd bf       	out	0x3d, r28	; 61

00000050 <__do_copy_data>:
  50:	10 e0       	ldi	r17, 0x00	; 0
  52:	a0 e6       	ldi	r26, 0x60	; 96
  54:	b0 e0       	ldi	r27, 0x00	; 0
  56:	ea e0       	ldi	r30, 0x0A	; 10
  58:	f6 e0       	ldi	r31, 0x06	; 6
  5a:	03 c0       	rjmp	.+6      	; 0x62

0000005c <.do_copy_data_loop>:
  5c:	c8 95       	lpm
  5e:	31 96       	adiw	r30, 0x01	; 1
  60:	0d 92       	st	X+, r0

00000062 <.do_copy_data_start>:
  62:	a0 36       	cpi	r26, 0x60	; 96
  64:	b1 07       	cpc	r27, r17
  66:	d1 f7       	brne	.-12     	; 0x5c

00000068 <__do_clear_bss>:
  68:	10 e0       	ldi	r17, 0x00	; 0
  6a:	a0 e6       	ldi	r26, 0x60	; 96
  6c:	b0 e0       	ldi	r27, 0x00	; 0
  6e:	01 c0       	rjmp	.+2      	; 0x72

00000070 <.do_clear_bss_loop>:
  70:	1d 92       	st	X+, r1

00000072 <.do_clear_bss_start>:
  72:	aa 37       	cpi	r26, 0x7A	; 122
  74:	b1 07       	cpc	r27, r17
  76:	e1 f7       	brne	.-8      	; 0x70
  78:	9d c0       	rjmp	.+314    	; 0x1b4

0000007a <__bad_interrupt>:
  7a:	c2 cf       	rjmp	.-124    	; 0x0

0000007c <eread>:
 sei(); 
} 
  
unsigned char eread(char address)		//Reads char from EEPROM address 
{ 
  7c:	98 2f       	mov	r25, r24
 EEARL = address>>1; 
  7e:	86 95       	lsr	r24
  80:	8e bb       	out	0x1e, r24	; 30
 EECR|= _BV(EERE);
  82:	e0 9a       	sbi	0x1c, 0	; 28
 if (address&1) 
  84:	90 ff       	sbrs	r25, 0
  86:	05 c0       	rjmp	.+10     	; 0x92
	return (EEDR & 0x0F);				//Read LSN on odd address
  88:	8d b3       	in	r24, 0x1d	; 29
  8a:	99 27       	eor	r25, r25
  8c:	8f 70       	andi	r24, 0x0F	; 15
  8e:	90 70       	andi	r25, 0x00	; 0
  90:	08 95       	ret
 else 
	return (EEDR >> 4);				//Read MSN on even address
  92:	8d b3       	in	r24, 0x1d	; 29
  94:	82 95       	swap	r24
  96:	8f 70       	andi	r24, 0x0F	; 15
  98:	99 27       	eor	r25, r25
} 
  9a:	08 95       	ret
  9c:	08 95       	ret

0000009e <lcdwrt>:


void store(unsigned char edata)		//Compresses and appends digit to the end of eeprom
{
 unsigned char old;
 if (eepos&1) {							//test if Marker is in MSN or LSN
 	old = eread(eepos-1);				//read byte that will be overwritten
 	old = old<<4;
 	old|= edata;						//place new in LSN
 	ewrite(eepos,old);					//write new byte
 	eepos++;							//increment eeprom address
 	old = eread(eepos+1);				//read byte that will be overwritten
 	old|= 0xF0;							//put Marker in MSN, keep data in LSN
 	ewrite(eepos,old);					//write new marker byte
 }
 else {
 	edata = (edata << 4);				//Move data in LSN to MSN
 	edata|= 0x0F;						//put Marker in LSN
 	ewrite(eepos,edata);				//write new marker and data byte
 	eepos++;
 }
}


void trnsfr(char line, char eol)		//Moves digits from eeprom to LCD line
{
 unsigned char hold,pop;
 if (line<10) {							//test if line is less than 10
 	lcdata(' ');						//write space on LCD
 	lcdata((line|0x30));				//write 'ones' line number on LCD
 }
 else {									//if line greater than 9....
 	lcdata('1');						//write 1 on LCD
 	lcdata(((line-10)|0x30));			//write 'ones' line number on LCD
 }
 lcdata('-');							//write "-" after line number
 for (pop=1;pop<=13;pop++) {			//Read nibbles
 	hold = eread(pop+eref-eol-14);		//Get byte from eeprom
 	lcdata(fltr(hold));					//Send to LCD
 }
}

void updtlcd(unsigned char ldata)		//Handles writing new dtmf digit to LCD
{
 if (redraw==1 && lcdpos<13) {			// Redraw LCD if up/dn stuff is on it
 	redraw = 0;
 	esrl = 0;
 	lcdln = 19;							//reset line numbner
 	lcdcmd(0x01);						//Clear LCD, move home//clear lcd
 	trnsfr(18, 0);						//draw line 18
 	lcdcmd(0xC0);						//set cursor at begining of bottom line
 	line19();							//re-draw line 19
 }
 if (lcdpos>=13) {
 	lcdcmd(0x01);						//Clear LCD, move home//clear lcd
 	lcdata('1');						//write "18-"
 	lcdata('8');
 	lcdata('-');
 	for (lcdpos=0;lcdpos<=13;lcdpos++) {	//Move bottom line to top
 		lcdata(lcdtemp[lcdpos]);
 	}
 	lcdcmd(0xC0);						//set cursor at begining of bottom line
 	lcdata('1');						//write "19-"
 	lcdata('9');
 	lcdata('-');
 	lcdpos = 0;							//Reset line position
 	
 	eref = eepos;						//set end of line 18 at end of eeprom
 	esrl = 0;
 	lcdln = 19;							//reset line numbner
 }
 lcdata(ldata);							//Write digit to LCD
 lcdtemp[lcdpos] = ldata;				//Store digit in ram
 lcdpos++;
}

void line19(void)						//restores Ln 19 before the scroll
{
 lcdata('1');							//Write "19-
 lcdata('9');
 lcdata('-');
 for (a=0;a<lcdpos;a++) {				//loop until all digits have been restored
 	lcdata(lcdtemp[a]);					//restore LCD Line 19 from ram
 }
}

unsigned char fltr(char fdata)		//Filters digits for 10,#, and *
{
 if(fdata==0x0F) 
	return (0x20);						//correct for blank cell
 if(fdata==0x0A) 
	return (0x30);						//correct for Zero from decoder
 if(fdata==0x0B) 
	return (0x2A);						//correct for * from decoder
 if(fdata==0x0C) 
	return (0x23);						//correct for # from decoder
 else 
	return (fdata|0x30);
}

void lcdwrt(char dt, char data)		// Writes Byte to LCD dt=0 Control dt=1 data
{
  9e:	cf 93       	push	r28
  a0:	df 93       	push	r29
  a2:	cd b7       	in	r28, 0x3d	; 61
  a4:	de b7       	in	r29, 0x3e	; 62
  a6:	22 97       	sbiw	r28, 0x02	; 2
  a8:	0f b6       	in	r0, 0x3f	; 63
  aa:	f8 94       	cli
  ac:	de bf       	out	0x3e, r29	; 62
  ae:	0f be       	out	0x3f, r0	; 63
  b0:	cd bf       	out	0x3d, r28	; 61
 volatile unsigned int x;
 DDRB = 0xFF;							//Set PORTB as Output
  b2:	9f ef       	ldi	r25, 0xFF	; 255
  b4:	97 bb       	out	0x17, r25	; 23
 if (dt == 1) 
  b6:	81 30       	cpi	r24, 0x01	; 1
  b8:	11 f4       	brne	.+4      	; 0xbe
	PORTD|= _BV(PD5);  					//Data PD5=1 or Control PD5=0
  ba:	95 9a       	sbi	0x12, 5	; 18
  bc:	01 c0       	rjmp	.+2      	; 0xc0
 else 
	PORTD&= ~_BV(PD5);
  be:	95 98       	cbi	0x12, 5	; 18
 PORTB = data;							//Send data byte (PORTB)
  c0:	68 bb       	out	0x18, r22	; 24
 for (x=0;x < 50;x++);					//Delay 250uS
  c2:	19 82       	std	Y+1, r1	; 0x01
  c4:	1a 82       	std	Y+2, r1	; 0x02
  c6:	89 81       	ldd	r24, Y+1	; 0x01
  c8:	9a 81       	ldd	r25, Y+2	; 0x02
  ca:	c2 97       	sbiw	r24, 0x32	; 50
  cc:	30 f4       	brcc	.+12     	; 0xda
  ce:	89 81       	ldd	r24, Y+1	; 0x01
  d0:	9a 81       	ldd	r25, Y+2	; 0x02
  d2:	01 96       	adiw	r24, 0x01	; 1
  d4:	89 83       	std	Y+1, r24	; 0x01
  d6:	9a 83       	std	Y+2, r25	; 0x02
  d8:	f6 cf       	rjmp	.-20     	; 0xc6
	PORTD|= _BV(PD6);  					//Set Strobe 
  da:	96 9a       	sbi	0x12, 6	; 18
 for (x=0;x < 50;x++);					//Delay 250uS
  dc:	19 82       	std	Y+1, r1	; 0x01
  de:	1a 82       	std	Y+2, r1	; 0x02
  e0:	89 81       	ldd	r24, Y+1	; 0x01
  e2:	9a 81       	ldd	r25, Y+2	; 0x02
  e4:	c2 97       	sbiw	r24, 0x32	; 50
  e6:	30 f4       	brcc	.+12     	; 0xf4
  e8:	89 81       	ldd	r24, Y+1	; 0x01
  ea:	9a 81       	ldd	r25, Y+2	; 0x02
  ec:	01 96       	adiw	r24, 0x01	; 1
  ee:	89 83       	std	Y+1, r24	; 0x01
  f0:	9a 83       	std	Y+2, r25	; 0x02

⌨️ 快捷键说明

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