P1_7 配置为捕获输入,低电压只能拉为1v
将P0_2配置为捕获输入,低电平为0v
P0_2:
P0SEL |= ( 1<<2 );
P0DIR &= ~( 1<<2 );
PERCFG &= ~( 1<<6 );
T1CCTL0 |= ( 1<<0 );
T1CCTL0 &= ~( 1<<1 );
T1CCTL0 &=~( 1<<2 );
P1_7:
P1SEL |= ( 1<<7 );
P1DIR &= ~( 1<<7 );
PERCFG |= ( 1<<5 );
T3CCTL1 &= ~(1<<2);
T3CCTL1 &= ~( 1<<1 );
T3CCTL1 |= ( 1<<0 );
user6314671:
回复 Viki Shi:
刚检查了下,确实有一处重新配置了。谢了
Viki Shi:
回复 user6314671:
好的