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.

[参考译文] UCD3138:有关 UCD3138全桥硬开关开发板固件中的 int handle_Iout_temp_comp (int Iout_adc_count、int temperature)函数的问题

Guru**** 2457760 points
Other Parts Discussed in Thread: UCD3138

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/677089/ucd3138-questions-about-the-int-handle_iout_temp_comp-int-iout_adc_count-int-temperature-function-in-ucd3138-full-bridge-hard-switch-development-board-firmware

器件型号:UCD3138

您好!
我最近学习了 UCD3138全桥硬开关开发板固件
我遇到了问题。
int handle_Iout_temp_comp (int Iout_adc_count、int temperature)函数是否为温度补偿算法? 如果是、是否有描述该算法的应用手册? 我不理解函数的含义。R0_23C  、ADC_COUNT_23C 和 Factor,等常量的含义是什么?它们是如何获得它们的值的?

int handle_Iout_temp_comp (int Iout_adc_count、int 温度)  

instante_reistance = R0_23C -(温度- ADC_COUNT_23C)*系数;//乘以100000
ADC_COUNT_FACT_NEGATIVE =(即时电阻负值<< 10)/ R0_23C;

instante_celse_positive = R0_23C +(温度- ADC_COUNT_23C)*系数;//乘以100000
ADC_COUNT_FACT_POSITIVE_POSITIVE =(即时电阻_正<< 10)/R0_23C;
// instate_阻力= 2720 +(温度- 1041)* 1.22;//乘以100000

返回((Iout_adc_count * adc_count_factor_negative)>>10);
//我们可以稍后切换到多段线性化

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    注释并不完全正确,但它是一种处理整数数学中的小数值的技术。 很明显、如果除法是在不向左移动分子的情况下完成的、结果将太小、无法作为整数进行良好的表示。 因此、我们有效地将该值乘以2、再乘以10、二进制数将为1000000000。

    显然、在乘法结束后、我们有足够大的整数、因此我们将乘法器取回。

    这是处理这种情况的常用方法。 C 编译器确实支持浮点数学、但需要更长时间。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    明白了,谢谢!