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

📄 lcd-char.lss

📁 nokia5110.rar
💻 LSS
📖 第 1 页 / 共 3 页
字号:
 6b0:	5f 9a       	sbi	0x0b, 7	; 11
    milliseconds can be achieved.
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
 6b2:	88 ec       	ldi	r24, 0xC8	; 200
 6b4:	90 e0       	ldi	r25, 0x00	; 0
 6b6:	fc 01       	movw	r30, r24
 6b8:	31 97       	sbiw	r30, 0x01	; 1
 6ba:	f1 f7       	brne	.-4      	; 0x6b8 <LCD_init+0xa>
	_delay_us(200);
	res0;  	
 6bc:	5f 98       	cbi	0x0b, 7	; 11
 6be:	e0 e2       	ldi	r30, 0x20	; 32
 6c0:	fe e4       	ldi	r31, 0x4E	; 78
 6c2:	31 97       	sbiw	r30, 0x01	; 1
 6c4:	f1 f7       	brne	.-4      	; 0x6c2 <LCD_init+0x14>
  	_delay_ms(20);
  	res1;  
 6c6:	5f 9a       	sbi	0x0b, 7	; 11
 6c8:	01 97       	sbiw	r24, 0x01	; 1
 6ca:	f1 f7       	brne	.-4      	; 0x6c8 <LCD_init+0x1a>
	_delay_us(200);
	LCD_write_byte(0x21,0);//LCD功能设置:芯片活动,水平寻址,使用扩展指令
 6cc:	81 e2       	ldi	r24, 0x21	; 33
 6ce:	60 e0       	ldi	r22, 0x00	; 0
 6d0:	d9 df       	rcall	.-78     	; 0x684 <LCD_write_byte>
	LCD_write_byte(0xd0,0);//设置VOP值,室温下的编程范围为3.00-10.68
 6d2:	80 ed       	ldi	r24, 0xD0	; 208
 6d4:	60 e0       	ldi	r22, 0x00	; 0
 6d6:	d6 df       	rcall	.-84     	; 0x684 <LCD_write_byte>
	//Vlcd=3.06+(VOP)*0.06,本例VOP为0B0101 0000为十进制的80,Vlcd=7.86V
	LCD_write_byte(0x20,0);//LCD功能设置:芯片活动,水平寻址,使用基本指令
 6d8:	80 e2       	ldi	r24, 0x20	; 32
 6da:	60 e0       	ldi	r22, 0x00	; 0
 6dc:	d3 df       	rcall	.-90     	; 0x684 <LCD_write_byte>
	LCD_write_byte(0x0C,0);//设定显示配置:普通模式
 6de:	8c e0       	ldi	r24, 0x0C	; 12
 6e0:	60 e0       	ldi	r22, 0x00	; 0
 6e2:	d0 df       	rcall	.-96     	; 0x684 <LCD_write_byte>
	sce1;
 6e4:	5d 9a       	sbi	0x0b, 5	; 11
}
 6e6:	08 95       	ret

000006e8 <LCD_set_XY>:
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304 
//-----------------------------------------   
void LCD_set_XY(unsigned char X, unsigned char Y)
{
 6e8:	1f 93       	push	r17
 6ea:	18 2f       	mov	r17, r24
 6ec:	86 2f       	mov	r24, r22
	LCD_write_byte(0x40 | Y, 0);// column
 6ee:	80 64       	ori	r24, 0x40	; 64
 6f0:	60 e0       	ldi	r22, 0x00	; 0
 6f2:	c8 df       	rcall	.-112    	; 0x684 <LCD_write_byte>
	LCD_write_byte(0x80 | X, 0);// row
 6f4:	81 2f       	mov	r24, r17
 6f6:	80 68       	ori	r24, 0x80	; 128
 6f8:	60 e0       	ldi	r22, 0x00	; 0
 6fa:	c4 df       	rcall	.-120    	; 0x684 <LCD_write_byte>
	sce1;
 6fc:	5d 9a       	sbi	0x0b, 5	; 11
} 
 6fe:	1f 91       	pop	r17
 700:	08 95       	ret

00000702 <LCD_clear>:
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304
//----------------------------------------- 
void LCD_clear(void)
{
 702:	0f 93       	push	r16
 704:	1f 93       	push	r17
	unsigned char t;
	unsigned char k;
	LCD_set_XY(0,0);
 706:	80 e0       	ldi	r24, 0x00	; 0
 708:	60 e0       	ldi	r22, 0x00	; 0
 70a:	ee df       	rcall	.-36     	; 0x6e8 <LCD_set_XY>
 70c:	00 e0       	ldi	r16, 0x00	; 0
 70e:	09 c0       	rjmp	.+18     	; 0x722 <LCD_clear+0x20>
	for(t=0;t<6;t++)
	{ 
		for(k=0;k<84;k++)
		{ 
			LCD_write_byte(0x00,1);	 						
 710:	80 e0       	ldi	r24, 0x00	; 0
 712:	61 e0       	ldi	r22, 0x01	; 1
 714:	b7 df       	rcall	.-146    	; 0x684 <LCD_write_byte>
	unsigned char t;
	unsigned char k;
	LCD_set_XY(0,0);
	for(t=0;t<6;t++)
	{ 
		for(k=0;k<84;k++)
 716:	1f 5f       	subi	r17, 0xFF	; 255
 718:	14 35       	cpi	r17, 0x54	; 84
 71a:	d1 f7       	brne	.-12     	; 0x710 <LCD_clear+0xe>
void LCD_clear(void)
{
	unsigned char t;
	unsigned char k;
	LCD_set_XY(0,0);
	for(t=0;t<6;t++)
 71c:	0f 5f       	subi	r16, 0xFF	; 255
 71e:	06 30       	cpi	r16, 0x06	; 6
 720:	11 f0       	breq	.+4      	; 0x726 <LCD_clear+0x24>
 722:	10 e0       	ldi	r17, 0x00	; 0
 724:	f5 cf       	rjmp	.-22     	; 0x710 <LCD_clear+0xe>
		for(k=0;k<84;k++)
		{ 
			LCD_write_byte(0x00,1);	 						
		} 
	}
	sce1;
 726:	5d 9a       	sbi	0x0b, 5	; 11
}
 728:	1f 91       	pop	r17
 72a:	0f 91       	pop	r16
 72c:	08 95       	ret

0000072e <LCD_write_char>:
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304
//-----------------------------------------  	
void LCD_write_char(unsigned char c)
{
 72e:	0f 93       	push	r16
 730:	1f 93       	push	r17
 732:	cf 93       	push	r28
 734:	df 93       	push	r29
	unsigned char line;
	c-=32;
	for (line=0; line<6; line++)
	LCD_write_byte(pgm_read_byte(font6x8+c*6+line), 1);
 736:	80 52       	subi	r24, 0x20	; 32
 738:	26 e0       	ldi	r18, 0x06	; 6
 73a:	82 9f       	mul	r24, r18
 73c:	c0 01       	movw	r24, r0
 73e:	11 24       	eor	r1, r1
 740:	ec 01       	movw	r28, r24
 742:	cc 5c       	subi	r28, 0xCC	; 204
 744:	df 4f       	sbci	r29, 0xFF	; 255
//-----------------------------------------  	
void LCD_write_char(unsigned char c)
{
	unsigned char line;
	c-=32;
	for (line=0; line<6; line++)
 746:	8c 01       	movw	r16, r24
 748:	0a 5f       	subi	r16, 0xFA	; 250
 74a:	1f 4f       	sbci	r17, 0xFF	; 255
 74c:	0c 5c       	subi	r16, 0xCC	; 204
 74e:	1f 4f       	sbci	r17, 0xFF	; 255
	LCD_write_byte(pgm_read_byte(font6x8+c*6+line), 1);
 750:	fe 01       	movw	r30, r28
 752:	84 91       	lpm	r24, Z+
 754:	61 e0       	ldi	r22, 0x01	; 1
 756:	96 df       	rcall	.-212    	; 0x684 <LCD_write_byte>
 758:	21 96       	adiw	r28, 0x01	; 1
//-----------------------------------------  	
void LCD_write_char(unsigned char c)
{
	unsigned char line;
	c-=32;
	for (line=0; line<6; line++)
 75a:	c0 17       	cp	r28, r16
 75c:	d1 07       	cpc	r29, r17
 75e:	c1 f7       	brne	.-16     	; 0x750 <LCD_write_char+0x22>
	LCD_write_byte(pgm_read_byte(font6x8+c*6+line), 1);
	
}
 760:	df 91       	pop	r29
 762:	cf 91       	pop	r28
 764:	1f 91       	pop	r17
 766:	0f 91       	pop	r16
 768:	08 95       	ret

0000076a <LCD_write_String>:
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304
//-----------------------------------------  
void LCD_write_String(unsigned char X,unsigned char Y,char *s)
{
 76a:	cf 93       	push	r28
 76c:	df 93       	push	r29
 76e:	ea 01       	movw	r28, r20
	LCD_set_XY(X,Y);
 770:	bb df       	rcall	.-138    	; 0x6e8 <LCD_set_XY>
 772:	02 c0       	rjmp	.+4      	; 0x778 <LCD_write_String+0xe>
	while (*s) 
	{
		LCD_write_char(*s);
 774:	dc df       	rcall	.-72     	; 0x72e <LCD_write_char>
		s++;
 776:	21 96       	adiw	r28, 0x01	; 1
//日期:20090304
//-----------------------------------------  
void LCD_write_String(unsigned char X,unsigned char Y,char *s)
{
	LCD_set_XY(X,Y);
	while (*s) 
 778:	88 81       	ld	r24, Y
 77a:	88 23       	and	r24, r24
 77c:	d9 f7       	brne	.-10     	; 0x774 <LCD_write_String+0xa>
	{
		LCD_write_char(*s);
		s++;
	}
} 
 77e:	df 91       	pop	r29
 780:	cf 91       	pop	r28
 782:	08 95       	ret

00000784 <LCD_write_shu>:
//网站:宁波单片机开发网
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304 
void LCD_write_shu(unsigned char row, unsigned char page,unsigned char c) //row:列 page:页 dd:字符
{
 784:	cf 92       	push	r12
 786:	df 92       	push	r13
 788:	ef 92       	push	r14
 78a:	ff 92       	push	r15
 78c:	0f 93       	push	r16
 78e:	1f 93       	push	r17
 790:	cf 93       	push	r28
 792:	df 93       	push	r29
 794:	d6 2e       	mov	r13, r22
 796:	14 2f       	mov	r17, r20
	unsigned char i;  	
	
	LCD_set_XY(row*8, page);// 列,页 
 798:	90 e0       	ldi	r25, 0x00	; 0
 79a:	23 e0       	ldi	r18, 0x03	; 3
 79c:	88 0f       	add	r24, r24
 79e:	99 1f       	adc	r25, r25
 7a0:	2a 95       	dec	r18
 7a2:	e1 f7       	brne	.-8      	; 0x79c <LCD_write_shu+0x18>
 7a4:	c8 2e       	mov	r12, r24
 7a6:	a0 df       	rcall	.-192    	; 0x6e8 <LCD_set_XY>
	for(i=0; i<8;i++) 
	{
		LCD_write_byte(pgm_read_byte(shuzi+c*16+i),1); 
 7a8:	c1 2f       	mov	r28, r17
 7aa:	d0 e0       	ldi	r29, 0x00	; 0
 7ac:	94 e0       	ldi	r25, 0x04	; 4
 7ae:	cc 0f       	add	r28, r28
 7b0:	dd 1f       	adc	r29, r29
 7b2:	9a 95       	dec	r25
 7b4:	e1 f7       	brne	.-8      	; 0x7ae <LCD_write_shu+0x2a>
 7b6:	8e 01       	movw	r16, r28
 7b8:	04 5a       	subi	r16, 0xA4	; 164
 7ba:	1d 4f       	sbci	r17, 0xFD	; 253
//网站:宁波单片机开发网
//网址:www.nbdpj.com
//邮箱:nbdpj@nbdpj.com
//日期:20090304 
void LCD_write_shu(unsigned char row, unsigned char page,unsigned char c) //row:列 page:页 dd:字符
{
 7bc:	28 96       	adiw	r28, 0x08	; 8

⌨️ 快捷键说明

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