Part Number:PGA970
芯片规格书中的描述:
In order to improve the accuracy of the temperature sensor in the 25º to 125ºC range, every device has several unique temperature code values pre-written to the FRAM to specify more-accurate gain and offset values. A signed, 32-bit value for the 25ºC temperature point of this device is located at FRAM address 0x3FFC, and a 32-bit 125ºC temperature point is located at FRAM address 0x3FF4.
With these two temperature code values, the appropriate gain for this range can determined as GAIN = (CODE_125C – CODE_25C) / 100
where
• CODE_125C is the 32-bit FRAM value at 0x3FF4
• CODE_25C is the 32-bit FRAM value at 0x3FFC
From there, the temperature in degrees Celcius can be determined using
T = 25 + (ADC_CODE_READ – CODE_25C) / GAIN
where
• ADC_CODE_READ is the internal temperature ADC reading from S3
根据规格书的说明我读出CODE_25C的值是1921772
CODE_125C的值是2475847
ADC_CODE_READ的值是387229
这样计算的T=-251.9摄氏度,明显是不正常的,用的是内部温度传感器,PTAT增益是1V/V,我不知道该怎么得到准确的温度值?
Kailyn Chen:
您好,ADC_CODE_READ的值没问题吧?我这边再帮您去确认下您的问题。
,
wg j:
ADC_CODE_READ没有问题的,PTAT增益改变后,这个值也会比例变化,
ptat = ADC3_PTAT_DATA;
这是在PGA970FW固件程序里的代码,我没改任何配置的
,
Kailyn Chen:
好的,我已经将您的问题提交到资深工程师那里,可能由于圣诞节的原因回复有些迟。给您带来不便非常抱歉。
,
Kailyn Chen:
您好,抱歉回复晚了, 当使用内部温度传感器时、总增益应设置为 5V/V 、这意味着 S3 和 PTAT 增益组合应等于 5V/V。
元旦快乐