飞思卡尔 KL25Z ADC数据位疑问
时间:10-02
整理:3721RD
点击:
在ADC章节中ADCx_Rn寄存器中有这样的描述:sign-extended 2's complement这是什么意思啊?在11bit差分模式下ADC转换的结果怎样计算?
这个问题用户手册讲的很清楚:
Unused bits in R n are cleared in unsigned right-justified modes and carry the sign bit
(MSB) in sign-extended 2's complement modes. For example, when configured for 10-bit
single-ended mode, D[15:10] are cleared. When configured for 11-bit differential mode,
D[15:10] carry the sign bit, that is, bit 10 extended through bit 15.
如果是11位差分,结果是2进制补码,D10是符号位。
差分信号时,2进制扩展有符号数,11位分辨率时,转换结果的D[15:10]都是符号位