input and pull high.c

来自「范例程序 SONiX」· C语言 代码 · 共 32 行

C
32
字号
#include	<sn8p2758.h>


void main (void)
{
//================================================================
//		All I/O Port set to the input mode 
//================================================================

		P1M=0x00;						// P10~P17 set to the input mode 
		P2M=0x00;						// P20~P27 set to the input mode 
		P1UR=0xFF;					// P10~P17 set pull high	
		P2UR=0xFF						// P20~P27 set pull high

//================================================================
//	Single PIN set to the input mode
//================================================================
		FP50=0;							// P50 set to the input mode
		FP51=0;							// P51 set to the input mode
		
		P5UR=0x03;				  // P50,P51 set pull high

	while(1)
	{
//================================================================
//
//	User code
//
//================================================================
  }

} 

⌨️ 快捷键说明

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