yanghaoxiu 发表于 2016-8-17 14:00:53

msp430 I/O设置

P1IES = 0x01;            
    P1IE= 0x01;               
    P1DIR &=~ BIT0;            
    P1OUT = 0;
P1设为输入,P1OUT=0;这个语句的目的是什么?
这是msp430f149例程里的按键工程程序。

wangsen 发表于 2016-8-28 01:05:44

这个设置在这里是没有用的。如果只是测着玩,没什么。如果你这是做产品,就改为P1OUT |= BIT0;

acmilannast 发表于 2016-9-11 10:41:04

If the pin's pullup/pulldown resistor is enabled, the corresponding bit in the PxOUT register selects pullup or pulldown.
页: [1]
查看完整版本: msp430 I/O设置