msp430 I/O设置
P1IES = 0x01;P1IE= 0x01;
P1DIR &=~ BIT0;
P1OUT = 0;
P1设为输入,P1OUT=0;这个语句的目的是什么?
这是msp430f149例程里的按键工程程序。
这个设置在这里是没有用的。如果只是测着玩,没什么。如果你这是做产品,就改为P1OUT |= BIT0; If the pin's pullup/pulldown resistor is enabled, the corresponding bit in the PxOUT register selects pullup or pulldown.
页:
[1]