void IO_Init() //端口初始化
{
char SFRPAGE_SAVE=SFRPAGE;
SFRPAGE=0x0F;
XBR0=0X34;
XBR1=0x14;
XBR2=0x40;
XBR3=0x80;
P0MDOUT=0xFF;
P1MDIN=0xFF;
P1MDOUT=0x00;
P2MDIN=0xFF;
P2MDOUT=0x00;
P3MDIN=0xFF;
P3MDOUT=0x00;
P0=0xFF;
P1=0xFF;
P2=0xFF;
P3=0xFF;
P4MDOUT=0x00;
P4=0xFF;
P5MDOUT=0x00;
P5=0xFF;
P6MDOUT=0x00;
P6=0x00;
P7MDOUT=0x00;
P7=0xFF;
SFRPAGE=SFRPAGE_SAVE;
}
P0到P3端口状态改不了 请问什么处理 !!!!!! |