我学习到的 MSP430IO可以设成 输入和输出的,但是我想知道 一个IO口能不能既设成输出,又设成输入的程序啊。如果有 该怎么编程啊。。
Seven Han:
您好,
这个可以看下手册里PxDIR方向寄存器:
12.2.3 Direction Registers (PxDIR)Each bit in each PxDIR register selects the direction of the corresponding I/O pin, regardless of theselected function for the pin. PxDIR bits for I/O pins that are selected for other functions must be set asrequired by the other function.• Bit = 0: Port pin is switched to input direction• Bit = 1: Port pin is switched to output direction
没有其他的设置,http://www.ti.com.cn/cn/lit/ug/slau208p/slau208p.pdf
TI中文支持网
