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.
如题所述,在使用MSP430F6723IPNR的24位ad采集电压时使用的是内部参考电压,采集的ad值和电压值均不准确,在切换参考电压值时发现采集的ad值也变化不大。软件上已经配置了内部参考电压。硬件上REF管脚悬空,硬件原理图如题所示
建议您先参考下TI例程测试一下
硬件上REF管脚悬空
这个引脚的话,建议在Vref 和 AVss 之间加100nF的电容来减少参考电压噪声
在 MSP430Ware_3_80_13_03\examples\devices\MSP430F5xx_6xx\MSP430F673x_MSP430F672x_Code_Examples\C 内
MSP430F673X_SD24B_01.c SD24_B, Continuous Conversion on a Group of 3 Channels
MSP430F673X_SD24B_02.c SD24_B, Single Conversion on a Group of 3 Channels
MSP430F673X_SD24B_03.c SD24_B, Continuous Conversion on a Single Channel
MSP430F673X_SD24B_04.c SD24_B, Single Conversion on Single Channel Polling IFG
MSP430F673X_SD24B_05.c SD24_B, Single Conversion on a Single Channel Using ISR
MSP430F673X_SD24B_06.c SD24_B, Single Conversion on a Single Channel Using ISR with 24 bit Result
MSP430F673X_SD24B_10.c SD24_B, Continuous Conversion on a Group of 2 Channels
MSP430F673X_SD24B_11.c SD24_B, Single Conversion on a Group of 2 Channels
SD24BCTL0 = SD24REFS | SD24SSEL_1; // Select internal REF
// Select SMCLK as SD24_B clock source
上述语句就是来配置内部参考电压的
感谢大佬的持续关注,请听我细细道来。就如图所示我的初始化函数
第一行就是打开内部共享1.5v参考电压,
第二行延时(我看到所有的SD24B例程都有延时),
第三行SD24B控制寄存器配置为内部参考电压,选择时钟源为SMCLK,
第四行单一转换模式,结果右对齐二进制格式。
初始化配置就这么完成了。然后采集的结果取的是 SD24BMEML0的高8位和 SD24BMEMH0 的低8位,也就是24位的结果取了高16位,分辨率就成了16位,采集值[0-65535].这是前提,目前采集管脚输入的电压是固定1.04v左右。
采集结果:
1、当实际电压为1.041v时,采集值为63306左右,如果此时参考电压为1.151的话转换为电压值就是1.11v,误差较小,如果参考电压是第一行那样配置的1.5v的话,转换结果就为1.45v,偏差很大。
2、当输入为0时,采集值仍然有33023,几乎是一半的量程!这就很不合理。
3、对于采集的结果,每一次的值都是比较稳定的,不是那种随机的跳变。、
问题和疑问
1、SD24B的内部参考电压到底是1.151v还是参考电压中可选的1.5/2.0/2.5V,都把我整蒙了
The internal SD24_B reference provides one fixed voltage of approximately 1.2 V. It requests and uses the bandgap voltage provided by the shared reference (REF) module as its reference voltage.
The internal SD24_B reference provides one fixed voltage of approximately 1.2 V. It requests and uses the bandgap voltage provided by the shared reference (REF) module as its reference voltage.
内部 SD24_B 基准提供一个大约 1.2 V 的固定电压。它要求和使用共享参考 (REF) 模块提供的带隙电压作为其参考电压。
也就是说,SD24_B 内部电压需要向REF模块请求,而REF模块会返回一个约1.2V的电压,即上面的图说明的那样
如之前所说,例程内已经有配置语句了
SD24BCTL0 = SD24REFS | SD24SSEL_1; // Select internal REF
// Select SMCLK as SD24_B clock source
内部 SD24_B 基准提供一个大约 1.2 V 的固定电压。它要求和使用共享参考 (REF) 模块提供的带隙电压作为其参考电压。
这个是无需用户干预的,在芯片内部完成的