input and pull high.asm

来自「范例程序 SONiX」· 汇编 代码 · 共 41 行

ASM
41
字号
chip	sn8p2758


.data		

.code

	org	00h
	jmp	main

	org	10h

main:
//================================================================
//	All I/O Port set to the input mode 
//================================================================
	mov	a,#00H
	b0mov	p1M,a		;P10~P17 set to the input mode 	
	b0mov	p2M,a		;P20~P27 set to the input mode 

	mov	a,#0ffh
	b0mov	p1ur,a		;P10~P17 set pull hiht 	
	b0mov	p2ur,a		;P20~P27 set pull hiht  
//================================================================
//	Single PIN set to the input mode
//================================================================

	b0bclr	fp50m		;P50 set to the input mode
	b0bclr	fp51m		;P51 set to the input mode

	mov	a,#03h
	b0mov	p5ur,a		;P50,P51 set pull high 

main10:
//================================================================
//
//	User code
//
//================================================================

	jmp	main10

⌨️ 快捷键说明

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