Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

我用MSP-TS430RSB40的开发板,芯片为MSP430f5172,烧入使P2.0到P3.7端口为高电平的程序,但是测试不了。

$
0
0

芯片为5172的,用完P1.x的端口,然后开始使用其他端口,先测试P2.x与P3.x,设置为高电平,但是用示波器测试2.0到3.1的每个端口都没有用,P3.2过后的端口能显示高电平,请问这是什么原因?

代码如下:

#include <msp430f5172.h>
void main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR |=BIT0;
P1OUT |=BIT0;

P2DIR |=0xff;
P2OUT |=0xff;
P3DIR |=0xff;
P3OUT |=0xff;


}


Viewing all articles
Browse latest Browse all 3634

Trending Articles