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

📄 sd.lss

📁 FATFS(10.4).rar
💻 LSS
📖 第 1 页 / 共 5 页
字号:
	{
		USART_Send_Char(*str);
		str++;
	}	
}
     1c4:	08 95       	ret

000001c6 <uart_send_4byte>:

void uart_send_4byte( uint32_t data )//发送一个无符号长整型的数据,并在串口调试助手上能以十进制显示
{
     1c6:	af 92       	push	r10
     1c8:	bf 92       	push	r11
     1ca:	cf 92       	push	r12
     1cc:	df 92       	push	r13
     1ce:	ef 92       	push	r14
     1d0:	ff 92       	push	r15
     1d2:	0f 93       	push	r16
     1d4:	df 93       	push	r29
     1d6:	cf 93       	push	r28
     1d8:	cd b7       	in	r28, 0x3d	; 61
     1da:	de b7       	in	r29, 0x3e	; 62
     1dc:	66 97       	sbiw	r28, 0x16	; 22
     1de:	0f b6       	in	r0, 0x3f	; 63
     1e0:	f8 94       	cli
     1e2:	de bf       	out	0x3e, r29	; 62
     1e4:	0f be       	out	0x3f, r0	; 63
     1e6:	cd bf       	out	0x3d, r28	; 61
     1e8:	6b 01       	movw	r12, r22
     1ea:	7c 01       	movw	r14, r24
    char temp[20];				//字符串位数最大21位
    uint8_t i=0;	
    if(data == 0)
     1ec:	61 15       	cp	r22, r1
     1ee:	71 05       	cpc	r23, r1
     1f0:	81 05       	cpc	r24, r1
     1f2:	91 05       	cpc	r25, r1
     1f4:	29 f4       	brne	.+10     	; 0x200 <uart_send_4byte+0x3a>
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     1f6:	5d 9b       	sbis	0x0b, 5	; 11
     1f8:	fe cf       	rjmp	.-4      	; 0x1f6 <uart_send_4byte+0x30>
	UDR = data;	//将数据放入缓冲区,发送数据
     1fa:	80 e3       	ldi	r24, 0x30	; 48
     1fc:	8c b9       	out	0x0c, r24	; 12
     1fe:	33 c0       	rjmp	.+102    	; 0x266 <uart_send_4byte+0xa0>
     200:	00 e0       	ldi	r16, 0x00	; 0
    }
    else
    {
     while(data)
     {
     temp[i++] = data%10;		
     202:	5e 01       	movw	r10, r28
     204:	08 94       	sec
     206:	a1 1c       	adc	r10, r1
     208:	b1 1c       	adc	r11, r1
     20a:	c5 01       	movw	r24, r10
     20c:	80 0f       	add	r24, r16
     20e:	91 1d       	adc	r25, r1
     210:	9e 8b       	std	Y+22, r25	; 0x16
     212:	8d 8b       	std	Y+21, r24	; 0x15
     214:	c7 01       	movw	r24, r14
     216:	b6 01       	movw	r22, r12
     218:	2a e0       	ldi	r18, 0x0A	; 10
     21a:	30 e0       	ldi	r19, 0x00	; 0
     21c:	40 e0       	ldi	r20, 0x00	; 0
     21e:	50 e0       	ldi	r21, 0x00	; 0
     220:	0e 94 97 19 	call	0x332e	; 0x332e <__udivmodsi4>
     224:	ed 89       	ldd	r30, Y+21	; 0x15
     226:	fe 89       	ldd	r31, Y+22	; 0x16
     228:	60 83       	st	Z, r22
     22a:	0f 5f       	subi	r16, 0xFF	; 255
     data /= 10;
     22c:	c7 01       	movw	r24, r14
     22e:	b6 01       	movw	r22, r12
     230:	2a e0       	ldi	r18, 0x0A	; 10
     232:	30 e0       	ldi	r19, 0x00	; 0
     234:	40 e0       	ldi	r20, 0x00	; 0
     236:	50 e0       	ldi	r21, 0x00	; 0
     238:	0e 94 97 19 	call	0x332e	; 0x332e <__udivmodsi4>
     23c:	c9 01       	movw	r24, r18
     23e:	da 01       	movw	r26, r20
     240:	6c 01       	movw	r12, r24
     242:	7d 01       	movw	r14, r26
    {
     USART_Send_Char(0 + '0');    //'0' 等同于 0x30		
    }
    else
    {
     while(data)
     244:	c1 14       	cp	r12, r1
     246:	d1 04       	cpc	r13, r1
     248:	e1 04       	cpc	r14, r1
     24a:	f1 04       	cpc	r15, r1
     24c:	f1 f6       	brne	.-68     	; 0x20a <uart_send_4byte+0x44>
     24e:	09 c0       	rjmp	.+18     	; 0x262 <uart_send_4byte+0x9c>
     temp[i++] = data%10;		
     data /= 10;
     }
    for( ;i>0;i--)
     {
     USART_Send_Char(temp[i-1] + '0');    //'0' 等同于 0x30	
     250:	fe 01       	movw	r30, r28
     252:	e0 0f       	add	r30, r16
     254:	f1 1d       	adc	r31, r1
     256:	e0 81       	ld	r30, Z
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     258:	5d 9b       	sbis	0x0b, 5	; 11
     25a:	fe cf       	rjmp	.-4      	; 0x258 <uart_send_4byte+0x92>
     temp[i++] = data%10;		
     data /= 10;
     }
    for( ;i>0;i--)
     {
     USART_Send_Char(temp[i-1] + '0');    //'0' 等同于 0x30	
     25c:	e0 5d       	subi	r30, 0xD0	; 208
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
	UDR = data;	//将数据放入缓冲区,发送数据
     25e:	ec b9       	out	0x0c, r30	; 12
     while(data)
     {
     temp[i++] = data%10;		
     data /= 10;
     }
    for( ;i>0;i--)
     260:	01 50       	subi	r16, 0x01	; 1
     262:	00 23       	and	r16, r16
     264:	a9 f7       	brne	.-22     	; 0x250 <uart_send_4byte+0x8a>
     {
     USART_Send_Char(temp[i-1] + '0');    //'0' 等同于 0x30	
     }
    }
}
     266:	66 96       	adiw	r28, 0x16	; 22
     268:	0f b6       	in	r0, 0x3f	; 63
     26a:	f8 94       	cli
     26c:	de bf       	out	0x3e, r29	; 62
     26e:	0f be       	out	0x3f, r0	; 63
     270:	cd bf       	out	0x3d, r28	; 61
     272:	cf 91       	pop	r28
     274:	df 91       	pop	r29
     276:	0f 91       	pop	r16
     278:	ff 90       	pop	r15
     27a:	ef 90       	pop	r14
     27c:	df 90       	pop	r13
     27e:	cf 90       	pop	r12
     280:	bf 90       	pop	r11
     282:	af 90       	pop	r10
     284:	08 95       	ret

00000286 <send_1byte_hex>:
void send_1byte_hex(uint8_t data1)    //发送到串口调试助手,以十六进制的形式显示
{
     286:	e8 2f       	mov	r30, r24
     288:	e2 95       	swap	r30
     28a:	ef 70       	andi	r30, 0x0F	; 15
     28c:	f0 e0       	ldi	r31, 0x00	; 0
     28e:	e2 55       	subi	r30, 0x52	; 82
     290:	ff 4f       	sbci	r31, 0xFF	; 255
     292:	e0 81       	ld	r30, Z
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     294:	5d 9b       	sbis	0x0b, 5	; 11
     296:	fe cf       	rjmp	.-4      	; 0x294 <send_1byte_hex+0xe>
	UDR = data;	//将数据放入缓冲区,发送数据
     298:	ec b9       	out	0x0c, r30	; 12
{
  unsigned char  i=0,j=0;
  i=data1/16;    //取高半字节
  j=data1%16;    //取低半字节
  USART_Send_Char(ASCLL_1[i]);
  USART_Send_Char(ASCLL_1[j]);	
     29a:	e8 2f       	mov	r30, r24
     29c:	f0 e0       	ldi	r31, 0x00	; 0
     29e:	ef 70       	andi	r30, 0x0F	; 15
     2a0:	f0 70       	andi	r31, 0x00	; 0
     2a2:	e2 55       	subi	r30, 0x52	; 82
     2a4:	ff 4f       	sbci	r31, 0xFF	; 255
     2a6:	80 81       	ld	r24, Z
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     2a8:	5d 9b       	sbis	0x0b, 5	; 11
     2aa:	fe cf       	rjmp	.-4      	; 0x2a8 <send_1byte_hex+0x22>
	UDR = data;	//将数据放入缓冲区,发送数据
     2ac:	8c b9       	out	0x0c, r24	; 12
  unsigned char  i=0,j=0;
  i=data1/16;    //取高半字节
  j=data1%16;    //取低半字节
  USART_Send_Char(ASCLL_1[i]);
  USART_Send_Char(ASCLL_1[j]);	
}
     2ae:	08 95       	ret

000002b0 <uart_send_Enter>:
void uart_send_Enter()
{
     2b0:	5d 9b       	sbis	0x0b, 5	; 11
     2b2:	fe cf       	rjmp	.-4      	; 0x2b0 <uart_send_Enter>
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
	UDR = data;	//将数据放入缓冲区,发送数据
     2b4:	8d e0       	ldi	r24, 0x0D	; 13
     2b6:	8c b9       	out	0x0c, r24	; 12
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     2b8:	5d 9b       	sbis	0x0b, 5	; 11
     2ba:	fe cf       	rjmp	.-4      	; 0x2b8 <uart_send_Enter+0x8>
	UDR = data;	//将数据放入缓冲区,发送数据
     2bc:	8a e0       	ldi	r24, 0x0A	; 10
     2be:	8c b9       	out	0x0c, r24	; 12
}
void uart_send_Enter()
{
  USART_Send_Char('\r');
  USART_Send_Char('\n');
}
     2c0:	08 95       	ret

000002c2 <send_buf_hex>:

void send_buf_hex(UINT8 *Buffer)     //将缓冲区的数据通过串口发送到电脑
{//(十六进制显示)
     2c2:	ff 92       	push	r15
     2c4:	0f 93       	push	r16
     2c6:	1f 93       	push	r17
     2c8:	cf 93       	push	r28
     2ca:	df 93       	push	r29
     2cc:	8c 01       	movw	r16, r24
     2ce:	c0 e0       	ldi	r28, 0x00	; 0
     2d0:	d0 e0       	ldi	r29, 0x00	; 0
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
	UDR = data;	//将数据放入缓冲区,发送数据
     2d2:	80 e2       	ldi	r24, 0x20	; 32
     2d4:	f8 2e       	mov	r15, r24
void send_buf_hex(UINT8 *Buffer)     //将缓冲区的数据通过串口发送到电脑
{//(十六进制显示)
  uint16_t k=0;
  for(k=0;k<512;k++)
  {
    if(k%16==0)
     2d6:	ce 01       	movw	r24, r28
     2d8:	8f 70       	andi	r24, 0x0F	; 15
     2da:	90 70       	andi	r25, 0x00	; 0
     2dc:	89 2b       	or	r24, r25
     2de:	51 f4       	brne	.+20     	; 0x2f4 <send_buf_hex+0x32>
     2e0:	eb ea       	ldi	r30, 0xAB	; 171
     2e2:	f0 e0       	ldi	r31, 0x00	; 0
     2e4:	04 c0       	rjmp	.+8      	; 0x2ee <send_buf_hex+0x2c>
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     2e6:	5d 9b       	sbis	0x0b, 5	; 11
     2e8:	fe cf       	rjmp	.-4      	; 0x2e6 <send_buf_hex+0x24>
	UDR = data;	//将数据放入缓冲区,发送数据
     2ea:	8c b9       	out	0x0c, r24	; 12
void USART_Send_Str(char *str)
{
	while(*str!='\0')
	{
		USART_Send_Char(*str);
		str++;
     2ec:	31 96       	adiw	r30, 0x01	; 1
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
	UDR = data;	//将数据放入缓冲区,发送数据
}
void USART_Send_Str(char *str)
{
	while(*str!='\0')
     2ee:	80 81       	ld	r24, Z
     2f0:	88 23       	and	r24, r24
     2f2:	c9 f7       	brne	.-14     	; 0x2e6 <send_buf_hex+0x24>
  uint16_t k=0;
  for(k=0;k<512;k++)
  {
    if(k%16==0)
	USART_Send_Str("\r\n");
    send_1byte_hex(Buffer[k]);
     2f4:	f8 01       	movw	r30, r16
     2f6:	ec 0f       	add	r30, r28
     2f8:	fd 1f       	adc	r31, r29
     2fa:	80 81       	ld	r24, Z
     2fc:	0e 94 43 01 	call	0x286	; 0x286 <send_1byte_hex>
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     300:	5d 9b       	sbis	0x0b, 5	; 11
     302:	fe cf       	rjmp	.-4      	; 0x300 <send_buf_hex+0x3e>
	UDR = data;	//将数据放入缓冲区,发送数据
     304:	fc b8       	out	0x0c, r15	; 12
}

void send_buf_hex(UINT8 *Buffer)     //将缓冲区的数据通过串口发送到电脑
{//(十六进制显示)
  uint16_t k=0;
  for(k=0;k<512;k++)
     306:	21 96       	adiw	r28, 0x01	; 1
     308:	82 e0       	ldi	r24, 0x02	; 2
     30a:	c0 30       	cpi	r28, 0x00	; 0
     30c:	d8 07       	cpc	r29, r24
     30e:	19 f7       	brne	.-58     	; 0x2d6 <send_buf_hex+0x14>
     310:	eb ea       	ldi	r30, 0xAB	; 171
     312:	f0 e0       	ldi	r31, 0x00	; 0
     314:	04 c0       	rjmp	.+8      	; 0x31e <send_buf_hex+0x5c>
	//UBRRL = (((F_CPU/BAUD)/16)-1)%256;	
	UCSRB |= (1<<RXEN)|(1<<TXEN)|(1<<RXCIE); //使能发送,接收,接收完成中断	
}
void USART_Send_Char(unsigned char data)
{	
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
     316:	5d 9b       	sbis	0x0b, 5	; 11
     318:	fe cf       	rjmp	.-4      	; 0x316 <send_buf_hex+0x54>
	UDR = data;	//将数据放入缓冲区,发送数据
     31a:	8c b9       	out	0x0c, r24	; 12
void USART_Send_Str(char *str)
{
	while(*str!='\0')
	{
		USART_Send_Char(*str);
		str++;
     31c:	31 96       	adiw	r30, 0x01	; 1
	while( !(UCSRA & (1<<UDRE)));	//等待发送缓冲器为空	
	UDR = data;	//将数据放入缓冲区,发送数据
}
void USART_Send_Str(char *str)
{
	while(*str!='\0')
     31e:	80 81       	ld	r24, Z
     320:	88 23       	and	r24, r24
     322:	c9 f7       	brne	.-14     	; 0x316 <send_buf_hex+0x54>
	USART_Send_Str("\r\n");
    send_1byte_hex(Buffer[k]);
    USART_Send_Char(' ');
  }
  USART_Send_Str("\r\n");

⌨️ 快捷键说明

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