当我连接 LED 时,蓝色方块变为灰色而不是红色,但在没有连接时它正在工作。电压表显示 5V 但它应该是 3.6V,并且从 msp 出来的电压总是小于 LED 上的电压降,即当它是2.2V,msp输出电压为2.1,然后我改为0.8,所以显示0.7电压。我做错了什么?
#include <msp430.h>
/**
* blink.c
*/
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
P1DIR |= 0x01; // configure P1.0 as output
volatile unsigned int i; // volatile to prevent optimization
while(1)
{
P1OUT ^= 0x01; // toggle P1.0
for(i=10000; i>0; i--); // delay
}
}