Community Translation - Changing CapSense Widget Sensitivity/Finger Capacitance During Run Time - KBA222623

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

Hi,

I would like to translate KBA222623 into Japanese.

Thanks,

Kenshow


Original KBA:

Changing CapSense Widget Sensitivity/Finger Capacitance During Run Time - KBA222623

Translated by Kenshow

==============================

タイトル: 実行時のCapSenseウィジェットの感度/指の静電容量の変更 - KBA222623

バージョン:**

質問:

CapSense®コンポーネントバージョン3.0以降でSmartSenseのautotuneモードが使用されている場合、ファームウェアを通じてウィジェットの感度または指の静電容量を動的に変更するにはどうすればよろしいでしょうか?

回答:

次の手順に従って、ファームウェアを通じてウィジェットの感度または指の静電容量を動的に変更します。

1.コンポーネントでSmartSense  autotuneモードが有効になっていることを確認します。これを行うには、次の手順を実行します。

a. トップデザインのCapSenseコンポーネントを右クリックし、[ configure ]をクリックしてCapSenseコンポーネントコンフィグレーションウィンドウを開きます。

b. [ Baseic ]タブに移動します。CSD tuningモードのドロップダウンリストからSmartSenseFull Auto-Tune)を選択します。このドロップダウンリストは、少なくとも1つのウィジェットが追加されている場合にのみ有効になります。

1.png

2. main.cファイルで、コンポーネント開始するAPI CapSense_Start()の後に次のAPIを呼び出します。

CapSense_SetParam (uint32 paramId, uint32 value)

このAPIの引数として次のパラメータを使用します。

  • paramId – CapSense_Button0_FINGER_CAP_PARAM_ID

paramIdでウィジェット名Button0が使用されていることに注意してください。CapSenseコンポーネントは、各ウィジェットのparamIdを生成します。

  • value – 新しい指の静電容量値、20の倍数

100は0.1 pFの指の静電容量に対応し、120は0.12 pFの指の静電容量に対応します。

SmartSense(Full Auto-Tune)モードでの指の静電容量の範囲は0.1 pF〜1 pFです。

3.コンポーネントを再度起動して、新しいFinger Capacitance値を有効にします。エンドアプリケーションに応じてCapSenseウィジェットをスキャンして処理します。

main.cのコード例は次のとおりです。

#include "project.h"

#define BUTTON0_FINGER_CAPACITANCE  (100u) /* 単位 - フェムトファラッド */

int main(void)

{

  CyGlobalIntEnable; /* グローバル割り込みを有効にします */

CapSense_Start(); /* CapSenseコンポーネントを開始します */

/* 指の静電容量の値を変更するAPI */

CapSense_SetParam (CapSense_BUTTON0_FINGER_CAP_PARAM_ID, BUTTON0_FINGER_CAPACITANCE);

CapSense_Start();

CapSense_ScanAllWidgets();

 

for(;;)

{

  if(!CapSense_IsBusy())

  {

    CapSense_ProcessAllWidgets();

  }

    CapSense_ScanAllWidgets();

  }

}

==============================

7-May-2020

  Kenshow

0 Likes
1 Reply
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello, Kenshow-san

We receive your translation, it will be published to KBA to Community.

After upload, You will receive the points as the word of KBA.

Due to the current delay of internal review, Please bear with me for the delayed the response.

It could be delayed, but it will be processed soon.

Thanks for your contribution to CDC!

Will keep you update the status.

Thanks,

Jenna Jo

Jenna Jo
0 Likes