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.
您好!
我想在我的产品中检索 Fsensor 的价值。
我使用示波器直接从线圈测量 Fsensor、我发现有473、3KHz
当我尝试使用以下公式计算代码中的 Fsensor 时:
我发现:155.875 KHz
当 DATAx = 1585、偏移= 255、频率= 40MHz、FIN_DIV = 1时
如果我使用 LC 电路的正弦公式:f= 1/(2*pi*sqrt (LC)),我也找到了一个接近473KHz 的值。
但是、对于我的数据和偏移值、一切似乎都正常。 当我向线圈表示某种金属时、DATAx 的值会按比例增加。
我的编译代码是:
freqSensor = LoopData[设备][LoopId].Data +(LoopData[设备][LoopId].Offset << 12);//减少除法的影响以避免 freqSensor = 0
freqSensor =(LDC_ChannelFinDivider[器件][LoopId]* F_REF * freqSensor);
freqSensor = freqSensor >> 28;
您能告诉我我是否有一些问题吗?
非常感谢。
此致