This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

msp430f5529无法控制IO口的问题

请看下面的一段代码:

void ili9481_IO(void)
{
 P1SEL=0x00;
 P3SEL=0x00;
 P4SEL&=~(BIT0+BIT1+BIT2+BIT3+BIT4);
 P1DIR=0xFF;
 P3DIR=0xFF;
 P4DIR|=(BIT0+BIT1+BIT2+BIT3+BIT4);

}

void ili9481_Initializtion()
{
                 // 设置初始状态
  /*--------nRD如用不上初始化状态必须置为1-----------*/
  ili9481_IO();
  P4OUT|=BIT4;//nReset=1;
  P4OUT|=BIT0;//nCS=1;
  P4OUT|=BIT2;//nWR=1;
  P4OUT|=BIT1;//RS=1;
  P4OUT|=BIT3;//nRD=1;

。。。。。。

}

执行后,经过检测发现p4.0,P4.1,P4.2,P4.3等都不是高电平,而是为0的低电平啊?请问这是怎么回事啊?