This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[紧急]MSP430AFE253 SD24_A 采集的原始数据有明显抖动

Other Parts Discussed in Thread: TIDM-METROLOGY-HOST

Dear FAE,

我使用SD24_A进行AD采集,进行如下配置:

使用三个外部通道A0 A1 A2,其中A0 A1通道增益32,A2通道增益1;

过采样率均为256,单次转换;

三个通道组成一组;

使用内部参考电压;

数据格式为二进制补码;

AD调制时钟频率为1MHz,通过SMCLK分频获得;

使能转换中断;

程序运行过程:

启动时初始化SD24_A;

设置定时器使之每4ms启动AD转换;

转换中断产生后分别读取三个通道的高16位数据并打印;

原理图如下

测试时通道A0 接入了惠斯通电桥式的传感器,通道A1的两个脚则连接了一个68欧姆电阻;

我们采集了两分钟左右的数据,如附件;

SD24_A AD数据.txt

通过绘制通道A0 A1数据波形,发现有接近20个字的抖动,可以参考附件给出的原始数据;

通道A0局部波形:

通道A1局部波形:

程序

SD24初始化

void SD24_init(uint16_t gain)
{
uint32_t i;

SD24CTL = SD24XDIV_0 | SD24DIV_3 | SD24SSEL_1 | SD24REFON | SD24OVIE;

SD24CCTL0 = SD24SNGL | SD24OSR_256 | SD24DF | SD24GRP; // Single conv, group with CH1
SD24INCTL0 = SD24GAIN_32 | SD24INCH_0;
SD24CCTL1 = SD24SNGL | SD24OSR_256 | SD24DF | SD24GRP; // Single conv, group with CH2
SD24INCTL1 = SD24GAIN_32 | SD24INCH_1;
SD24CCTL2 = SD24SNGL | SD24OSR_256 | SD24DF | SD24IE; // Single conv, enable interrupt
SD24INCTL2 = SD24GAIN_1 | SD24INCH_2;

for (i = 0; i < 20000; i++); // 5ms delay for 1.2V ref turning on
}

SD24启动

void SD24_start(void)
{
SD24CCTL2 |= SD24SC;
}

SD24 AD读取

void SD24_read_data(int16_t *ad_data)
{
int16_t temp[3] = {0};

temp[0] = SD24MEM0;
temp[1] = SD24MEM1;
temp[2] = SD24MEM2;

ad_data[0] = temp[0];
ad_data[1] = temp[1];
ad_data[2] = temp[2];
}

SD24中断程序

__interrupt void SD24_ISR(void)
{
int16_t ad_data[3];

switch(__even_in_range(SD24IV,16))
{
case SD24IV_SD24OVIFG:
break;

case SD24IV_SD24MEM0:
break;

case SD24IV_SD24MEM1:
break;

case SD24IV_SD24MEM2:
SD24_read_data(ad_data);

break;

}

}

请问录如何可以使SD24保持稳定的16位输出?