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

📄 ds1302.lss

📁 DS1302资料lcd.rar
💻 LSS
📖 第 1 页 / 共 4 页
字号:

ds1302.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000005c6  00000000  00000000  00000074  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         0000001e  00800060  000005c6  0000063a  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .debug_aranges 00000020  00000000  00000000  00000658  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_pubnames 00000170  00000000  00000000  00000678  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_info   00000f75  00000000  00000000  000007e8  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_abbrev 000002da  00000000  00000000  0000175d  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_line   00000a13  00000000  00000000  00001a37  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_frame  00000150  00000000  00000000  0000244c  2**2
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_str    00000240  00000000  00000000  0000259c  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_loc    0000042a  00000000  00000000  000027dc  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_ranges 00000348  00000000  00000000  00002c06  2**0
                  CONTENTS, READONLY, DEBUGGING

Disassembly of section .text:

00000000 <__vectors>:
   0:	0c 94 2a 00 	jmp	0x54	; 0x54 <__ctors_end>
   4:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
   8:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
   c:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  10:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  14:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  18:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  1c:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  20:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  24:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  28:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  2c:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  30:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  34:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  38:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  3c:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  40:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  44:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  48:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  4c:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>
  50:	0c 94 3f 00 	jmp	0x7e	; 0x7e <__bad_interrupt>

00000054 <__ctors_end>:
  54:	11 24       	eor	r1, r1
  56:	1f be       	out	0x3f, r1	; 63
  58:	cf e5       	ldi	r28, 0x5F	; 95
  5a:	d4 e0       	ldi	r29, 0x04	; 4
  5c:	de bf       	out	0x3e, r29	; 62
  5e:	cd bf       	out	0x3d, r28	; 61

00000060 <__do_copy_data>:
  60:	10 e0       	ldi	r17, 0x00	; 0
  62:	a0 e6       	ldi	r26, 0x60	; 96
  64:	b0 e0       	ldi	r27, 0x00	; 0
  66:	e6 ec       	ldi	r30, 0xC6	; 198
  68:	f5 e0       	ldi	r31, 0x05	; 5
  6a:	02 c0       	rjmp	.+4      	; 0x70 <.do_copy_data_start>

0000006c <.do_copy_data_loop>:
  6c:	05 90       	lpm	r0, Z+
  6e:	0d 92       	st	X+, r0

00000070 <.do_copy_data_start>:
  70:	ae 37       	cpi	r26, 0x7E	; 126
  72:	b1 07       	cpc	r27, r17
  74:	d9 f7       	brne	.-10     	; 0x6c <.do_copy_data_loop>
  76:	0e 94 9b 02 	call	0x536	; 0x536 <main>
  7a:	0c 94 e1 02 	jmp	0x5c2	; 0x5c2 <_exit>

0000007e <__bad_interrupt>:
  7e:	0c 94 00 00 	jmp	0	; 0x0 <__vectors>

00000082 <LCD1602_portini>:
参    数: 无
返回值  : 无
********************************************/
void LCD1602_portini(void)
{
	LCDa_CTRL_DDR |= _BV(LCDa_RS)|_BV(LCDa_RW)|_BV(LCDa_E);//配置控制管脚为输出
  82:	8a b3       	in	r24, 0x1a	; 26
  84:	80 67       	ori	r24, 0x70	; 112
  86:	8a bb       	out	0x1a, r24	; 26
	LCDa_DATA_DDR |= 0xFF;//配置数据管脚为输出
  88:	87 b3       	in	r24, 0x17	; 23
  8a:	8f ef       	ldi	r24, 0xFF	; 255
  8c:	87 bb       	out	0x17, r24	; 23
}
  8e:	08 95       	ret

00000090 <LCD1602_readbyte>:
返回值  : dByte--读回的数据或者指令
********************************************/
uchar LCD1602_readbyte(uchar DatCmd)
{
 	uchar dByte;
	if (DatCmd == iCmd)		 //指令操作
  90:	88 23       	and	r24, r24
  92:	11 f4       	brne	.+4      	; 0x98 <LCD1602_readbyte+0x8>
		LCDa_CLR_RS;
  94:	dc 98       	cbi	0x1b, 4	; 27
  96:	01 c0       	rjmp	.+2      	; 0x9a <LCD1602_readbyte+0xa>
	else
		LCDa_SET_RS;
  98:	dc 9a       	sbi	0x1b, 4	; 27
		
	LCDa_SET_RW;	   	  	 //读操作
  9a:	dd 9a       	sbi	0x1b, 5	; 27
	LCDa_SET_E;
  9c:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DATA_DDR=0x00;	 //数据总线定义为输入
  9e:	17 ba       	out	0x17, r1	; 23
	dByte=LCDa_DI;			 //读数据或者指令
  a0:	86 b3       	in	r24, 0x16	; 22
    milliseconds can be achieved.
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
  a2:	e8 ee       	ldi	r30, 0xE8	; 232
  a4:	f3 e0       	ldi	r31, 0x03	; 3
  a6:	31 97       	sbiw	r30, 0x01	; 1
  a8:	f1 f7       	brne	.-4      	; 0xa6 <LCD1602_readbyte+0x16>
_delay_us(500);
//	Delayms(1);				 //时序调整
	LCDa_CLR_E;	
  aa:	de 98       	cbi	0x1b, 6	; 27
	LCDa_DATA_DDR|=0xff;	 //数据总线还原为输出
  ac:	97 b3       	in	r25, 0x17	; 23
  ae:	9f ef       	ldi	r25, 0xFF	; 255
  b0:	97 bb       	out	0x17, r25	; 23
	return dByte;
}
  b2:	08 95       	ret

000000b4 <LCD1602_sendbyte>:
	  	  dByte--为写入1602的数据或者指令
返回值  : 无
********************************************/
void LCD1602_sendbyte(uchar DatCmd, uchar dByte)
{
	if (DatCmd == iCmd)		//指令操作
  b4:	88 23       	and	r24, r24
  b6:	11 f4       	brne	.+4      	; 0xbc <LCD1602_sendbyte+0x8>
		LCDa_CLR_RS;
  b8:	dc 98       	cbi	0x1b, 4	; 27
  ba:	01 c0       	rjmp	.+2      	; 0xbe <LCD1602_sendbyte+0xa>
	else
		LCDa_SET_RS;
  bc:	dc 9a       	sbi	0x1b, 4	; 27
		
	LCDa_CLR_RW;			//写操作
  be:	dd 98       	cbi	0x1b, 5	; 27
	LCDa_SET_E;
  c0:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DO = dByte;		//写入数据
  c2:	68 bb       	out	0x18, r22	; 24
  c4:	88 ee       	ldi	r24, 0xE8	; 232
  c6:	93 e0       	ldi	r25, 0x03	; 3
  c8:	01 97       	sbiw	r24, 0x01	; 1
  ca:	f1 f7       	brne	.-4      	; 0xc8 <LCD1602_sendbyte+0x14>
_delay_us(500);
//	Delayms(1);
	LCDa_CLR_E;	
  cc:	de 98       	cbi	0x1b, 6	; 27
}
  ce:	08 95       	ret

000000d0 <LCD1602_sendstr>:
功    能: 向1602液晶写入一个字符串
参    数: ptString--字符串指针
返回值  : 无
********************************************/
void LCD1602_sendstr(uchar *ptString)
{
  d0:	fc 01       	movw	r30, r24
  d2:	28 ee       	ldi	r18, 0xE8	; 232
  d4:	33 e0       	ldi	r19, 0x03	; 3
  d6:	09 c0       	rjmp	.+18     	; 0xea <LCD1602_sendstr+0x1a>
	while((*ptString)!='\0')		 //字符串未结束
	{
		LCD1602_sendbyte(iDat, *ptString++);
  d8:	31 96       	adiw	r30, 0x01	; 1
void LCD1602_sendbyte(uchar DatCmd, uchar dByte)
{
	if (DatCmd == iCmd)		//指令操作
		LCDa_CLR_RS;
	else
		LCDa_SET_RS;
  da:	dc 9a       	sbi	0x1b, 4	; 27
		
	LCDa_CLR_RW;			//写操作
  dc:	dd 98       	cbi	0x1b, 5	; 27
	LCDa_SET_E;
  de:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DO = dByte;		//写入数据
  e0:	88 bb       	out	0x18, r24	; 24
  e2:	c9 01       	movw	r24, r18
  e4:	01 97       	sbiw	r24, 0x01	; 1
  e6:	f1 f7       	brne	.-4      	; 0xe4 <LCD1602_sendstr+0x14>
_delay_us(500);
//	Delayms(1);
	LCDa_CLR_E;	
  e8:	de 98       	cbi	0x1b, 6	; 27
参    数: ptString--字符串指针
返回值  : 无
********************************************/
void LCD1602_sendstr(uchar *ptString)
{
	while((*ptString)!='\0')		 //字符串未结束
  ea:	80 81       	ld	r24, Z
  ec:	88 23       	and	r24, r24
  ee:	a1 f7       	brne	.-24     	; 0xd8 <LCD1602_sendstr+0x8>
	{
		LCD1602_sendbyte(iDat, *ptString++);
	}
}
  f0:	08 95       	ret

000000f2 <LCD1602_clear>:
返回值  : 无
********************************************/
void LCD1602_sendbyte(uchar DatCmd, uchar dByte)
{
	if (DatCmd == iCmd)		//指令操作
		LCDa_CLR_RS;
  f2:	dc 98       	cbi	0x1b, 4	; 27
	else
		LCDa_SET_RS;
		
	LCDa_CLR_RW;			//写操作
  f4:	dd 98       	cbi	0x1b, 5	; 27
	LCDa_SET_E;
  f6:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DO = dByte;		//写入数据
  f8:	81 e0       	ldi	r24, 0x01	; 1
  fa:	88 bb       	out	0x18, r24	; 24
  fc:	88 ee       	ldi	r24, 0xE8	; 232
  fe:	93 e0       	ldi	r25, 0x03	; 3
 100:	01 97       	sbiw	r24, 0x01	; 1
 102:	f1 f7       	brne	.-4      	; 0x100 <LCD1602_clear+0xe>
_delay_us(500);
//	Delayms(1);
	LCDa_CLR_E;	
 104:	de 98       	cbi	0x1b, 6	; 27
 106:	80 ed       	ldi	r24, 0xD0	; 208
 108:	97 e0       	ldi	r25, 0x07	; 7
 10a:	01 97       	sbiw	r24, 0x01	; 1
 10c:	f1 f7       	brne	.-4      	; 0x10a <LCD1602_clear+0x18>
void LCD1602_clear(void)
{
	LCD1602_sendbyte(iCmd,LCDa_CLS);
_delay_ms(1);
//	Delayms(2);// 清屏指令写入后,2ms 的延时是很必要的!!!
}
 10e:	08 95       	ret

00000110 <LCD1602_readBF>:
返回值  : busy--为1时忙,为0时可以接收指令
********************************************/
uchar LCD1602_readBF(void)
{	  
	uchar busy;
	busy=LCD1602_readbyte(iCmd);		//读回BF标志和地址
 110:	80 e0       	ldi	r24, 0x00	; 0
 112:	0e 94 48 00 	call	0x90	; 0x90 <LCD1602_readbyte>
	if(busy&0x80)						//忙
		busy=1;
	else	   							//不忙,可以写入
		busy=0;
	return busy;
}
 116:	88 1f       	adc	r24, r24
 118:	88 27       	eor	r24, r24
 11a:	88 1f       	adc	r24, r24
 11c:	08 95       	ret

0000011e <LCD1602_gotoXY>:
		case 2:
			LCD1602_sendbyte(iCmd, LCDa_L2 + Col); break;	//写入第2行的指定列	
		default:
			LCD1602_sendbyte(iCmd, LCDa_L1 + Col); break;	//写入第1行的指定列	
	}*/
	if(Row==1)
 11e:	81 30       	cpi	r24, 0x01	; 1
 120:	59 f4       	brne	.+22     	; 0x138 <LCD1602_gotoXY+0x1a>
		LCD1602_sendbyte(iCmd, LCDa_L1+Col);
 122:	60 58       	subi	r22, 0x80	; 128
返回值  : 无
********************************************/
void LCD1602_sendbyte(uchar DatCmd, uchar dByte)
{
	if (DatCmd == iCmd)		//指令操作
		LCDa_CLR_RS;
 124:	dc 98       	cbi	0x1b, 4	; 27
	else
		LCDa_SET_RS;
		
	LCDa_CLR_RW;			//写操作
 126:	dd 98       	cbi	0x1b, 5	; 27
	LCDa_SET_E;
 128:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DO = dByte;		//写入数据
 12a:	68 bb       	out	0x18, r22	; 24
 12c:	88 ee       	ldi	r24, 0xE8	; 232
 12e:	93 e0       	ldi	r25, 0x03	; 3
 130:	01 97       	sbiw	r24, 0x01	; 1
 132:	f1 f7       	brne	.-4      	; 0x130 <LCD1602_gotoXY+0x12>
_delay_us(500);
//	Delayms(1);
	LCDa_CLR_E;	
 134:	de 98       	cbi	0x1b, 6	; 27
 136:	08 95       	ret
		default:
			LCD1602_sendbyte(iCmd, LCDa_L1 + Col); break;	//写入第1行的指定列	
	}*/
	if(Row==1)
		LCD1602_sendbyte(iCmd, LCDa_L1+Col);
	if(Row==2)
 138:	82 30       	cpi	r24, 0x02	; 2
 13a:	51 f4       	brne	.+20     	; 0x150 <LCD1602_gotoXY+0x32>
		LCD1602_sendbyte(iCmd, LCDa_L2+Col);
 13c:	60 54       	subi	r22, 0x40	; 64
返回值  : 无
********************************************/
void LCD1602_sendbyte(uchar DatCmd, uchar dByte)
{
	if (DatCmd == iCmd)		//指令操作
		LCDa_CLR_RS;
 13e:	dc 98       	cbi	0x1b, 4	; 27
	else
		LCDa_SET_RS;
		
	LCDa_CLR_RW;			//写操作
 140:	dd 98       	cbi	0x1b, 5	; 27
	LCDa_SET_E;
 142:	de 9a       	sbi	0x1b, 6	; 27
	LCDa_DO = dByte;		//写入数据
 144:	68 bb       	out	0x18, r22	; 24
 146:	88 ee       	ldi	r24, 0xE8	; 232
 148:	93 e0       	ldi	r25, 0x03	; 3
 14a:	01 97       	sbiw	r24, 0x01	; 1
 14c:	f1 f7       	brne	.-4      	; 0x14a <LCD1602_gotoXY+0x2c>
_delay_us(500);
//	Delayms(1);
	LCDa_CLR_E;	
 14e:	de 98       	cbi	0x1b, 6	; 27

⌨️ 快捷键说明

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