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

📄 dtmf2.lss

📁 来电显示例程
💻 LSS
📖 第 1 页 / 共 3 页
字号:
 else {
 	uptimeH=0;				 		//reset up release timer
 1de:	10 92 76 00 	sts	0x0076, r1
 	if(uptimeL>0)uptimeL--;				//increment up depressed timer
 1e2:	80 91 74 00 	lds	r24, 0x0074
 1e6:	88 23       	and	r24, r24
 1e8:	21 f0       	breq	.+8      	; 0x1f2
 1ea:	81 50       	subi	r24, 0x01	; 1
 1ec:	80 93 74 00 	sts	0x0074, r24
 1f0:	34 c0       	rjmp	.+104    	; 0x25a
 	else {
 		if(up==0 && lcdln<19) {			//scroll up if not at end (Line 19)
 1f2:	c0 91 61 00 	lds	r28, 0x0061
 1f6:	cc 23       	and	r28, r28
 1f8:	81 f5       	brne	.+96     	; 0x25a
 1fa:	80 91 62 00 	lds	r24, 0x0062
 1fe:	83 31       	cpi	r24, 0x13	; 19
 200:	60 f5       	brcc	.+88     	; 0x25a
 	 		redraw = 1;				//set flag to redraw incomming screen
 202:	11 e0       	ldi	r17, 0x01	; 1
 204:	10 93 73 00 	sts	0x0073, r17
 	 		lcdln++;					//increment line number
 208:	81 0f       	add	r24, r17
 20a:	80 93 62 00 	sts	0x0062, r24
 			lcdcmd (0x01);				//Clear LCD, move home//clear lcd
 20e:	61 2f       	mov	r22, r17
 210:	8c 2f       	mov	r24, r28
 212:	b3 d1       	rcall	.+870    	; 0x57a
 			trnsfr (lcdln-1, esrl-13);			//draw top line
 214:	90 91 60 00 	lds	r25, 0x0060
 218:	9d 50       	subi	r25, 0x0D	; 13
 21a:	80 91 62 00 	lds	r24, 0x0062
 21e:	81 50       	subi	r24, 0x01	; 1
 220:	69 2f       	mov	r22, r25
 222:	e9 d0       	rcall	.+466    	; 0x3f6
 			lcdcmd (0xC0);						//set cursor at bottom line
 224:	60 ec       	ldi	r22, 0xC0	; 192
 226:	8c 2f       	mov	r24, r28
 228:	a8 d1       	rcall	.+848    	; 0x57a
 			if(lcdln!=19) trnsfr (lcdln, esrl-26);	//draw bottom line
 22a:	90 91 62 00 	lds	r25, 0x0062
 22e:	93 31       	cpi	r25, 0x13	; 19
 230:	31 f0       	breq	.+12     	; 0x23e
 232:	80 91 60 00 	lds	r24, 0x0060
 236:	8a 51       	subi	r24, 0x1A	; 26
 238:	68 2f       	mov	r22, r24
 23a:	89 2f       	mov	r24, r25
 23c:	dc d0       	rcall	.+440    	; 0x3f6
 			esrl=esrl-13;						//adjust eeprom scroll offset
 23e:	80 91 60 00 	lds	r24, 0x0060
 242:	8d 50       	subi	r24, 0x0D	; 13
 244:	80 93 60 00 	sts	0x0060, r24
 			if(lcdln==19) {
 248:	80 91 62 00 	lds	r24, 0x0062
 24c:	83 31       	cpi	r24, 0x13	; 19
 24e:	19 f4       	brne	.+6      	; 0x256
 				line19();				//re-draw line 19
 250:	5a d1       	rcall	.+692    	; 0x506
 				redraw = 0;
 252:	c0 93 73 00 	sts	0x0073, r28
 			}
 			up = 1;
 256:	10 93 61 00 	sts	0x0061, r17
 		}
 	}
 }
 if((PIND >> PD2) & 1) {					//test if down button is released
 25a:	80 b3       	in	r24, 0x10	; 16
 25c:	86 95       	lsr	r24
 25e:	86 95       	lsr	r24
 260:	80 ff       	sbrs	r24, 0
 262:	0e c0       	rjmp	.+28     	; 0x280
 	dntimeL=22;						//reset down depressed timer
 264:	86 e1       	ldi	r24, 0x16	; 22
 266:	80 93 75 00 	sts	0x0075, r24
 	if(dntimeH<22)dntimeH++;				//increment down released timer
 26a:	80 91 77 00 	lds	r24, 0x0077
 26e:	86 31       	cpi	r24, 0x16	; 22
 270:	20 f4       	brcc	.+8      	; 0x27a
 272:	8f 5f       	subi	r24, 0xFF	; 255
 274:	80 93 77 00 	sts	0x0077, r24
 278:	35 c0       	rjmp	.+106    	; 0x2e4
 	else dn=0;						//indicate down filtered release
 27a:	10 92 63 00 	sts	0x0063, r1
 27e:	32 c0       	rjmp	.+100    	; 0x2e4
 }
 else {
 	dntimeH=0;						//reset down release timer
 280:	10 92 77 00 	sts	0x0077, r1
 	if(dntimeL>0)dntimeL--;				//increment down depressed timer
 284:	80 91 75 00 	lds	r24, 0x0075
 288:	88 23       	and	r24, r24
 28a:	21 f0       	breq	.+8      	; 0x294
 28c:	81 50       	subi	r24, 0x01	; 1
 28e:	80 93 75 00 	sts	0x0075, r24
 292:	28 c0       	rjmp	.+80     	; 0x2e4
 	else {							
 		if(dn==0 && lcdln>2) {			//scroll down if not at end (Line 1)
 294:	c0 91 63 00 	lds	r28, 0x0063
 298:	cc 23       	and	r28, r28
 29a:	21 f5       	brne	.+72     	; 0x2e4
 29c:	80 91 62 00 	lds	r24, 0x0062
 2a0:	83 30       	cpi	r24, 0x03	; 3
 2a2:	00 f1       	brcs	.+64     	; 0x2e4
 			redraw = 1;				//set flag to redraw incomming screen
 2a4:	11 e0       	ldi	r17, 0x01	; 1
 2a6:	10 93 73 00 	sts	0x0073, r17
 			lcdln--;
 2aa:	81 50       	subi	r24, 0x01	; 1
 2ac:	80 93 62 00 	sts	0x0062, r24
 			lcdcmd (0x01);				//Clear LCD, move home//clear lcd
 2b0:	61 2f       	mov	r22, r17
 2b2:	8c 2f       	mov	r24, r28
 2b4:	62 d1       	rcall	.+708    	; 0x57a
 			trnsfr (lcdln-1, esrl+13);	//draw top line
 2b6:	90 91 60 00 	lds	r25, 0x0060
 2ba:	93 5f       	subi	r25, 0xF3	; 243
 2bc:	80 91 62 00 	lds	r24, 0x0062
 2c0:	81 50       	subi	r24, 0x01	; 1
 2c2:	69 2f       	mov	r22, r25
 2c4:	98 d0       	rcall	.+304    	; 0x3f6
 			lcdcmd (0xC0);				//set cursor at of bottom line
 2c6:	60 ec       	ldi	r22, 0xC0	; 192
 2c8:	8c 2f       	mov	r24, r28
 2ca:	57 d1       	rcall	.+686    	; 0x57a
 			trnsfr (lcdln, esrl);		//draw bottom line
 2cc:	60 91 60 00 	lds	r22, 0x0060
 2d0:	80 91 62 00 	lds	r24, 0x0062
 2d4:	90 d0       	rcall	.+288    	; 0x3f6
 			esrl=esrl+13;				//adjust eeprom scroll offset
 2d6:	80 91 60 00 	lds	r24, 0x0060
 2da:	83 5f       	subi	r24, 0xF3	; 243
 2dc:	80 93 60 00 	sts	0x0060, r24
 			dn = 1;
 2e0:	10 93 63 00 	sts	0x0063, r17
		} 	
 	}
 }
}
 2e4:	ff 91       	pop	r31
 2e6:	ef 91       	pop	r30
 2e8:	cf 91       	pop	r28
 2ea:	bf 91       	pop	r27
 2ec:	af 91       	pop	r26
 2ee:	9f 91       	pop	r25
 2f0:	8f 91       	pop	r24
 2f2:	7f 91       	pop	r23
 2f4:	6f 91       	pop	r22
 2f6:	5f 91       	pop	r21
 2f8:	4f 91       	pop	r20
 2fa:	3f 91       	pop	r19
 2fc:	2f 91       	pop	r18
 2fe:	1f 91       	pop	r17
 300:	0f 90       	pop	r0
 302:	0f be       	out	0x3f, r0	; 63
 304:	0f 90       	pop	r0
 306:	1f 90       	pop	r1
 308:	18 95       	reti

0000030a <UART_PrintfProgStr>:

void UART_PrintfProgStr(unsigned char* pBuf) 
{ 
 30a:	0f 93       	push	r16
 30c:	1f 93       	push	r17
 30e:	cf 93       	push	r28
 310:	df 93       	push	r29
 312:	d9 2f       	mov	r29, r25
 314:	c8 2f       	mov	r28, r24
 unsigned char pos;
 pos = 0;
 316:	00 e0       	ldi	r16, 0x00	; 0
 lcdcmd (0x80);						//LCD Start Position on 1st Row
 318:	60 e8       	ldi	r22, 0x80	; 128
 31a:	80 2f       	mov	r24, r16
 31c:	2e d1       	rcall	.+604    	; 0x57a
 while (PRG_RDB(pBuf)!=0) { 				//Go through string until end(null)
 31e:	fd 2f       	mov	r31, r29
 320:	ec 2f       	mov	r30, r28
 322:	c8 95       	lpm
 324:	80 2d       	mov	r24, r0
 326:	88 23       	and	r24, r24
 328:	b9 f0       	breq	.+46     	; 0x358
	UDR = PRG_RDB(pBuf);				//Send string byte out UART
 32a:	fd 2f       	mov	r31, r29
 32c:	ec 2f       	mov	r30, r28
 32e:	c8 95       	lpm
 330:	10 2d       	mov	r17, r0
 332:	1c b9       	out	0x0c, r17	; 12
    	if (pos == 0x10) lcdcmd (0xC0);		//If end of 1st goto 2nd Row
 334:	00 31       	cpi	r16, 0x10	; 16
 336:	19 f4       	brne	.+6      	; 0x33e
 338:	60 ec       	ldi	r22, 0xC0	; 192
 33a:	80 e0       	ldi	r24, 0x00	; 0
 33c:	1e d1       	rcall	.+572    	; 0x57a
	lcdata (PRG_RDB(pBuf));				//Send string byte to LCD
 33e:	61 2f       	mov	r22, r17
 340:	81 e0       	ldi	r24, 0x01	; 1
 342:	1b d1       	rcall	.+566    	; 0x57a
  	pBuf++;							//Point to next byte in string
 344:	21 96       	adiw	r28, 0x01	; 1
  	pos++;							//point to next LCD position
 346:	0f 5f       	subi	r16, 0xFF	; 255
    	while ( !(USR & (1<<UDRE)) ); 		//Wait for UART to finish TXing
 348:	5d 9b       	sbis	0x0b, 5	; 11
 34a:	fe cf       	rjmp	.-4      	; 0x348
 34c:	fd 2f       	mov	r31, r29
 34e:	ec 2f       	mov	r30, r28
 350:	c8 95       	lpm
 352:	80 2d       	mov	r24, r0
 354:	88 23       	and	r24, r24
 356:	49 f7       	brne	.-46     	; 0x32a
 }     	
} 
 358:	df 91       	pop	r29
 35a:	cf 91       	pop	r28
 35c:	1f 91       	pop	r17
 35e:	0f 91       	pop	r16
 360:	08 95       	ret

00000362 <TXbyte>:

void TXbyte ( char data ) 			//Transmits 1 byte out the UART
{ 
 while ( !(USR & (1<<UDRE)) );   			//wait for empty transmit buffer 
 362:	5d 9b       	sbis	0x0b, 5	; 11
 364:	fe cf       	rjmp	.-4      	; 0x362
 UDR = data; 	 	   					//start transmittion 
 366:	8c b9       	out	0x0c, r24	; 12
} 
 368:	08 95       	ret

0000036a <ewrite>:


void ewrite (char address, char data)	//Writes char to EEPROM address 
{ 
 36a:	98 2f       	mov	r25, r24
 cli(); 
 36c:	f8 94       	cli
 while ((EECR >> EEWE) & 1); 
 36e:	8c b3       	in	r24, 0x1c	; 28
 370:	86 95       	lsr	r24
 372:	80 fd       	sbrc	r24, 0
 374:	fc cf       	rjmp	.-8      	; 0x36e
 EEARL = address>>1; 
 376:	96 95       	lsr	r25
 378:	9e bb       	out	0x1e, r25	; 30
 EEDR = data; 
 37a:	6d bb       	out	0x1d, r22	; 29
 sbi (EECR,2); 
 37c:	e2 9a       	sbi	0x1c, 2	; 28
 sbi (EECR,1); 
 37e:	e1 9a       	sbi	0x1c, 1	; 28
 sei(); 
 380:	78 94       	sei
} 
 382:	08 95       	ret

00000384 <eread>:
  
unsigned char eread (char address)		//Reads char from EEPROM address 
{ 
 384:	98 2f       	mov	r25, r24
 EEARL = address>>1; 
 386:	86 95       	lsr	r24
 388:	8e bb       	out	0x1e, r24	; 30
 sbi (EECR,0); 
 38a:	e0 9a       	sbi	0x1c, 0	; 28
 if(address&1) return (EEDR & 0x0F);		//Read LSN on odd address
 38c:	90 ff       	sbrs	r25, 0
 38e:	05 c0       	rjmp	.+10     	; 0x39a
 390:	8d b3       	in	r24, 0x1d	; 29
 392:	99 27       	eor	r25, r25
 394:	8f 70       	andi	r24, 0x0F	; 15
 396:	90 70       	andi	r25, 0x00	; 0
 else return (EEDR >> 4);				//Read MSN on even address
} 
 398:	08 95       	ret
 39a:	8d b3       	in	r24, 0x1d	; 29
 39c:	82 95       	swap	r24
 39e:	8f 70       	andi	r24, 0x0F	; 15
 3a0:	99 27       	eor	r25, r25
 3a2:	08 95       	ret
 3a4:	08 95       	ret

000003a6 <store>:


void store(unsigned char edata)		//Compresses and appends digit to the end of eeprom
{
 3a6:	cf 93       	push	r28
 3a8:	c8 2f       	mov	r28, r24
 unsigned char old;
 if (eepos&1) {						//test if Marker is in MSN or LSN
 3aa:	80 91 64 00 	lds	r24, 0x0064
 3ae:	80 ff       	sbrs	r24, 0
 3b0:	16 c0       	rjmp	.+44     	; 0x3de
 	old = eread(eepos-1);				//read byte that will be overwritten
 3b2:	81 50       	subi	r24, 0x01	; 1
 3b4:	e7 df       	rcall	.-50     	; 0x384
 3b6:	68 2f       	mov	r22, r24
 	old = old<<4;
 3b8:	62 95       	swap	r22
 3ba:	60 7f       	andi	r22, 0xF0	; 240
 	old|= edata;						//place new in LSN
 3bc:	6c 2b       	or	r22, r28
 	ewrite(eepos,old);					//write new byte
 3be:	80 91 64 00 	lds	r24, 0x0064
 3c2:	d3 df       	rcall	.-90     	; 0x36a
 	eepos++;							//increment eeprom address
 3c4:	80 91 64 00 	lds	r24, 0x0064
 3c8:	8f 5f       	subi	r24, 0xFF	; 255
 3ca:	80 93 64 00 	sts	0x0064, r24
 	old = eread(eepos+1);					//read byte that will be overwritten
 3ce:	8f 5f       	subi	r24, 0xFF	; 255
 3d0:	d9 df       	rcall	.-78     	; 0x384
 3d2:	68 2f       	mov	r22, r24
 	old|= 0xF0;						//put Marker in MSN, keep data in LSN
 3d4:	60 6f       	ori	r22, 0xF0	; 240
 	ewrite(eepos,old);					//write new marker byte
 3d6:	80 91 64 00 	lds	r24, 0x0064
 3da:	c7 df       	rcall	.-114    	; 0x36a
 3dc:	0a c0       	rjmp	.+20     	; 0x3f2
 }
 else {
 	edata = (edata << 4);				//Move data in LSN to MSN
 3de:	c2 95       	swap	r28
 3e0:	c0 7f       	andi	r28, 0xF0	; 240
 	edata|= 0x0F;						//put Marker in LSN
 3e2:	cf 60       	ori	r28, 0x0F	; 15
 	ewrite(eepos,edata);				//write new marker and data byte
 3e4:	6c 2f       	mov	r22, r28
 3e6:	c1 df       	rcall	.-126    	; 0x36a
 	eepos++;
 3e8:	80 91 64 00 	lds	r24, 0x0064
 3ec:	8f 5f       	subi	r24, 0xFF	; 255
 3ee:	80 93 64 00 	sts	0x0064, r24
 }
}
 3f2:	cf 91       	pop	r28
 3f4:	08 95       	ret

000003f6 <trnsfr>:

⌨️ 快捷键说明

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