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

📄 main.s

📁 mage16,LCM1604驱动8线,调试成功
💻 S
字号:
	.module main.c
	.area text(rom, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
	.dbfunc e main _main fV
	.even
_main::
	sbiw R28,2
	.dbline -1
	.dbline 20
; /*--------------------------------------------------*/
; /*             AVR-ARM开发网论坛                    */
; /*           http://www.avrarm.com                  */
; /*            AVR生成代码测试程序                   */
; /*--------------------------------------------------*/
; /*     程序由AVR辅助开发工具V2.0.1自动生成          */
; /*     AVR系统的处理器为:   ATMega16               */
; /*     AVR系统的晶振频率:   8.0000 Mhz             */
; /*--------------------------------------------------*/
; 
; #include <iom16v.h>
; #include <macros.h>
; #include "lcd.h"
; #include "delay.h"
; 
; //-----------------------------------------------------------
; //主函数
; //-----------------------------------------------------------
; void main(void)
; {
	.dbline 22
; 
;    LCD16xx_init();
	xcall _LCD16xx_init
	.dbline 23
;    LCD16xx_clr();                     //显示清屏
	xcall _LCD16xx_clr
	.dbline 24
;    delay_nms(10); 
	ldi R16,10
	ldi R17,0
	xcall _delay_nms
	.dbline 25
;    LCD16xx_write_string(3,0,"Welcome to");
	ldi R24,<L2
	ldi R25,>L2
	std y+1,R25
	std y+0,R24
	clr R18
	ldi R16,3
	xcall _LCD16xx_write_string
	.dbline 26
;    LCD16xx_write_string(1,1,"www.avrarm.com!");
	ldi R24,<L3
	ldi R25,>L3
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,1
	xcall _LCD16xx_write_string
	.dbline 27
;    LCD16xx_write_string(4,2,"By Peter");
	ldi R24,<L4
	ldi R25,>L4
	std y+1,R25
	std y+0,R24
	ldi R18,2
	ldi R16,4
	xcall _LCD16xx_write_string
	.dbline 28
;    LCD16xx_write_string(3,3,"2006.09.06");
	ldi R24,<L5
	ldi R25,>L5
	std y+1,R25
	std y+0,R24
	ldi R18,3
	ldi R16,3
	xcall _LCD16xx_write_string
	.dbline 29
;    delay_nms(700);
	ldi R16,700
	ldi R17,2
	xcall _delay_nms
	.dbline 30
;    LCD16xx_clr();                     //显示清屏
	xcall _LCD16xx_clr
	.dbline 31
;    delay_nms(1);
	ldi R16,1
	ldi R17,0
	xcall _delay_nms
	xjmp L7
L6:
	.dbline 34
	.dbline 34
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	clr R18
	clr R16
	xcall _LCD16xx_write_string
	.dbline 35
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _LCD16xx_write_string
	.dbline 36
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,2
	ldi R16,8
	xcall _LCD16xx_write_string
	.dbline 37
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,3
	ldi R16,12
	xcall _LCD16xx_write_string
	.dbline 38
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,3
	clr R16
	xcall _LCD16xx_write_string
	.dbline 39
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,2
	ldi R16,4
	xcall _LCD16xx_write_string
	.dbline 40
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,8
	xcall _LCD16xx_write_string
	.dbline 41
	ldi R24,<L9
	ldi R25,>L9
	std y+1,R25
	std y+0,R24
	clr R18
	ldi R16,12
	xcall _LCD16xx_write_string
	.dbline 42
	ldi R16,1500
	ldi R17,5
	xcall _delay_nms
	.dbline 43
	xcall _LCD16xx_clr
	.dbline 44
	ldi R16,1000
	ldi R17,3
	xcall _delay_nms
	.dbline 45
L7:
	.dbline 33
	xjmp L6
X0:
	.dbline -2
L1:
	adiw R28,2
	.dbline 0 ; func end
	ret
	.dbend
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
L9:
	.blkb 6
	.area idata
	.byte 'P,'E,'T,'E,'R,0
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
L5:
	.blkb 11
	.area idata
	.byte 50,48,48,54,46,48,57,46,48,54,0
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
L4:
	.blkb 9
	.area idata
	.byte 'B,'y,32,'P,'e,'t,'e,'r,0
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
L3:
	.blkb 16
	.area idata
	.byte 'w,'w,'w,46,'a,'v,'r,'a,'r,'m,46,'c,'o,'m,33,0
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c
L2:
	.blkb 11
	.area idata
	.byte 'W,'e,'l,'c,'o,'m,'e,32,'t,'o,0
	.area data(ram, con, rel)
	.dbfile G:\avr16\avr16-1020-2\main.c

⌨️ 快捷键说明

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