Thread 中讨论的其他器件: SysConfig
您好专家、
我想向您确认、如果当前的 Regisiter 读数为0F FF FC (__LW_AT__这是已向右移动4位的值)、它对应于大电流值或小电流值?谢谢。
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.
你好,Hangjie,
除了 Claus 所说的内容、请查看我们在 SysConfig (https://dev.ti.com/sysconfig/index.html?product=ascstudio)中的代码生成器/示例。
以下是已添加 INA229的项目的链接: https://dev.ti.com/sysconfig/index.html?product=ascstudio&module=/ti/sensors/currentsensor/INA229
为方便起见、下面是 SysConfig 工程中读取当前寄存器、移动数据、调整二进制补码、然后根据 LSB 转换数据的代码部分:
请注意、由于20位数据存储在大于20位的无符号数据类型中、因此以这种方式完成二进制补码的转换。
此致、
Mitch