请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:ADS1118 我的客户 在使用将 ADS1118输出转换为电压的代码时遇到问题:
我已经为配置位发送了 ADC 0h0683。 我将使用什么公式将其响应转换为电压?
谢谢
Viktorija
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.
Viktorija,
数据转换在第23页的数据表的数据格式部分进行介绍。
如果配置寄存器为0x0683、则表示满量程范围为±1.024V。 请注意、输出数据以负数的二进制补码表示法表示。 数据转换为:
电压=输出数据* 1.024V/2^15
我将给出两个使用±1.024V FSR 的示例。 首先、如果输出数据为0x3E80:
输出数据= 0x3E80 = 16000
电压= 16000 * 1.024V/32768
电压= 0.5V
第二个使用一个0xE0C0的负数(MSB=1、采用二进制补码表示法):
0xE0C0转换为-8000
电压=-8000 * 1.024 / 32768
电压=-0.25V
吴约瑟