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.
初始化输出很简单,主要是这些口默认代码里似乎都有初始化,比如2,3是串口,P1_0是LED,P1_2有些板是做了按键输入
如果你只需要输出,那就用P1_0
P1DIR |= 0x01; //把 P1_0设为输出,默认0是输入
然后就可以P1_0=1 or 0 来输出了。