Part Number:MSP430I2041
SD24CTL &= ~SD24REFS; // Internal ref
SD24CCTL0 |= SD24LSBTOG | SD24DF | SD24OSR_256; // Single sample, 2's complement
SD24INCTL0 |= SD24INCH_0;
__delay_cycles(3200); // Delay ~200us for 1.2V ref to settle
SD24CCTL0 |= SD24SC; // Set bit to start conversion
while(1) {
while(!(SD24CCTL0 & SD24IFG)); // Poll IFG until conversion completes
results = SD24MEM0;
results += SD24MEM0 & 0xff;
printf("DC:%d\r\n",results);
delay_ms(300);
}
以上是测试代码
mingxu wei:
已经解决了,根据数据表中的表 5-20,外部 VREF 电压的范围应介于 1.0 和 1.5 V 之间。