test_cd4051.s

来自「cd4051的程序」· S 代码 · 共 101 行

S
101
字号
	.module test_cd4051.c
	.area text(rom, con, rel)
	.dbfile test_cd4051.c
	.dbfunc e PORT_INIT _PORT_INIT fV
	.even
_PORT_INIT::
	.dbline -1
	.dbline 25
; //************************************************* 
; //测试功能:4051的选通功能
; //测试方法: 
; //测试结果:?
; //时钟频率:外部8m
; //管脚分配: 
; //注意事项: 
; //完成时间:2009.03.18
; //**************************************************
; 
; //************************************************** 
; //头文件
; //************************************************** 
; #include <iom16v.h>
; #include <macros.h>
; //************************************************** 
; 
; 
; //***************************************************** 
; //函数名称:void PORT_INIT(void)
; //函数功能: 
; //注意事项:开始不选通
; //*****************************************************
; void PORT_INIT(void)
; {	 
	.dbline 26
; 	 DDRC|=0X78;
	in R24,0x14
	ori R24,120
	out 0x14,R24
	.dbline 27
; 	 PORTC|=0X40;
	sbi 0x15,6
	.dbline -2
L1:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e cd4051 _cd4051 fV
	.even
_cd4051::
	.dbline -1
	.dbline 35
; }
; //***************************************************** 
; //函数名称:void cd4051(void)
; //函数功能: 
; //注意事项:开始不选通
; //*****************************************************
; void cd4051(void)
; {	 
	.dbline 36
; 	PORTC&=0X87;
	in R24,0x15
	andi R24,135
	out 0x15,R24
	.dbline 37
; 	PORTC|=(1<<5);
	sbi 0x15,5
	.dbline -2
L2:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e main _main fV
	.even
_main::
	.dbline -1
	.dbline 43
; } 
; //*************************************************** 
; //主函数
; //***************************************************
; void main(void)
; {	 
	.dbline 44
; 	PORT_INIT();
	xcall _PORT_INIT
	.dbline 45
; 	cd4051();
	xcall _cd4051
L4:
	.dbline 47
L5:
	.dbline 46
	xjmp L4
X0:
	.dbline -2
L3:
	.dbline 0 ; func end
	ret
	.dbend

⌨️ 快捷键说明

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