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

📄 main.lss

📁 小护士脉搏监护仪全套系统
💻 LSS
📖 第 1 页 / 共 4 页
字号:
 1fc:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
 200:	c8 01       	movw	r24, r16
 202:	01 97       	sbiw	r24, 0x01	; 1
 204:	f1 f7       	brne	.-4      	; 0x202 <init_lcd+0x2a>
  _delay_ms(1);
  wr_comm_lcd(0x01);            //清除显示
 206:	81 e0       	ldi	r24, 0x01	; 1
 208:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
 20c:	c8 01       	movw	r24, r16
 20e:	01 97       	sbiw	r24, 0x01	; 1
 210:	f1 f7       	brne	.-4      	; 0x20e <init_lcd+0x36>
 212:	1f 91       	pop	r17
 214:	0f 91       	pop	r16
 216:	08 95       	ret

00000218 <clear_lcd>:
  _delay_ms(1);
}


//清屏********************************************************************************************

void clear_lcd(void)
{
 218:	81 e0       	ldi	r24, 0x01	; 1
 21a:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 21e:	08 95       	ret

00000220 <locate_xy>:
  wr_comm_lcd(0x01);            //清除显示
}

//光标定位************************************************************?************************
//x表示列,y表示行,(x<=8,y<=4)

void locate_xy(unsigned int x,unsigned int y)
{
 220:	61 30       	cpi	r22, 0x01	; 1
 222:	71 05       	cpc	r23, r1
 224:	69 f0       	breq	.+26     	; 0x240 <locate_xy+0x20>
  unsigned char addr;
  switch(y)
 226:	61 30       	cpi	r22, 0x01	; 1
 228:	71 05       	cpc	r23, r1
 22a:	38 f0       	brcs	.+14     	; 0x23a <locate_xy+0x1a>
 22c:	62 30       	cpi	r22, 0x02	; 2
 22e:	71 05       	cpc	r23, r1
 230:	51 f0       	breq	.+20     	; 0x246 <locate_xy+0x26>
 232:	63 30       	cpi	r22, 0x03	; 3
 234:	71 05       	cpc	r23, r1
 236:	61 f4       	brne	.+24     	; 0x250 <locate_xy+0x30>
 238:	09 c0       	rjmp	.+18     	; 0x24c <locate_xy+0x2c>
	{ 
	  /*水平方向X,以字节单位 垂直方向Y—以位为单位*/
	  case 0:addr=0x80+x%8;break; 
 23a:	87 70       	andi	r24, 0x07	; 7
 23c:	80 58       	subi	r24, 0x80	; 128
 23e:	08 c0       	rjmp	.+16     	; 0x250 <locate_xy+0x30>
	  case 1:addr=0x90+x%8;break;
 240:	87 70       	andi	r24, 0x07	; 7
 242:	80 57       	subi	r24, 0x70	; 112
 244:	05 c0       	rjmp	.+10     	; 0x250 <locate_xy+0x30>
	  case 2:addr=0x88+x%8;break;
 246:	87 70       	andi	r24, 0x07	; 7
 248:	88 57       	subi	r24, 0x78	; 120
 24a:	02 c0       	rjmp	.+4      	; 0x250 <locate_xy+0x30>
	  case 3:addr=0x98+x%8;break;
 24c:	87 70       	andi	r24, 0x07	; 7
 24e:	88 56       	subi	r24, 0x68	; 104
	  default:break;
	}
	wr_comm_lcd(addr);
 250:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 254:	08 95       	ret

00000256 <w_Char>:
}

//写一个字节到LCD******************************************************************************
//参数 word 指明要写的数据

void w_Char(unsigned char word)
{
 256:	ff 92       	push	r15
 258:	0f 93       	push	r16
 25a:	1f 93       	push	r17
 25c:	cf 93       	push	r28
 25e:	df 93       	push	r29
 260:	f8 2e       	mov	r15, r24
    int x=0,y=0;
	y =count/8; 
 262:	20 91 7a 00 	lds	r18, 0x007A
 266:	30 91 7b 00 	lds	r19, 0x007B
	y= y%4;                  //得到行号
 26a:	c9 01       	movw	r24, r18
 26c:	43 e0       	ldi	r20, 0x03	; 3
 26e:	96 95       	lsr	r25
 270:	87 95       	ror	r24
 272:	4a 95       	dec	r20
 274:	e1 f7       	brne	.-8      	; 0x26e <w_Char+0x18>
 276:	64 e0       	ldi	r22, 0x04	; 4
 278:	70 e0       	ldi	r23, 0x00	; 0
 27a:	0e 94 3a 04 	call	0x874	; 0x874 <__divmodhi4>
 27e:	ec 01       	movw	r28, r24
	x = count%8;             //得到列号
 280:	89 01       	movw	r16, r18
 282:	07 70       	andi	r16, 0x07	; 7
 284:	10 70       	andi	r17, 0x00	; 0
	
	if(y==0 && x==0)
 286:	89 2b       	or	r24, r25
 288:	29 f4       	brne	.+10     	; 0x294 <w_Char+0x3e>
 28a:	01 15       	cp	r16, r1
 28c:	11 05       	cpc	r17, r1
 28e:	11 f4       	brne	.+4      	; 0x294 <w_Char+0x3e>
    {    
	   clear_lcd();         //满屏则需清屏
 290:	0e 94 0c 01 	call	0x218	; 0x218 <clear_lcd>
	} 
    locate_xy(x,y);         //定光标位置
 294:	be 01       	movw	r22, r28
 296:	c8 01       	movw	r24, r16
 298:	0e 94 10 01 	call	0x220	; 0x220 <locate_xy>
	wr_data_lcd(word);      //写数据到LCD
 29c:	8f 2d       	mov	r24, r15
 29e:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
 2a2:	df 91       	pop	r29
 2a4:	cf 91       	pop	r28
 2a6:	1f 91       	pop	r17
 2a8:	0f 91       	pop	r16
 2aa:	ff 90       	pop	r15
 2ac:	08 95       	ret

000002ae <w_Word>:
	//count++;
}

//显示一个中文字,进行两次写一字节的操作*******************************************************
//x是列号,y是行号,word1/word1是要发送中文的前/后一字节

void w_Word(unsigned int x,unsigned int y,unsigned char word1,unsigned char word2)
{
 2ae:	0f 93       	push	r16
 2b0:	1f 93       	push	r17
 2b2:	14 2f       	mov	r17, r20
 2b4:	02 2f       	mov	r16, r18
   locate_xy(x,y);            //定光标位置
 2b6:	0e 94 10 01 	call	0x220	; 0x220 <locate_xy>
   wr_data_lcd(word1);        //写前一字节
 2ba:	81 2f       	mov	r24, r17
 2bc:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
   wr_data_lcd(word2);        //写后一字节
 2c0:	80 2f       	mov	r24, r16
 2c2:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
 2c6:	1f 91       	pop	r17
 2c8:	0f 91       	pop	r16
 2ca:	08 95       	ret

000002cc <w_strword>:
}

//显示整个中文字符数组里的文字********************************************************************
//x,y为定位坐标,pstr为操作数组

void w_strword(unsigned int x,unsigned int y,unsigned char *pstr)
 {
 2cc:	af 92       	push	r10
 2ce:	bf 92       	push	r11
 2d0:	cf 92       	push	r12
 2d2:	df 92       	push	r13
 2d4:	ef 92       	push	r14
 2d6:	ff 92       	push	r15
 2d8:	0f 93       	push	r16
 2da:	1f 93       	push	r17
 2dc:	cf 93       	push	r28
 2de:	df 93       	push	r29
 2e0:	ec 01       	movw	r28, r24
 2e2:	7b 01       	movw	r14, r22
 2e4:	8a 01       	movw	r16, r20
    int i=0,j=0;
    unsigned int t=0;
    busywait();                         //忙否
 2e6:	0e 94 c6 00 	call	0x18c	; 0x18c <busywait>
 2ea:	aa 24       	eor	r10, r10
 2ec:	bb 24       	eor	r11, r11
 2ee:	f8 01       	movw	r30, r16
 2f0:	04 c0       	rjmp	.+8      	; 0x2fa <w_strword+0x2e>
    while(pstr[t]!='\0')t++;
 2f2:	08 94       	sec
 2f4:	a1 1c       	adc	r10, r1
 2f6:	b1 1c       	adc	r11, r1
 2f8:	31 96       	adiw	r30, 0x01	; 1
 2fa:	80 81       	ld	r24, Z
 2fc:	88 23       	and	r24, r24
 2fe:	c9 f7       	brne	.-14     	; 0x2f2 <w_strword+0x26>
 300:	cc 24       	eor	r12, r12
 302:	dd 24       	eor	r13, r13
 304:	1f c0       	rjmp	.+62     	; 0x344 <w_strword+0x78>
  
    for(i=0;i<(t-1);i++)
	{  j=i;
	   i++;
	   w_Word(x,y,pstr[j],pstr[i]);
 306:	f8 01       	movw	r30, r16
 308:	21 81       	ldd	r18, Z+1	; 0x01
 30a:	40 81       	ld	r20, Z
 30c:	b7 01       	movw	r22, r14
 30e:	ce 01       	movw	r24, r28
 310:	0e 94 57 01 	call	0x2ae	; 0x2ae <w_Word>
	   x++;
 314:	21 96       	adiw	r28, 0x01	; 1
	   if(x==8)
 316:	c8 30       	cpi	r28, 0x08	; 8
 318:	d1 05       	cpc	r29, r1
 31a:	71 f4       	brne	.+28     	; 0x338 <w_strword+0x6c>
		{
		    y+=1;                   //换行
 31c:	08 94       	sec
 31e:	e1 1c       	adc	r14, r1
 320:	f1 1c       	adc	r15, r1
	  	    x=0;                    //回车
		    if(y==4)
 322:	f4 e0       	ldi	r31, 0x04	; 4
 324:	ef 16       	cp	r14, r31
 326:	f1 04       	cpc	r15, r1
 328:	19 f0       	breq	.+6      	; 0x330 <w_strword+0x64>
 32a:	c0 e0       	ldi	r28, 0x00	; 0
 32c:	d0 e0       	ldi	r29, 0x00	; 0
 32e:	04 c0       	rjmp	.+8      	; 0x338 <w_strword+0x6c>
 330:	c0 e0       	ldi	r28, 0x00	; 0
 332:	d0 e0       	ldi	r29, 0x00	; 0
 334:	ee 24       	eor	r14, r14
 336:	ff 24       	eor	r15, r15
 338:	82 e0       	ldi	r24, 0x02	; 2
 33a:	90 e0       	ldi	r25, 0x00	; 0
 33c:	c8 0e       	add	r12, r24
 33e:	d9 1e       	adc	r13, r25
 340:	0e 5f       	subi	r16, 0xFE	; 254
 342:	1f 4f       	sbci	r17, 0xFF	; 255
 344:	c5 01       	movw	r24, r10
 346:	01 97       	sbiw	r24, 0x01	; 1
 348:	c8 16       	cp	r12, r24
 34a:	d9 06       	cpc	r13, r25
 34c:	e0 f2       	brcs	.-72     	; 0x306 <w_strword+0x3a>
 34e:	df 91       	pop	r29
 350:	cf 91       	pop	r28
 352:	1f 91       	pop	r17
 354:	0f 91       	pop	r16
 356:	ff 90       	pop	r15
 358:	ef 90       	pop	r14
 35a:	df 90       	pop	r13
 35c:	cf 90       	pop	r12
 35e:	bf 90       	pop	r11
 360:	af 90       	pop	r10
 362:	08 95       	ret

00000364 <clear_panel>:
			{
			  y=0;           //已满屏
			}
		}
	}
 } 
 
void clear_panel()
{
 364:	1f 93       	push	r17
 366:	cf 93       	push	r28
 368:	df 93       	push	r29
  unsigned char yaddr=0x80;
  wr_comm_lcd(0x30);
 36a:	80 e3       	ldi	r24, 0x30	; 48
 36c:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x34);               
 370:	84 e3       	ldi	r24, 0x34	; 52
 372:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 376:	80 e8       	ldi	r24, 0x80	; 128
  for(int y=0;y<32;y++)
  {
    wr_comm_lcd(yaddr++);
 378:	18 2f       	mov	r17, r24
 37a:	1f 5f       	subi	r17, 0xFF	; 255
 37c:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
	wr_comm_lcd(0x80);
 380:	80 e8       	ldi	r24, 0x80	; 128
 382:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 386:	c0 e0       	ldi	r28, 0x00	; 0
 388:	d0 e0       	ldi	r29, 0x00	; 0
	for(int x=0;x<16;x++)
	{
	  wr_data_lcd(0x00);
 38a:	80 e0       	ldi	r24, 0x00	; 0
 38c:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
 390:	21 96       	adiw	r28, 0x01	; 1
 392:	c0 31       	cpi	r28, 0x10	; 16
 394:	d1 05       	cpc	r29, r1
 396:	c9 f7       	brne	.-14     	; 0x38a <clear_panel+0x26>
 398:	10 3a       	cpi	r17, 0xA0	; 160
 39a:	11 f4       	brne	.+4      	; 0x3a0 <clear_panel+0x3c>
 39c:	80 e8       	ldi	r24, 0x80	; 128
 39e:	03 c0       	rjmp	.+6      	; 0x3a6 <clear_panel+0x42>
 3a0:	81 2f       	mov	r24, r17
 3a2:	ea cf       	rjmp	.-44     	; 0x378 <clear_panel+0x14>
 3a4:	81 2f       	mov	r24, r17
	}
  }
  yaddr=0x80;
  for(int y=0;y<32;y++)
  {
    wr_comm_lcd(yaddr++);
 3a6:	18 2f       	mov	r17, r24
 3a8:	1f 5f       	subi	r17, 0xFF	; 255
 3aa:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
	wr_comm_lcd(0x88);
 3ae:	88 e8       	ldi	r24, 0x88	; 136
 3b0:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 3b4:	c0 e0       	ldi	r28, 0x00	; 0
 3b6:	d0 e0       	ldi	r29, 0x00	; 0
	for(int x=0;x<16;x++)
	{
	  wr_data_lcd(0x00);
 3b8:	80 e0       	ldi	r24, 0x00	; 0
 3ba:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
 3be:	21 96       	adiw	r28, 0x01	; 1
 3c0:	c0 31       	cpi	r28, 0x10	; 16
 3c2:	d1 05       	cpc	r29, r1
 3c4:	c9 f7       	brne	.-14     	; 0x3b8 <clear_panel+0x54>
 3c6:	10 3a       	cpi	r17, 0xA0	; 160
 3c8:	69 f7       	brne	.-38     	; 0x3a4 <clear_panel+0x40>
	}
  }
  wr_comm_lcd(0x32);
 3ca:	82 e3       	ldi	r24, 0x32	; 50
 3cc:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x36);
 3d0:	86 e3       	ldi	r24, 0x36	; 54
 3d2:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 3d6:	df 91       	pop	r29
 3d8:	cf 91       	pop	r28
 3da:	1f 91       	pop	r17
 3dc:	08 95       	ret

000003de <draw_point>:
  
}

//************---画点---******************************************** 
//图形点阵起始数组的地址
//画点(在液晶屏上任意一点)
//横坐标x0:0~127
//纵坐标y0:0~63
void draw_point(unsigned char x0,unsigned char y0)
{
 3de:	0f 93       	push	r16
 3e0:	1f 93       	push	r17
 3e2:	06 2f       	mov	r16, r22
	unsigned char c;//point_data;
	unsigned char page,colume,screen;
	wr_comm_lcd(0x30);
 3e4:	80 e3       	ldi	r24, 0x30	; 48
 3e6:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
    wr_comm_lcd(0x34);
 3ea:	84 e3       	ldi	r24, 0x34	; 52
 3ec:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
	if(y0>=32)
 3f0:	00 32       	cpi	r16, 0x20	; 32
 3f2:	10 f4       	brcc	.+4      	; 0x3f8 <draw_point+0x1a>
 3f4:	10 e8       	ldi	r17, 0x80	; 128
 3f6:	01 c0       	rjmp	.+2      	; 0x3fa <draw_point+0x1c>
 3f8:	18 e8       	ldi	r17, 0x88	; 136
	   screen=0x88;
	else
	   screen=0x80;
	page=y0%32;
 3fa:	0f 71       	andi	r16, 0x1F	; 31
	wr_comm_lcd(page|0x80);
 3fc:	80 2f       	mov	r24, r16
 3fe:	80 68       	ori	r24, 0x80	; 128
 400:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
	wr_comm_lcd(screen); 
 404:	81 2f       	mov	r24, r17
 406:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
	//point_data=0;
	//point_data=readByte(_rdata_);
	if((page+1)%10==0) wr_data_lcd(0x2b);
 40a:	11 27       	eor	r17, r17
 40c:	c8 01       	movw	r24, r16
 40e:	01 96       	adiw	r24, 0x01	; 1
 410:	6a e0       	ldi	r22, 0x0A	; 10
 412:	70 e0       	ldi	r23, 0x00	; 0
 414:	0e 94 3a 04 	call	0x874	; 0x874 <__divmodhi4>
 418:	89 2b       	or	r24, r25
 41a:	11 f4       	brne	.+4      	; 0x420 <draw_point+0x42>
 41c:	8b e2       	ldi	r24, 0x2B	; 43
 41e:	01 c0       	rjmp	.+2      	; 0x422 <draw_point+0x44>
	else wr_data_lcd(0x2a);
 420:	8a e2       	ldi	r24, 0x2A	; 42
 422:	0e 94 dc 00 	call	0x1b8	; 0x1b8 <wr_data_lcd>
	wr_comm_lcd(0x32);
 426:	82 e3       	ldi	r24, 0x32	; 50
 428:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x36);
 42c:	86 e3       	ldi	r24, 0x36	; 54
 42e:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
 432:	1f 91       	pop	r17
 434:	0f 91       	pop	r16
 436:	08 95       	ret

00000438 <pixy>:
}
unsigned char templetrue=0;
void pixy()
{ 
 438:	0f 93       	push	r16
 43a:	1f 93       	push	r17
 43c:	cf 93       	push	r28
 43e:	df 93       	push	r29
  unsigned int count=5;
  wr_comm_lcd(0x30);
 440:	80 e3       	ldi	r24, 0x30	; 48
 442:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x34); 
 446:	84 e3       	ldi	r24, 0x34	; 52
 448:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x80|0);
 44c:	80 e8       	ldi	r24, 0x80	; 128
 44e:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>
  wr_comm_lcd(0x80); 
 452:	80 e8       	ldi	r24, 0x80	; 128
 454:	0e 94 cc 00 	call	0x198	; 0x198 <wr_comm_lcd>

⌨️ 快捷键说明

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