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/TMS570LS1224:TMS570LS1224:ADXL345 SPI 陀螺仪传感器

Guru**** 2540720 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/844412/ccs-tms570ls1224-tms570ls1224-adxl345-spi-gyroscope-sensor

器件型号:TMS570LS1224

工具/软件:Code Composer Studio

您好!

我需要有关如何使用 SPI 接口的陀螺仪的帮助、数据表如下: https://www.analogue.com/media/en/technical-documentation/data-sheets/ADXL345.pdf

我的微控制器是 TMS570LS1224

我正在尝试了解如何从该器件读取 X、Y 和 Z 数据。 我将 CS 映射到引脚 J9.3、将 MISO 映射到引脚 J9.7、将 MOSI 映射到引脚 J9.6、将 CLK 映射到 J6.7。




谢谢!

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

    您好!

    TI 不提供 用于 Hercules MCU 和 ADXL345之间通信的驱动程序。 您应该按照器件的数据表编写自己的驱动程序。根据数据表、您可以使用 I2C 和 SPI 接口。 HALCoGen 可为 Hercules MCU 模块生成 API、您可以在遵循 ADXL345数据表的同时使用这些 API。

    MIBSPI1NCS[0]暴露在 J9.3下
    MIBSPI1SIMO 暴露在 J9.6下
    MIBSPI1SOMI 暴露在 J9.7中
    MIBSPI1CLK 暴露在 J6.7中