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.

ZIGBEE的如何将P0_2,P0_3,P1_0,P1_2变为输出???

各位大神们,因为我们要使用一个输出接口,除了P0_2,P0_3,P1_0,P1_2以为,其他的接口都使用了,但这四个接口不受控制,如何让他们四个其中的一个变为输出啊?

  • 初始化输出很简单,主要是这些口默认代码里似乎都有初始化,比如2,3是串口,P1_0是LED,P1_2有些板是做了按键输入

    如果你只需要输出,那就用P1_0 

    P1DIR |= 0x01; //把 P1_0设为输出,默认0是输入

    然后就可以P1_0=1 or 0 来输出了。