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.

[参考译文] CCS/RF430FRL152HEVM:RF430:下拉电阻控制

Guru**** 2478765 points


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

https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/634840/ccs-rf430frl152hevm-rf430-pulldown-resistor-control

器件型号:RF430FRL152HEVM

工具/软件:Code Composer Studio

早上好、

我们使用 RF430FRL152记录压力数据。 我们的目标是使用 AA 碱性电池(1.5V)为其供电、并结合升压(LTC3526)以确保恒定1.5V 输入。

传感器和外部存储器通过倍压器(VDD2X)供电

问题1:

- 您是否有倍压器(VDD2X)的效率图? 这将有助于估算电路的总功耗。

我们的目标是通过 ADC 端口测量电池电量。 电池为 AA 碱性电池(1.5V)、这意味着(在 ADC 的最大范围为0.9V 的情况下)使用分压器。

想法是使用 I/O 的内部下拉 这也将节省我们添加一个 MOSFET、因为我们可以通过将引脚设置为"输入"或"具有下拉的输入"来打开和关闭电路。

---------------------------+AA Battery
              |
              |
              R 35k (= to internal R_pulldown)
              |
Px pin ------| | R_pulldown = 35k | | ----------------------------GND


According to /slau506.pdf chapter 6.3.4 we can easily do this by changing PxREN.x from 0 to 1 (with PxDIR & PxOUT set to 0)


#pragma RETAIN (DigitalSensorInit)    

#pragma CODE_SECTION (DigitalSensorInit, ".fram_driver_code")
void DigitalSensorInit()
{
    P1DIR &= ~BIT0;
    P1REN |= BIT0;
    P1OUT &= ~BIT0;
    P1SEL1 &= ~BIT0;
    P1SEL0 &= ~BIT0;

    return;
}


We tried to run this code on the evaluation board (rf430frl152hevm.However, the measured resistance between the P1.0 and GND stays at infinite, which indicates that the pulldown is not activated.



Questions2:


- do ADC pins also have internal pulldown resistors? If yes we can do everything on that pin, otherwise we will have to use another pin and connect it to the ADC pin.
- is there something wrong in the code?



At the same time we are trying out the ADC measurement of a voltage generated by a power supply, through the evaluation board (rf430frl152hevm) and it's GUI (with TRF7970).

The setup is:

- V_powersupply = 0.46V
- pin = ADC 1/2
- gain = 2
- virtual ground

- measure = 1300h
- value = 0.13V using the formula from slau603b.pdf chapter 2.8.1 for conversion

This value is quite far off the correct value

Questions3:

- did we use the right formula?
- anything else we could have done wrong?
- do we have to subtract virtual ground from the measured value, or is the shown value already corrected?



Thank you very much!

Best

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

    我今天不在办公室、但我将在明天下午回顾您的帖子、然后通过反馈回复您。 很抱歉耽误你的时间。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Tobia、您好!

    感谢您的耐心、以下是我的答案:

    [引用用户="Tobia Wys"]

    问题1:

    -您是否有倍压器(VDD2X)的效率图? 这将有助于估算电路的总功耗。

    [/报价]

    我们没有效率图。 我能提供的最好的解决方案是、在我们的常见问题解答指南(www.ti.com/.../sloa247)的第2.4节中、我们针对 VDD2X 引脚提供了几个基于器件模式的最大电流输出。

    [引用用户="Tobia Wys"]

    问题2:

    - ADC 引脚是否还具有内部下拉电阻器? 如果是、我们可以在该引脚上执行所有操作、否则我们必须使用另一个引脚并将其连接到 ADC 引脚。
    代码中是否有问题?
    [/报价]

    ADC 引脚没有内部下拉电阻器。 这些仅存在于 GPIO 上。

    对于代码设置、请尝试以下操作顺序:

    P1SEL1 &=~BIT0;
    P1SEL0 &=~BIT0;
    P1DIR &=~BIT0;
    P1OUT &=~BIT0;
    P1REN || BIT0; 

    [引用用户="Tobia Wys"]

    问题3:

    我们是否使用了正确的公式?
    ——我们还能做些什么错呢?
    -我们是否必须从测量值中减去虚拟接地,或者显示的值是否已经校正?

    [/报价]

    1) 1)是的、您使用了正确的公式、

    2) 2)在您的情况下、我不会使用2的增益。 只有当您得到的最大结果为0.45或更低时、才应使用2的增益。 您输入的是0.46、因此可能是 ADC 溢出或导致了其他问题、因为它是大于0.9V 的单个。

    3) 3)虚拟接地似乎与仅显示 GND 的原理图不一致。 要使用虚拟接地、您需要将分压器的底部连接到 VSS。 正确使用虚拟接地时、它将正确显示在您收到的值中、无需进行其他计算。