Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
MMA8452QR1 Z軸が動かない NXP MMA8452QR1 加速度センサを使用します。 50台のデバイスを組み立てました。デバイスの 10% で Z 軸が動かなくなっていることがわかります。 読み取った値に変化なし セルフテストモードでは変更されません。 斜めタッピング(Z軸方向)は一時的な修正となる場合がある 一部の「修正済み」のケースでは問題が再発する ところで、このチップを交換するとこの問題は解決します。 何が問題なのか誰か説明できますか? 要素、組み立てプロセス、その他何かありますか? お知らせ下さい。 加速度センサ Re: MMA8452QR1 Z Axis Stuck <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マイケル。 あなたの回答を秘密にしておくために、このスレッドから削除する必要があります。 この障害は通常、衝撃 (高加速度) または振動によって発生しますが、アプリケーション ノートに記載されているすべての要件が満たされている場合は、はんだ付け/組み立て中に発生することはありません。 その他の情報については、不良部品を分析する当社の品質部門(AVNET 経由)にお問い合わせください。 よろしくお願いいたします。 トーマス Re: MMA8452QR1 Z Axis Stuck <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、マイケル。 あなたのアプリケーションについて詳しく教えていただけますか?MMA8452QR1 を静的方向測定のみに使用していますか、それとも機械的な衝撃にさらしていますか? ただし、ユニットが地球の重力にのみさらされているにもかかわらず、Z 軸出力が正確に 0x7FF または 0x800 (+/- フルスケール) を報告している場合、デバイスが Z 軸スティクションの影響を受けている可能性が高くなります。 実際、固着は製造中またはデバイスの使用中に発生する可能性があります。 PCN14989およびPCN15484を見るとわかるように、この障害を解消するためにいくつかの設計上の改善が行われました。これらの改善は、すべての MMA845xQ ファミリ デバイスに有効です。 残念ながら、ユニットに再度衝撃を与える以外に、センサの機能を回復する簡単な方法はありません。 このような問題が発生したお客様は、当社の品質チームおよびカスタマー サービス チームにお問い合わせください。NXP 品質チームは、情報を NXP CQC システムに入力し、適切な品質チームとビジネス ラインの連絡先にルーティングしてサポートを受けます。 よろしくお願いいたします。 トーマス
查看全文
mpc5748g i2c <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは。学習に mpc5748g を使用しています。現在、LM75BD を i2c で操作しようとしていますが、モジュール クロックの選択方法がわかりません。アドバイスをお願いします。 Re: mpc5748g i2c <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hello S32 を使って mpc5748g を勉強しているのですが、uncensorpassword が必要です。しかし、これを取得する方法がわかりません。また、GDB でパスワードを入力する方法もわかりません。詳しく教えてください。ありがとうございます。 Re: mpc5748g i2c <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 アドレス指定に関しては、I2C バス上の LM75B スレーブ アドレスは、デバイス アドレス ピン A2、A1、および A0 に適用されるロジックによって部分的に定義されます。これらは通常、ロジック 0 の場合は GND に、ロジック 1 の場合は VCC に接続されます。 したがって、A0-A2 ピンの構成に基づいて、アドレスは次のように構成されます。 レジスタの書き込みと読み取りの完全なプロトコルは、 データシート の 7.10 章に記載されています。 他にご質問がございましたらお知らせください。 よろしくお願いいたします。 デビッド
查看全文
SPI pins Hi, I need to connect pressure sensor FRDMSTBANBP8XD board to my microcontroller board. So from my understanding, I should use the below pins for SPI connection. J5.4 - SOCI J5.5 - SICO J5.6 - SCLK J5.7 - GND J6.4 - VDD J3.3 - CS/Wakeup Is my understanding correct? Also I couldn't find the INT/RDY pin I should use. Which pin I can use for INT/RDY? Pressure Sensors Re: SPI pins Hello Erika, I understood. Thank you! Re: SPI pins PS enabled pin can be used by the NBPX to turn on the external MCU power supply before triggering an interrupt in case the external MCU remains in off state most of the time. For more details, please see BPMS Product Training slides 25 and 26. Hope this helps. Re: SPI pins Hi Erika, I understood that if we enable PS_ENABLE, then there will be an assertion on PS_ENABLE pin. But I wish to know what is the real advantage of using it. If I detect the assertion on PS_ENABLE pin, what I can do with that? Thanks Re: SPI pins Hello, The notification sequence depends on whether the PS ENABLE feature is enabled or not. Please check AN13882 Host application for NBP devices Section 5.1 Re: SPI pins Hi, Thank you for the support. I have one more query. From the document, I understood that the NBP8 asserts the PS ENABLE pin before generating a pulse on the INT pin if the PS_ENABLE pin is enabled. But I wish to know what is the real benefit of using it. What is the advantage of using it if we are already watching INT pin?  Thanks Re: SPI pins Hello, Thank you for contacting us. Yes, it is correct. For INT/RDY pin you should use J3.6 or J3.8 please refer to user manual table 1. Jumpers and NBP9 Datasheet table 3 and 4.   Updating Media Hope this helps.
查看全文
SPIピン こんにちは、 圧力センサFRDMSTBANP8XDボードをマイクロコントローラボードに接続する必要があります。したがって、私の理解では、SPI 接続には以下のピンを使用する必要があります。 J5.4 - 社会 J5.5 - シコ J5.6 - SCLK J5.7 - GND J6.4 - VDD J3.3 - CS/ウェイクアップ 私の理解は正しいでしょうか?また、使用すべき INT/RDY ピンも見つかりませんでした。INT/RDY に使用できるピンはどれですか? 圧力センサ Re: SPI pins こんにちは、エリカさん 分かりました。ありがとう! Re: SPI pins PS 対応ピンは、外部 MCU がほとんどの時間オフ状態のままである場合に、割り込みをトリガーする前に NBPX によって外部 MCU 電源をオンにするために使用できます。 詳細については、 BPMS 製品トレーニングのスライド 25 および 26 を参照してください。 これがお役に立てば幸いです。 Re: SPI pins こんにちは、エリカさん PS_ENABLE を有効にすると、PS_ENABLE ピンにアサーションが発生することを理解しました。しかし、それを使用することによる本当の利点が何であるかを知りたいのです。PS_ENABLE ピンのアサーションを検出した場合、何ができますか? よろしくお願いします。 Re: SPI pins こんにちは、 通知シーケンスは、PS ENABLE 機能が有効かどうかによって異なります。 AN13882 NBPデバイスのホストアプリケーションセクション5.1を確認してください。 Re: SPI pins こんにちは、 サポートありがとうございます。 もう1つ質問があります。ドキュメントから、PS_ENABLE ピンが有効な場合、NBP8 は INT ピンにパルスを生成する前に PS ENABLE ピンをアサートすることを理解しました。 しかし、それを使用することで実際にどのようなメリットがあるのかを知りたいのです。INT ピンをすでに監視している場合、それを使用する利点は何ですか? よろしくお願いします。 Re: SPI pins こんにちは、 お問い合わせいただきありがとうございます。 はい、その通りです。 INT/RDY ピンの場合は、J3.6 または J3.8 を使用する必要があります。ユーザー マニュアルの表 1、ジャンパーおよびNBP9 データシートの表 3 および 4 を参照してください。   プレスリリース、製品ニュースの更新 これがお役に立てば幸いです。
查看全文
来自 MMA8652FC 的不正确 WHO_AM_I <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好, 我有 2 个模块 - MMA8652FC 和 MMA8653FC(以及 MMA865X) 两个模块上的 WHO_AM_I 寄存器都 = 0x5A,但如数据手册所述,必须为 0x4A 和 0x5A。 此外,SensorToolbox 还在两个模块上显示 MMA8653FC。 谢谢! 米泰克 加速度传感器 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 很高兴听到更换部件后问题得到了解决。 周末愉快,感谢您使用我们的社区。 此致, 托马斯 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,托马斯、 我从飞思卡尔样品 J 中拆焊 E10 和安装 652 现在一切都很完美。 问题已解决。 谢谢! 米泰克 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Mitek、 我们一直在使用的两个 MMA8652FC 加速计(E10 - 你们的,E13 - 我的)似乎都是工程样品。 我建议您点击本网站上的 "样品 "按钮,免费订购 MMA8652FC 样品,然后用这个新部件替换原来的工程样品。 如果您想退回完整的 LFSTBEB865x 套件,请请遵循标准保修政策。 不便之处,敬请原谅。 此致, 托马斯 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 感谢托马斯 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Mitek、 实际上,我的 MA8652FC 加速计标记为 E13(您的是 E10),其 ID 正确(0x4A)。一旦有更多消息,我会尽快回复您。 此致, 托马斯 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ps,不是正确的回放。 你好,托马斯,我为这两个模块制作了缩放照片。 正常的 MMA8652 芯片必须是 652 标记,但该芯片未知。 顺祝商祺! 米泰克 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,托马斯、 我已经添加了序列号,52 和 53 的序列号看起来正常 谨致问候 米泰克 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Mitek、 感谢您提供的屏幕截图。 请通过放大镜查看两台设备的顶部,让我知道你看到了什么。第一个数字是 652(表示 MMA8652FC)、653(MMA8653FC)还是其他? 此致, 托马斯 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,托马斯、 感谢您的回放。 第一个模块 MMA8652FC SN:00847 700-76802_A SCH-76802_A OF:626548 第二模块 MMA8653FC 700-76803_A SCH-76803_A SN:00453 OF:626549 此外,我还在外部处理器上编写了简单的 I2C 程序,并从两个模块的 0D 寄存器中读取 5A 电流。 顺祝商祺! 米泰克 附注此外,您还可以在该屏幕的底部面板上看到一个错误--将 3A 显示为数据和比特状态 Re: Incorrect WHO_AM_I from MMA8652FC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,Mitek、 我刚刚使用传感器工具箱图形用户界面测试了 MMA8652FC 和 MMA8653FC 加速计,正如您在所附文件中看到的,这两个加速计都有正确的 ID(MMA8652FC 为 0x4A,MMA8653FC 为 0x5A)。 能否请您在此发布与我的情况类似的传感器工具箱图形用户界面打印屏幕? 此致, 托马斯
查看全文
MMA8653FCR1とのインターフェース <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 MMA8653FCR1 を I2C 経由でインターフェースしようとしています。モーション割り込みを検出し、INT1 にパルスを出すように MMA を構成する必要があります。同じものの擬似コードは次のとおりです。 1) CTRL_REG1 = 0x00 // MMAをスタンバイモードにする 2) INT_SOURCE = 0x04 // モーション割り込みをアクティブにする 3) XYZ_DATA_CFG = 0x00 // 2gモード 4) FF_MT_CFG = 0xf8 // 3軸すべてのモーション 5) FF_MT_THS = 0x1f //モーションしきい値 6) CTRL_REG3 = 0x0a // アクティブハイでモーションによりコントローラを起動可能 7) CTRL_REG4 = 0x04 //モーション割り込みを有効にする 😎 CTRL_REG5 = 0x02 // INT1の割り込み 9) CTRL_REG1 = 0x01 // MMA アクティブ。 上記のコードを試してみましたが、コントローラの I2C ライブラリは正常に動作しています。しかし、MMAは反応しない。 誰か役に立つリンクまたはサンプルコードを提供してもらえますか。 ありがとうございます シャリン 加速度センサ Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> シャリン、 問題は読み取り機能にあるはずです。 FXOS8700 データシートに記載されているように、I²C 通信は次のルールに従う必要があります。 残念ながら、書き込み操作の最後に停止条件を追加する I2C_MODE_COMPLETE_XFER を使用しています... 最初の転送 (読み取り操作) にはおそらく I2C_MODE_NO_STOP を使用する必要があります。それは次のようになるはずです: uint8_t MMA8653_SingleRead(uint8_t レジスタ) { uint8_t 値; // レジスタアドレスを書き込む I2C_I2CMasterWriteBuf(MMA_ADDR、&レジスタ、1、I2C_MODE_NO_STOP); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT) の場合); // 返された値を読み取る I2C_I2CMasterReadBuf(MMA_ADDR、&value、1、I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_RD_CMPLT) の場合); 戻り値; } でも、それはMCU側のあなたの仕事だと思います。 読み取り機能を正しく動作させても、モーション検出/構成に問題がある場合は私に連絡してください。 アンソニー Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> シャリン、 WHO_AM_I 値を読み取ることができない場合は、センサの設定を中止してください。MMA が正常に動作していることを確認するには、この値を読み取る必要があります。ハードウェアに問題があるのかもしれません....おそらく、I²C 通信が機能しないのでしょう... 回路図を共有して、I²C が正常に動作しているかどうか確認してもらえますか? ちなみに、I2C_Read 関数と I2C_Write 関数を記述することをお勧めします。コードが読みやすくなり、デバッグしやすくなります... void MMA8653_SingleWrite(uint8_t レジスタ、uint8_t 値) { uint8 buffer_i2c2[] = {レジスタ,値}; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT) の場合); } uint8_t MMA8653_SingleRead(uint8_t レジスタ) { uint8_t 値; // レジスタアドレスを書き込む I2C_I2CMasterWriteBuf(MMA_ADDR、&レジスタ、1、I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT) の場合); // 返された値を読み取る I2C_I2CMasterReadBuf(MMA_ADDR、&value、1、I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_RD_CMPLT) の場合); 戻り値; } ありがとうございます アンソニー Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、アンソニー。 上記のご助力に心より感謝いたします。 しかし、いくつかの問題に直面しています。 WHO_AM_I レジスタを読み取ることができません。値は 0x00 になります。 最初に構成されると、MMA8653 はデフォルトで割り込みを発生します (モーションなし)。以下に同じコードを示します。 void MMA8653_init(void) { uint8 buffer_i2c2[2] = {0}; uint8 値 = 0; サイディレイ(3); 整数 i 、 j; buffer_i2c2[0] = M_WHO_AM_I; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、1、I2C_I2C_MODE_COMPLETE_XFER); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {} (void) I2C_I2CMasterReadBuf(MMA_ADDR,&value, 1, \ I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_RD_CMPLT) の場合); value = value; //ここで表示される値は 0x00 です buffer_i2c2[0]=M_CTRL_REG1; buffer_i2c2[1] = 0x00; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_COMPLETE_XFER); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}     buffer_i2c2[0]=M_CTRL_REG2; buffer_i2c2[1] = 0x07; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}     buffer_i2c2[0]=M_CTRL_REG3; buffer_i2c2[1] = 0x08; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}    buffer_i2c2[0]=M_CTRL_REG4; buffer_i2c2[1] = 0x04; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}        buffer_i2c2[0]=M_CTRL_REG5; buffer_i2c2[1] = 0x04; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}     buffer_i2c2[0]=M_FF_MT_CFG; buffer_i2c2[1] = 0x71; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}    buffer_i2c2[0]=M_FF_MT_THS; buffer_i2c2[1] = 0x12; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {}         buffer_i2c2[0]=M_FF_MT_COUNT; buffer_i2c2[1] = 0x00; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {} buffer_i2c2[0] = M_FF_MT_SRC; I2C_I2CMasterWriteBuf(MMA_ADDR、バッファデータ、1、I2C_I2C_MODE_REPEAT_START); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT) の場合); (void) I2C_I2CMasterReadBuf(MMA_ADDR, buffer_data, 1, \ I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_RD_CMPLT) の場合);     buffer_i2c2[0]=M_CTRL_REG1; buffer_i2c2[1] = 0x21; I2C_I2CMasterWriteBuf(MMA_ADDR、buffer_i2c2、2、I2C_I2C_MODE_REPEAT_START); (0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT)) の場合 {} } 私はメインの割り込みもクリアしています。 MMA_intr == 1 の場合         { バッファデータ[0] = M_FF_MT_SRC; I2C_I2CMasterWriteBuf(MMA_ADDR、バッファデータ、1、I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_WR_CMPLT) の場合); (void) I2C_I2CMasterReadBuf(MMA_ADDR, buffer_data, 1, \ I2C_I2C_MODE_COMPLETE_XFER); 0u == (I2C_I2CMasterStatus() & I2C_I2C_MSTAT_RD_CMPLT) の場合); adxl_intr = 0; LED_YELLOW_書き込み(0u);         } 助けてください。 シャリン Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、シャリンさん。 MMA565x モーション検出構成用のコード サンプルをいくつか用意しました。 //////////////////////////////////////////////////////////////////////////////// //! 定義する //////////////////////////////////////////////////////////////////////////////// #MMA8653FC_CTRL_REG1 0x2A を定義します #MMA8653FC_CTRL_REG2 0x2B を定義します #MMA8653FC_CTRL_REG3 0x2C を定義します #MMA8653FC_CTRL_REG4 0x2D を定義します #MMA8653FC_CTRL_REG5 0x2E を定義します #MMA8653FC_FF_MT_CFG 0x15 を定義します #MMA8653FC_FF_MT_SRC 0x16 を定義します #define MMA8653FC_FF_MT_THS 0x17 #MMA8653FC_FF_MT_COUNT 0x18 を定義します #MMA8653FC_WHO_AM_I 0x0D を定義します #MMA8653FC_WHO_AM_I_VAL 0x5A を定義します //////////////////////////////////////////////////////////////////////////////// //! パブリック方法 //////////////////////////////////////////////////////////////////////////////// ブール型 MMA8653FC::init() { ブール __b_result = false; uint8_t __u8_temp; if(bRead(MMA8653FC_WHO_AM_I,&__u8_temp,1)) //センサの存在を確認する if(__u8_temp == MMA8653FC_WHO_AM_I_VAL) //センサIDの回答を確認する if(bWrite(MMA8653FC_CTRL_REG1,0x00)) //スタンバイモード if(bWrite(MMA8653FC_CTRL_REG2,0x07)) //自動スリープ有効/低電力 if(bWrite(MMA8653FC_CTRL_REG3,0x08)) //モーション割り込みからのウェイク / アクティブロー / プッシュプル if(bWrite(MMA8653FC_CTRL_REG4,0x04)) //モーション割り込みを有効にする if(bWrite(MMA8653FC_CTRL_REG5,0x04)) //INT1で割り込み if(bWrite(MMA8653FC_FF_MT_CFG,0x71)) //イベントはラッチされていない/モーション/INT1でX/Y/Z検出を有効にする if(bWrite(MMA8653FC_FF_MT_THS,0x12)) //閾値を1.134gに設定する if(bWrite(MMA8653FC_FF_MT_COUNT,0x00)) //デバウンス回数を設定する if(bWrite(MMA8653FC_CTRL_REG1,0x21)) //ODRを200Hzに設定し、アクティブモードにする { __b_result = 真;     } __b_result を返します。 } ブール型 MMA8653FC::clearINTflag() { uint8_t __u8_result; bRead(MMA8652FC_FF_MT_SRC,&__u8_result,1) を返します。 } ここで、モーションしきい値は 3 軸で 1.134g です。この値は変更できますが、注意してください: 地球の重力は 1g です。感度をさらに高めたい場合は、軸を無効にするか (MR_CFG レジスタ)、Transient&HighPassFilter 機能を備えた MMA8652 を使用する必要があります。 割り込み関数でモーションをキャッチするときは、必ず「clearINTflag()」関数を呼び出して INT フラグをクリアしてください。 例: void OnMotionDetected() { _t_led2 = 0; printf("動きが検出されました!\n"); 待機(0.1); _t_accelerometer.clearINTflag(); _t_led2 = 1;     } int メイン() { _t_pc.ボー(115200); _t_it.fall(&OnMotionDetected); _t_pc.printf("こんにちは"); _t_it.enable_irq(); if(_t_accelerometer.init())     { while(true) { 寝る();         }     } それ以外 { while(true)         { 待つ(0.05); _t_led = !_t_led; 待つ(0.05); _t_led = !_t_led; 待つ(0.05); _t_led = !_t_led; 待つ(1); _t_led = !_t_led; }     } } お役に立てれば幸いです! アンソニー Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> シャリン、 デバイスを構成するための特定の順序はありません。まず MMA をスタンバイ モードにして、すべてのレジスタを設定し、最後にアクティブ モードに切り替えるだけです。実際、レジスタの変更は、MMA がスタンバイ モードからアクティブ モードに移行したときに保存され、有効になります。 ステップ 注 REG 書き込む値 1 MMA8653FCR1 スタンバイモード CTRL_REG1 (0x2A) 0bXXXXXXX0 2 デバイスを構成する .. .. 3 MMA8653FCR1 アクティブモード CTRL_REG1 (0x2A) 0bXXXXXXX1 MMA8653 のモーション割り込みについては、確認する必要があります。私はMMA8652に慣れているので、ハイパスフィルタ機能付きの過渡検出を使えば簡単にモーション検出を有効にできます。残念ながら、MMA8653にはこの機能がないので、可能かどうか調べてみます。 モーション割り込みMMA8653の機能について見ていきます。あなたの側で進展があったら、私に知らせてください。 ありがとうございます アンソニー Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、アンソニー。 早急な返信ありがとうございます。 配線が間違っていましたが、現在はMMA8653と通信できます。 モーション割り込みを設定する方法を教えてください。データシートを読んでレジスタの動作を理解しましたが、MMA をアドレス指定する特定の順序はありますか (スタンバイ モード --> しきい値の設定 --> 割り込みソースの設定... など)。 ありがとうございます シャリン Re: Interfacing MMA8653FCR1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、シャリンさん。 I²C 通信が正常に動作していることを確認する必要があります。デバイス ID (0x5A) を含む WHO_AM_I レジスタ (0x0D) を読み取ることをお勧めします。0x5A が読み取れない場合は、I²C com (プルアップ抵抗がない、周波数が無効) または MMA に問題がある可能性があります。正しい値を読み取った場合、構成の問題である可能性があります。 デバイス ID を読み取って MMA と通信できるかどうかを教えてください。それを確かめたら、次のステップはモーション検出の設定を確認することです。 アンソニー
查看全文
MAG3110のI2Cマネジメント <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、みんな、 MAG3110 の I2Cを 参照する と 次のようになります : SCL および SDA 信号は オープン ドレイン バッファ によって 駆動され ます... この オープンドレイン を どう 処理します か? 誰か 私に 説明して くれませんか ? よろしくお願いします 磁気センサ Re: I2C management of MAG3110 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、トーマス。 もし お時間 があれば 、 MAG3110 について質問 させてください 。 DR_STATUS は 、 更新 、 変更された レコードを 読み取るためだけに 使用し 、 適切 な レジスタ OUT_x_xSB を 読み取る 場合 に 使用します。 必要な 識別子( WHO_AM_I ) は 、 I2C を 配置するための I2C の アドレス指定( 0x0E) には 不十分です か? AC = 1 および TM = 0 が 最良の選択です 。これらは、 レジスタの 更新を 設定するために 使用され 、その後 、 読み取り 時に アルゴリズムで そこに行くことを 決定します... OUT_x_xSB の 値を調整するために レジスタ OFF_x_xSB を定義するにはどうすればよいですか? REG2 が[ RAW] = 0 の場合、 MAG3110 は 修正 なし で OUTx_x_xSB を直接変更する SO、 アルゴリズムには 何も 実装 せず 、 OUT を 読み取る だけ ですか? 周波数 CTRL_REG1 を どのように設定すればよいですか? よろしくお願いします、 ニキ Re: I2C management of MAG3110 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ニキさん いいえ、バスの速度ではありません。バス クロックから I²C クロックまでのクロック速度を分割するプリスケーラがあります (MAG3110 は最大 400kHz の I²C 速度を受け入れます)。 たとえば、プロセッサ Expert を使用している場合は、I²C 分周レジスタを設定することでバス周波数を変更できます。 アンソニー Re: I2C management of MAG3110 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ニキさん K10 RMについては、セクション44.3.2でI2C 周波数分周レジスタ (I2Cx_F)、I2Cx_F レジスタには 2 つのフィールドがあります。 - MULT --> バス クロックの分周係数を設定します。この MULT = 0b00 のままにすると、内部周波数 = バス クロックになります。 - ICR --> この値は SCL 分周器の値を示します。ICR値に対応するSCL値はセクション44.4.1.10で確認できます。I2C 分周器と値の保持。 I 2 C ボーレートを決定する式は次のとおりです。 I 2 Cボーレート = バス速度(Hz)/(mul × SCL分周器) SCL 周波数を 100 kHz に設定する例を次に示します。 バス速度(Hz) = 48 MHz = 48 000 000 Hz mul = 1 SCL分周器 = 480 (ICR = 0x27、表44.41を参照) 式に値を適用すると、次のようになります。 48 000 000 / (1 * 480) = 100 000 Hz = 100 kHz この情報がお役に立つことを願っております。そうでない場合は、 Kinetis の専門家にお問い合わせください。 よろしくお願いいたします。 トーマス Re: I2C management of MAG3110 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> はい 、 わかりました。 別のもの を思いつきました 。 返信 ありがとうございます 。 話は変わりますが 、 MK10DN512ZVLL10 に 接続する 必要があります 。 いくつか疑問 があります が、現在 主 なものは I2C レジスタ 周波数 分周器 レジスタ( I2Cx_F) の 定義 です 。 バスクロックのデフォルトは 48 MHzです。これはバスの速度ですか? 他のパラメータを 正しく 定義するにはどうすればいいでしょうか? Re: I2C management of MAG3110 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、ニキさん 何を知りたいのかよく分かりません。質問を言い換えるか、詳細を追加していただけますか? MAG3110FC は、標準モードと高速モードの両方で NXP I 2 C 仕様 ( UM10204 ) に準拠しています。これはオープン ドレイン通信規格であり、 MAG3110FC データシート の図 4 に示すように、通信を可能にするために I 2 C ラインから電源にコネクテッドされたプルアップ抵抗を必要とします。プルアップ抵抗は、オープンドレインインターフェースによってラインが低く駆動されていないときに、ラインを高く引き上げます。 お役に立てれば幸いです。 よろしくお願いいたします。 トーマス 追伸: 私の回答が質問の解決に役立った場合は、「正解」とマークしてください。ありがとう。
查看全文
rdkl25agmp01-error <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 这个错误发生在插入 RDKL25AGMP01 板后我在运行 freedom sensor Toolbox 时。我还更新了 Windows 10 所需的引导加载程序版本和其他基本软件。系统正在检测设备,文件夹也即将到来。但是在运行应用程序时出现错误。固件未成功下载。我还安装了两次应用程序。但再次出现同样的错误。请帮忙。 Re: RDKL25AGMP01-ERROR <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,尼拉杰 首先,请接受我对延迟回复的歉意。我在休假,刚回来。 您尝试过以管理员身份安装 SW 吗?我从这里 下载了工具,安装和卸载了两次,似乎一切正常。 另请参阅指南第 2 节和第 7 节https://www.nxp.com/docs/en/user-guide/STBCEUG.pdf 关于 LabVIEW 运行时引擎,我认为它不是你图片上显示的那个。 基本上,该工具在安装时会生成一个名为 Dependencies 的文件夹,其中保存了 LabVIEW 和 VISA 运行时引擎。安装后是否能看到该文件夹?它不在为 Freedom 传感器工具箱指定的文件夹中(我的文件夹位于下载文件夹中)。 祝你愉快 Paulina Re: RDKL25AGMP01-ERROR <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 我在 Windows 7 上也试过,但出现了同样的问题。请告诉我如何安装 labview_run_time_engine2017(32 位)。因为当我运行从给定链接下载的 ni-labview.exe 时,文件管理器中出现了许多下载选项。再次下载所有选项后,Freedom Sensor Tool Box 出现了 labView Runtime 2017 (32 位) 尚未下载的错误。之后 我下载了以下 labview_run_time_engine。 Re: RDKL25AGMP01-ERROR <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,尼拉杰 不管怎样,你有Windows 7电脑可以试试这个板吗?原因是它是为该版本而非 Windows 10 设计的。我们有更新 OpenSDA 固件的变通方法,但仍可能出现问题。 对于由此造成的不便,我深表歉意。如果你能在另一台电脑上尝试,请告诉我,然后再从那里开始。 祝您愉快 Paulina
查看全文
MMA8451 motion and transient detection Hi.  It is posible to configure MMA8451 to detect motion and transient simultaneously? I can configure MMA8451 to motion detection or transient but if i configure both and assing interrupt to int1 and int2, it doesn't work. Thanks in anticipation! Accelerometers Re: MMA8451 motion and transient detection Hello Tadeusz, It is not possible to use the motion and the transient detection functions together. However, the transient detection and the motion detection functions are similar except that in the transient detection the high-pass filtered data is compared. There is an option to disable the high-pass filter (0x1D: TRANSIENT_CFG register), in which case the behavior of the transient function will be the same as the motion detection allowing to have two motion detection functions. For this, please check section 6.5 of the datasheet and application note AN4071. I hope this information can be helpful. Have a great day, Paulina ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
查看全文
MPXY8300 DEMO FUNCTION who have the MPXY8300  firmware routines??I can not find it at www.nxp.com.     Re: MPXY8300 DEMO FUNCTION Hi, I know what you said,Maybe I do not express it clearly.I talk about the Firmware Function,e.g REIMS_RESET() and REIMS_ACITD()( refer to the attached MPXY8300RM, page 36).How can I use and define it?Can you help me?Thanks! Re: MPXY8300 DEMO FUNCTION Hi, Please refer to the attached MPXY8300RM, page 39. Best regards, Tomas
查看全文
MPX2450GP 问题 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 尊敬的, 客户现在使用 MPX2450GP,手册中标注的最大耐压值为 250kpa。 客户希望确认以下部分: 1.在不损坏的情况下,2450 的最大耐电压是多少? 2。当瞬时压力达到 400 kPa 时,它会影响设备未来的工作吗? 多谢! Re: MPX2450GP Problem <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,莱曼、 首先,您说的是 MPX4250,对吗? 1.电压还是压力?最大供电电压为 5.35V。 MPX4250 能够感应的压力范围为 0-250kPa,MPX4250 在不损坏的情况下可以承受的最大压力为 1000kPa。 2.2.如果低于允许的最大压力(1000kPa),输出就会在最大值约 4.9V 时达到饱和。 顺祝商祺! 托马斯 PS:如果此答案有助于解决您的问题,请标记为"正确" 或 "有帮助"。谢谢。
查看全文
MPX2450GP Problem Dears, Customers use MPX2450GP now,The maximum pressure endurance value nominated in the manual is 250kpa.  Customers want to confirm below part: 1.What is the maximum withstanding voltage of 2450 without damage?  2. Will it affect the future work of the device when the instantaneous pressure reaches 400 kPa ? Many tks! Re: MPX2450GP Problem Hi Lyman, First, you are talking about the MPX4250, correct? 1. Voltage or pressure? The maximum supply voltage is 5.35V. The pressure range the MPX4250 is able to sense is 0 - 250kPa and the maximum pressure the MPX4250 can be exposed to without being damaged is 1000kPa. 2. No. It is below the maximum allowed pressure (1000kPa), the output will just be saturated at its maximum value of about 4.9V. Best regards, Tomas PS: If this answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.
查看全文
F_STATUSレジスタの異常な動作 FXOS8700C <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 FXOS を FIFO モードで使用する場合、ウォーターマーク割り込みが設定されていると FIFO が読み取られます。私が見ている問題は、レジスタがウォーターマーク割り込み 0x54 を示しているものの、最初の 3 つのサンプル (0x01 - 0x06) を読み取った後、自動増分が 0x00 に戻り、今度は F_STATUS が 0xFF を読み取り、同じ読み取りで確認された他の値は 0x08、0x0D などであることです。 データの読み間違いでない限り、何かが間違っているようです。F_STATUS レジスタは最初の読み取り後には何も判読できず、XYZ 軸のデータは 0g、0g、1g になるはずですが、代わりに次のデータが表示されています。 X - 0x0000、0xF8FF... Y - 0xFFBC、0xE40F... Z - 0x0FA0、0xC400... そのうち最初の値だけが意味を成します。この問題に関してご助力いただければ幸いです。 よろしくお願いします。 K 加速度センサ 磁気センサ Re: Odd behaviour with F_STATUS register FXOS8700C <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、カスさん。 別のThreadの私の回答を参照してください - FXOS8700データは非常にノイズが多いようです よろしくお願いいたします。 トーマス Re: Odd behaviour with F_STATUS register FXOS8700C <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、トーマス。 私は mbed を使用してコードを書いています。要求に応じて、すべてのコードを以下に含めました。 ありがたいことに カス #include "mbed.h" #include "SDFileSystem.h" //FXOS8700CQ #FXOS_ADDRESS_W 0x3C を定義します #FXOS_ADDRESS_R 0x3D を定義します #FXOS_STATUS 0x00 を定義します #FXOS_OUT_X_MSB 0x01 を定義する #FXOS_F_SETUP 0x09 を定義します #FXOS_TRIG_CFG 0x0A を定義します #FXOS_SYS_MOD 0x0B を定義します #FXOS_INT_SOURCE 0x0C を定義します #FXOS_WHO_AM_I 0x0D を定義します #FXOS_ID 0xC7 を定義する #FXOS_XYZ_DATA_CFG 0x0E を定義します #FXOS_TRANSIENT_CFG 0x1D を定義します #FXOS_TRANSIENT_SRC 0x1E を定義します #FXOS_ASLP_COUNT 0x29 を定義します #FXOS_CTRL_REG_1 0x2A を定義します #FXOS_CTRL_REG_2 0x2B を定義します #FXOS_CTRL_REG_3 0x2C を定義します #FXOS_CTRL_REG_4 0x2D を定義します #FXOS_CTRL_REG_5 0x2E を定義します #FXOS_OFF_X 0x2F を定義します #FXOS_OFF_Y 0x30 を定義します #定義 FXOS_OFF_Z 0x31 #FXOS_TEMP 0x51 を定義します #FXOS_M_CTRL_REG_1 0x5B を定義します #FXOS_M_CTRL_REG_2 0x5C を定義します #FXOS_M_CTRL_REG_3 0x5D を定義します //FXAS21002C #FXAS_ADDRESS_W 0x40 を定義する #FXAS_ADDRESS_R 0x41 を定義します #FXAS_STATUS 0x00 を定義する #FXAS_OUT_X_MSB 0x01 を定義する #FXAS_F_SETUP 0x09 を定義します #FXAS_F_EVENT 0x0A を定義します #FXAS_INT_SRC_FLAG 0x0B を定義します #FXAS_WHO_AM_I 0x0C を定義します #FXAS_ID 0xD7 を定義する #FXAS_CTRL_REG_0 0x0D を定義します #FXAS_RT_CFG 0x0E を定義します #FXAS_TEMP 0x12 を定義する #FXAS_CTRL_REG_1 0x13 を定義します #FXAS_CTRL_REG_2 0x14 を定義する #FXAS_CTRL_REG_3 0x15 を定義する //グローバル変数 FXAS_FIFO_FULL_FLAG を 0 に設定します。 FXOS_FIFO_FULL_FLAG を 0 に設定します。 char fxos_data_1[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0、 ... char fxas_data_1[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、 0、0、0、0、 0、 ... //PCへのUARTの設定 シリアルPC(USBTX、USBRX) //I2Cのセットアップ I2Cセンサ(PTE0、PTE1) //FXOS8700C 制御ピン 割り込みfxos_int1_8700(PTD4); //INT1-8700 割り込みfxos_int2_8700(PTA4); //INT2-8700 //FXAS21002C 制御ピン 割り込みfxas_int1_21002(PTA5); //INT1-21002 割り込みfxas_int2_21002(PTA13); //INT2-21002 //SDファイルシステム SDファイルシステムsd(PTD2、PTD3、PTD1、PTD0、"sd"); ////LEDセットアップ DigitalOut led_1(LED1, 1); //赤 DigitalOut led_2(LED2, 1); //緑 //DigitalOut led_3(LED3, 1); //blue <- 注意!! SDFileSystem ではうまく動作しません //********************************************************************// //関数 int i2c_write(char アドレス, char デバイスレジスタ, char データ){ センサを起動します。 センサ.write((char)address); センサ.write((char)device_register); センサ.write((char)data); センサ.stop(); 0を返します。 } int i2c_write(char アドレス, char デバイスレジスタ, int 停止){ センサを起動します。 センサ.write((char)address); センサ.write((char)device_register); if(stop == 1){ センサ.stop();     } 0を返します。 } char i2c_read(char アドレス, char デバイスレジスタ){ 文字データ;     センサを起動します。 センサ.write(アドレス); センサ.write(デバイスレジスタ); センサを起動します。 センサ.write(アドレス| 0x01); データ = (char)センサ.read(0); センサ.stop(); データを返します。 } int i2c_write_verify(char アドレス, char デバイスレジスタ, char データ){ char 戻りデータ; 戻り値:     センサを起動します。 センサ.write((char)address); センサ.write((char)device_register); センサ.write((char)data); センサ.stop();     センサを起動します。 センサ.write(アドレス); センサ.write(デバイスレジスタ); センサを起動します。 センサ.write(アドレス| 0x01); return_data = センサ.read(0); センサ.stop();     if (return_data == data){ 戻り値 = 0;     } それ以外{ 戻り値 = -1;     } return_val を返します。 } int fxas_init() { 戻り値 = 0; 整数センサーID = 0; センサーID = i2c_read(FXAS_ADDRESS_W、FXAS_WHO_AM_I); // pc.printf("期待されるFXAS21002C からの ID は 0xD7 です\n\r"); // pc.printf("返された値: %X\n\n\r", sensor_id);     (センサーID == FXAS_ID)の場合{ 戻り値 = 0; return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_CTRL_REG_1、0x00); return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_F_SETUP、0x00); return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_F_SETUP、0x54); return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_CTRL_REG_0、0x03);         return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_CTRL_REG_2、0xC2); return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_CTRL_REG_3、0x00); return_val += i2c_write_verify(FXAS_ADDRESS_W、FXAS_CTRL_REG_1、0x13);     } それ以外{ 戻り値 = -1; } return_val を返します。 }     int fxos_init() { 戻り値 = 0; 整数センサーID = 0;      センサーID = i2c_read(FXOS_ADDRESS_W、FXOS_WHO_AM_I); // pc.printf("期待されるFXOS8700CQからのIDは0xC7です\n\r"); // pc.printf("返された値: %X\n\n\r", sensor_id);     (センサーID == FXOS_ID)の場合{ 戻り値 = 0; return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_CTRL_REG_1、0x00); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_F_SETUP、0x00); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_F_SETUP、0x54); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_ASLP_COUNT、0xFF); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_XYZ_DATA_CFG、0x02); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_CTRL_REG_2、0x00); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_CTRL_REG_3、0x02); return_val += i2c_write_verify(FXOS_ADDRESS_W, FXOS_CTRL_REG_4, 0x41); //FIFOとDRDY割り込みを有効にする return_val += i2c_write_verify(FXOS_ADDRESS_W, FXOS_CTRL_REG_5, 0x40); //FIFO -> Int_1、DRDY -> Imt_2 return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_M_CTRL_REG_1、0x00); return_val += i2c_write_verify(FXOS_ADDRESS_W、FXOS_CTRL_REG_1、0x21);     } それ以外{ 戻り値 = -1;     } return_val を返します。 } //FXAS21002 INT_1 の割り込み void read_fxas_data(){ // //FXAS21002センサからデータを読み取る FXAS_FIFO_FULL_FLAG != 2 の場合{ FXAS_FIFO_FULL_FLAG = 1;     } } //FXOS8700S INT_1の割り込み void read_fxos_data(){ //FXOS8700Cセンサからデータを読み取る FXOS_FIFO_FULL_FLAG != 2 の場合{ FXOS_FIFO_FULL_FLAG = 1;     } } int main() { int 初期化 = 0; 整数インデックス = 0; 整数テストインデックス = 0; int fxos_data_flag_1 = 0; int fxas_data_flag_1 = 0;     //割り込みを設定する fxas_int1_21002.rise(&read_fxas_data);//FIFO -> Int_1 // fxas_int2_21002.rise(&read_fxas_data);//DRDY -> Int_2 fxos_int1_8700.rise(&read_fxos_data);//FIFO -> Int_1 // fxos_int2_8700.rise(&read_fxos_data);//DRDY-> 整数2     センサ.周波数(450000); pc.ボー(115200); mkdir("/sd/sensor_data", 0777); ファイル *fp = fopen("/sd/sensor_data/data.txt","w"); if(fp == NULL) { error("書き込み用にファイルを開けませんでした\n");     } fprintf(fp, "ジャイロ X,\tジャイロ Y,\tジャイロ Z,\t\tAcc X,\tACC Y,\tACC Z\n\r\n\r\n\r\n\r"); fclose(fp);     //FXOS8700CQ加速度計とFXAS21002Cジャイロスコープを初期化する 初期化 = fxas_init() & fxos_init(); // pc.printf("返された値: %d\n\n\r", 初期化済み); while(1) { (FXOS_FIFO_FULL_FLAG == 1)の場合{//0.976mg* (fxos_data >> 2) = 合計g力(8gスケール) FXOS_FIFO_FULL_FLAG = 0; i2c_write(FXOS_ADDRESS_W, FXOS_STATUS, 0); センサ.read(FXOS_ADDRESS_R, fxos_data_1, 139, false);// パスごとにステータスレジスタを読み取ります 0x06 -> 0x00 fxos_data_flag_1 = 1;         }         (FXAS_FIFO_FULL_FLAG == 1)の場合{//7.8125mdps* fxas_data = 1秒あたりの総度数(250dpsスケール) FXAS_FIFO_FULL_FLAG = 0; i2c_write(FXAS_ADDRESS_W, FXAS_STATUS, 0); センサ.read(FXAS_ADDRESS_R, fxas_data_1, 139, false);// ステータスレジスタを最初に読み取ります。それ以外の場合は 0x06 -> 0x01 です。 fxas_data_flag_1 = 1;         }                 if ((fxos_data_flag_1 == 1) && (fxas_data_flag_1 == 1)){ //SDカードにデータを保存する if (test_index == 0){// <--------- 適切なファイルクローズシステムが実装されるまで fp = fopen("/sd/sensor_data/data.txt",「あ」); if(fp == NULL) { error("書き込み用にファイルを開けませんでした\n"); }             }             (インデックス = 0; インデックス < 139; インデックス += 7){ //データをSDカードに移動する fprintf(fp, " %d\t% d\t%d\t\t", ((int16_t)((fxos_data_1[(インデックス + 1)] << 😎 | fxos_data_1[(インデックス + 2)]) >> 2), ((int16_t)((fxos_data_1[(インデックス + 3)] << 😎 | fxos_data_1[(インデックス + 4)]) >> 2)、 ((int16_t)((fxos_data_1[(インデックス + 5)] << 😎 | fxos_data_1[(インデックス + 6)]) >> 2));                     fprintf(fp, " %d\t% d\t%d\n\r\n\r", ((int16_t)((fxas_data_1[(インデックス + 1)] << 😎 | fxas_data_1[(インデックス + 2)])), ((int16_t)((fxas_data_1[(インデックス + 3)] << 😎 | fxas_data_1[(インデックス + 4)])), ((int16_t)((fxas_data_1[(インデックス + 5)] << 😎 | fxas_data_1[(インデックス + 6)])));             }             fxos_data_flag_1 = 0; fxas_data_flag_1 = 0; テストインデックス++; // fprintf(fp, "\n\r\n\r\n\r\n\r\n\r\n\r"); if (test_index == 30){// <--------- 適切なファイルクローズシステムが実装されるまで fclose(fp); テストインデックス = 0;;             } (int i = 0; i < 139; i++){ fxos_data_1[i] = 0; fxas_data_1[i] = 0;             } } Re: Odd behaviour with F_STATUS register FXOS8700C <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、カスさん。 ソースコード全体をここに投稿していただき、確認して設定を再現していただけますでしょうか? その間、いくつかのコード例を含むAN4073をご覧になることをお勧めします。 よろしくお願いいたします。 トーマス
查看全文
FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? I want to determine the direction of the north pole by using an FXOS8700CQ in an object that cannot easily be rotated in 360 degrees (pitch or roll- but can in yaw). Is there a way to calibrate the device without rotating it in 360 (pitch and roll)? I am thinking that the only solution is to just determine the hard iron offset by rotating the PCB the sensor is on, and just using that as a hard coded offset. I see that the magnetic min and max registers are not writeable, so presumably enabling autocalibration would just instantly overwrite my initial M_OFF offset values. It's frustrating that a simple magnetic compass doesn't have as much of a problem finding north as an electronic device does. Thanks, Ted Accelerometers Magnetic Sensors Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Thanks for the code and all your help Anthony. Ted Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hello Ted, I attached source codes for Hard-Iron calculation. I think I replied to your questions, please , send me a mail if you have questions on it. Thanks, Anthony Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? i don't have the time to dedicate to it now, and the 3 point calibration method would take some time to implement and test with perhaps less than very useful results- I don't know it's not super critical that the robot is able to track the yaw of each segment right now so I will put your advice onto the back of my thought-screen to ruminate on and perhaps re-visit in the future. Thanks, Ted Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Yes I know. Use the 3 points calibrations I called "MCU algorithm based on "circle fitting". Please send me an email (anthony.duhamel at nxp.com) Anthony Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Thanks Anthony, I have the Hard iron offset working- from the appnote- but my concern is that, unlike a mechanical compass, I need to rotate the device 360+360 degrees before I get accurate readings. Ted Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hi Ted, By the way, the FXOS8700CQ accelerometer is needed to "put" the magnetometer data into the Earth plan. I mean, if the magnetometer is on "the Earth plan" the reference to compute the orientation you use the formula:                                                                  orientation(rad) =  atan(-By_calibrated/Bx_calibrated) If the magnetometer is tilted, you have to use the accelerometer data as an inclinometer to tilt back Bx/By/Bz (magnetometer data) into the normalized Bx/By plan. I think you can begin with that, implanting hard-iron correction plus accelerator/magnetometer fusion and checking the results. Have a good day Anthony ----------------------------------------------------------------------------------------------------------------------- Note: If this post answers your question, please click the Correct Answer button. Thank you! ----------------------------------------------------------------------------------------------------------------------- Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Thanks for all that info Anthony- I think you may be correct on your view that trying to determine the yaw on various robot segments might need some other solution than an electronic magnetometer- maybe something more like an mechanical compass IC. Ultimately I may just use the robots cameras to determine the orientation of each segment- but somehow humans have a sense of the yaw of each of our own segments- so perhaps there is a more practical solution to determining the yaw of each segment- the pitch and roll are just very easy to determine from the accelerometer- but yaw is tougher. Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hello Ted, Calibration results depend on what  you are expecting for. I mean, what is the final goal? Do you want to know the position for example of the robot arms compare to the North Pole? If it is, here some avenues for implantation & hard iron corrections: Calibrate the Hard-Iron offset FXOS8700CQ Autocalibration: Autocalibration feature implemented in the FXOS8700CQ will not work totally, let me explain why: I picture the calibration used on only magnetometer 1-axis, but it is applicable to the three one. If you rotate the magnetometer over 360°, you catch the real Min/Max, so it's working well: Let re-use the same calibration algorithm but by rotating the magnetometer by 100°: Here the calibration brings an important offset error and will degrade the final measurement. MCU algorithm based on a hard iron average: You will have the same issue as above, it should not work... MCU algorithm based on "circle fitting": An other method consists to observe the data in a 2D plan. I mean in X/Y or X/Z or Y/Z. With basic trigonometric equation, you can easily estimate the "circle" center which matched to the offet of 2axis. This algorithm works with only three points and doesn't necessitate to perform a 360° rotation. To get the 3D hardiron, you repeat again the operation on an other plan. Note that this algorithm works only if the soft-iron distortion is small ( if not it's not a circle anymore but an ellipse). Calibrate the Hard-Iron, but what else? Regarding you application, calibrate the magnetometer with Hard-iron can be not enough accurate. You can also work on the Soft-Iron distortions, but I'm not sure it is possible. By the way, as the robot has a lot of moving parts, I'm not sure Hard-Iron&Soft-Iron will solve all heading errors. As the Earth magnetic field is very tinny, the motion and rotation of all the robot parts will probably bring a lot of magnetic disruptions. It is a very tricky application! Maybe it is better to use the magnetometer with a magnet for example to make a magnetic rotary encoder or otherwise. Hope my explanations will help. Thanks, Anthony Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hi Anthony, My application is a humanoid robot and the FXOS8700CQ is in each joint of the robot. Mostly Roll and pitch are not possible, but yaw is- although it requires the robot to be turned around on power up which I am hoping would not be necessary. Is even just moving the robot 360 degrees in yaw enough? Isn't another 360 of pitch or roll necessary for the device's autocalibration to be accurate? What about me just recording what the average hard iron offset is, and just writing it there, and going without autocalibration? Would that make the device at least as accurate as a regular magnetic compass? In particular, the device will not be moving in pitch and roll too much anyway- being in each segment of a two leg, two arm robot. Thanks, Ted Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hello Ted, If you want the self-calibration works well, you need to rotate the board by 360° (full revolution). It is the only way for the auto-calibration feature to get the correct min/max values. What is your board rotation abilities? (through Yaw axis) You can also embed the an homemade calibration into a Mcu. This is more flexible, and several calibration processing could work in your case. Can you share more about your constraints & objectives? An other question, if your degrees of freedom are pitch and roll, does it male sense to get the orientation (I mean if yaw can't rotate). Can you clarify? Thanks, Anthony Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Thanks Jose. So are you saying that the hard iron autocalibration of the FXOS8700CQ will work instantly- and doesn't require the device to be initially rotated in order for the device to get a full sense of the magnet field around it relative to its orientation? Re: FXOS8700CQ: Is there any solution for calibrating hard iron offset when the device cannot be rotated very much? Hi Ted, Correct, FXOS8700CQ provides an auto-calibration function that calculates the hard-iron estimate (calibration) and automatically subtracts it (compensation) from the current magnetic-field readings. For platforms where hard-iron interference is the primary source of error, and soft-iron distortion is minimal or non-existent, the auto-calibration function can serve as the magnetic-calibration algorithm for the system. Using the Auto-calibration process, you can avoid the rotating calibration. However, it is important to understand the effects of avoiding soft-iron calibration since it can affect the compass heading angle error if not kept at minimum, please find more details in the application note AN4459 There is also an example code that you can use for the auto-calibration process, you can download it from here. Have a great day, Jose ----------------------------------------------------------------------------------------------------------------------- Note: If this post answers your question, please click the Correct Answer button. Thank you! -----------------------------------------------------------------------------------------------------------------------
查看全文
CDKツール出力フレームに関連する こんにちは、NXPチームの皆様、 TPMS RFアプリケーションでは、トランスミッタとしてNXP NTM88 ICを使用し、レシーバとしてNXP lizard V2ボードを使用しています。 添付画像について質問があります 1) コードでペイロードの長さを18に変更したのに、まだ12と表示されます。なぜでしょうか?あるいは、CDKツールでは12が別の意味を持つのでしょうか? 2) z Coolum のデータが 80 と C0 であるのは何ですか?書き込み値 80 または C0 とは何ですか? どうか私を助けてください タンクと敬意を込めて、 プラナフ・トナペ    圧力センサ Re: related to CDK tool output frame こんにちは、プラナフさん。 1. 列 H のデータは 16 進数で表示されますか、それとも 10 進数で表示されますか?0x12 = 18 だからです。したがって、データが 16 進数で表示される場合は、ペイロードの長さは 18 バイトになります。 2. これらはコード違反ビットです。これらはAN13717で説明されています。 BR、トーマス
查看全文
MPX5999D Does the output current of the  MPX5999D  affect the long-term stability of the sensor? Now the maximum output current(Io+) in our product is 0.2 mA。 Pressure Sensors Re: MPX5999D Dear Li Sun, we don't have records regarding the higher, than typical output current affecting the long term stability.  I could only suggest you to decrease load on the Vout pin, which should decrease the output current. With Best Regards, Jozef
查看全文
NTM88 传感器数据? 您好, 我们使用 CC2640R2F(BLE)通过 SPI 接口读取 NTM88。初步细节请见本帖。 https://community.nxp.com/t5/Sensors/Not-able-to-get-correct-sensor-data-from-NTM88/td-p/1453940 我们使用 Genfsk_beacons_demo_ntm88_KW38 作为参考。 当我调试"NTM88_GenFSK_Beacons" 时,TPMS ID 和传感器数据被保存在这个数组中。 /* 填充数据数组*/ gau8DataArray[u8index++] = gau8TpmsId[0]; gau8DataArray[u8index++] = gau8TpmsId[1]; gau8DataArray[u8index++] = gau8TpmsId[2]; gau8DataArray[u8index++] = gau8TpmsId[3]; gau8DataArray[u8index++] = gau8TpmsId[4]; gau8DataArray[u8index++] = gau8TpmsId[5]; gau8DataArray[u8index++] = (UINT8)(gu16CompPressure>> 8); gau8DataArray[u8index++] = (UINT8)(gu16CompPressure); gau8DataArray[u8index++] = (UINT8)(gu16CompAccelZ>> 8); gau8DataArray[u8index++] = (UINT8)(gu16CompAccelZ); gau8DataArray[u8index++] = (UINT8)(gu16CompAccelX>> 8); gau8DataArray[u8index++] = (UINT8)(gu16CompAccelX); gau8DataArray[u8index++] = gu8CompVolt; gau8DataArray[u8index++] = gu8CompTemp; 通过调试,这是 NTM88 的传感器数据。 这与 CC2640R2(BLE)通过 SPI 接口接收到的数据相同。我将输出结果打印到 Tera Term 中。 为什么 NTM88 的电压和温度读数都是 1?补偿压力、acc z 和 accx 是否正确?抱歉,上面的 ACC Y 应该是 ACC X。 此外,如何将传感器的原始数据正确转换为适当的单位(psi、g、volts 和 Celsius)。 此致, 马可 Re: NTM88 Sensor Data? 您好,托马斯, ,有办法在其中写入半真系数吗? 这样我们就能从传感器读取一些真实的数值,用于开发目的(不一定要准确)。 BR, Joey Re: NTM88 Sensor Data? 谢谢你一步一步地教我。工作起来得心应手!感谢社区和成员为我提供的解决方案。 MGS.Marriott.com Re: NTM88 Sensor Data? 嗨,托马斯、 我确实点击了 “擦除整个设备” 1x。我读过的用户指南中没有任何内容说不要单击 “擦除整个设备”。 此致, 马可 Re: NTM88 Sensor Data? 你好,马克尔、 SPI 通信似乎进展顺利:存储在阵列中的数据与主机 MCU 端读取的数据完全相同。 所有传感器数据均为下溢或溢出,且 TPMS ID 均为 0xFF,这表明微调部分(从 0xFD40 到 0xFDFF)已被擦除。在这种情况下,没有恢复芯片的解决方案,因为每台设备的微调系数都是唯一的(因此它们无法从一台设备复制到另一台设备)。 如果执行批量擦除,例如,使用 Flash 编程器工具单击 “擦除整个设备” 按钮(以下屏幕截图上带有红叉的按钮,摘自 CW 用户指南),则会擦除修剪部分: 微调系数只影响传感器的测量结果,其余功能仍然有效。因此,该芯片可用于通信、握手等工作。但要获得有效的传感器测量结果,还需要一个新的芯片。 有关传感器测量的更多信息,请参阅下面的应用说明: https://www.nxp.com/webapp/Download?colCode=AN13614 顺祝商祺! 托马斯
查看全文
MPX5700APの精度性能について MPX5700APの精度が基準を満たしているかどうか、またテスト回路について何か良い提案があるかどうか(現在の回路がテストに悪影響を与えているかどうか)は分かりません。     精度は?必要に応じて必要なコンデンサを接続しました。 私の質問に答えていただき、ありがとうございます。 圧力センサ Re: Regarding the accuracy performance of MPX5700AP わかりました。サンプルをPCBボードに移動してテストします。ご返信ありがとうございます。 Re: Regarding the accuracy performance of MPX5700AP 仕様はある程度正確なので、PCB ボード上でテストを実行するのが最適です。 Re: Regarding the accuracy performance of MPX5700AP こんにちは。製品の仕様書には記載されていない出力誤差についてお伺いしたいのですが、使用方法の改善が必要でしょうか。弊社では圧力センサー製品を製造しております。 Re: Regarding the accuracy performance of MPX5700AP 私の将来の卒業プロジェクトでは、圧力関連のセンサーを使用する予定です。 Re: Regarding the accuracy performance of MPX5700AP いいえ、まだ学生です。先生にこの商品について学ぶように言われました。 Re: Regarding the accuracy performance of MPX5700AP あなたの会社は競合相手ですか?
查看全文
MMA8452 I2C communication error,not ACK? stm32F103+MMA8452+MAG3110. I2Cspeed:100KHz MAG3110 offen work well. MMA8452: send start,wait SB flag,OK.send DevicAddr,wait AddFlag,OK.send data(8 bit register address),not a ACK. 1.the communication often error,once error the communication not longer work well,send start,wait SB flag,OK.send DevicAddr,wait AddFlag,OK.send data(8 bit register address),not a ACK. 2.if I erase stm32F103 program and power down about 1 minute ,then power up and program stm32F103,the MMA8452 will communication again until next time error. why? 3.If I only power down stm32F103 about 1 minute ,then power up,the MMA8452 will not communication again.send start,wait SB flag,OK.send DevicAddr,wait AddFlag,OK.send data(8 bit register address),not a ACK. why? Accelerometers Re: MMA8452 I2C communication error,not ACK? Why do you say MAG3110 OFTEN work? RE:MAG3110 have not communication error before MMA8452 error. Could you please share your Schematics? RE: Re: MMA8452 I2C communication error,not ACK? Hi Jifa He, This is the first time I heard about the MMA8452 i2c bus collision. Can you give me the name of your company? Can you identify if the problem is temperature related? Why do you say MAG3110 OFTEN work? I would need more details about it to try to identify the source of the problem. Could you please share your Schematics? Have you tried to power down the Veyron device, and clear the i2c bus? Is the timing for signal set right? Regards, Jose Re: MMA8452 I2C communication error,not ACK? At this point all I can do is commiserate!  We have just about the same issue using an MMA8450 on an OMAP (1.8V I/O).  When these parts are powered-up between 30 and 50C the initial communication-write will NOT ACK, and the same for attempts thereafter.  IF the part was outside that range at power-up and for the initial communication, further communication seems to proceed just fine irrespective of the part temperature.
查看全文
How i remove drift of accelerometer Hello, I am working on project with using acclerometer MMA8451 and gyroscope. I need measure vertikal position of general movement with maximal velocity to 10m/s in path to 2m. I have problem with removal drift ( after integration) of accelerometer. It exist any other technique except use Kalman filters? I dont use ZUPT algorithm - detection zero velocity. The drift of gyroscope is possible remove in complementary filter (gyro + acc) only in slow motion. Can You help me? What should be process calculation? Very thanks! SensorFusion Re: How i remove drift of accelerometer Javier, Correct.  Don't use the internal low-pass & high-pass filters.  it's better if the Kalman filter deals with the raw signals.  the FXAS21002_Initialization structure in sensorfusion/sources/driver_FXAS21002.c is documented with register settings that we used. Regards, Mike Re: How i remove drift of accelerometer Mike, Then, you do not recommend to make use of the internal filter functions in the sensors when using NXP fusion library? FXAS21002 has an Internal low-pass & high-pass filters with programmable cut-off frequency. How are the sensor filters preset in the evaluation kit? regards, Re: How i remove drift of accelerometer Thank You very much for answers. I know already, that i need to use Kalman filter. Re: How i remove drift of accelerometer J.P. You misunderstand.   The one-time calibration of the accels does a nice job of subtracting out offsets.  You should not have to constantly update the offset values.  You DO have to update the magnetic calibration, but that function is already included in our fusion library. Neither of the above addresses random noise.  There's nothing you can do about that other than apply a low pass filter.  If you are using our fusion library, you should NOT do that.  We already include a low pass filter into the eCompass algorithm, and the Kalman filter already assumes random noise in the input (in fact, Kalman mathematics depend upon it).  As noted elsewhere, I am not a believer in pure (unassisted) inertial navigation using commercial grade sensors.  The calculations WILL blow up, it's just a question of when. Mike Re: How i remove drift of accelerometer Thank you for response. It means that i must constanty correct unstable bias (subtraction right value of g)? Bias is random value. I tried use hipass filter (MATLAB), but my motion is in very low frequencies. Filter was useless. I must  reducte drift  likely with absolute sensors as magnetometer, but it is difficult calculation. Regards, Juraj. Re: How i remove drift of accelerometer We don't usually see noticeable drift in our accelerometers.  We do see post-board mount offsets.  These can be corrected using the precision accelerometer trim function in the Version 7.00 sensor fusion library.  I suggest you read section 2.8 (Inertial navigation - truth or fiction?) in the Version 7.00 User Guide.  You can download this from nxp.com/sensorfusion. Regards, Mike
查看全文