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.

[参考译文] MSP430FR4133:对于 I2C、UCB0CTL1和 UCB0CTLW0之间的差异

Guru**** 2587365 points
Other Parts Discussed in Thread: MSP430FR4133

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/769629/msp430fr4133-for-i2c-difference-between-ucb0ctl1-and-ucb0ctlw0

器件型号:MSP430FR4133

您好!

我在 msp430fr4133 micro 上使用 I2C 外设。 我看到在一些相关的代码示例中、它们使用寄存器 UCB0CTL1。

但是、在参考手册中、我在 I2C 部分找不到该寄存器-对于该模块、似乎使用了寄存器 UCB0CTLW0。 您是否知道这种情况的原因、以及有何差异?  我应该使用哪个寄存器?

谢谢、

Stu

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

    您好、Stu、

    UCB0CTLW0寄存 器是一个字(16位)可访问寄存器、由2个8位寄存器(UCB0CTL0和 UCB0CTL1)组成。 请参阅以下内容:

    UCB0CTL0对应于 UCB0CTLW0的高8位、 UCB0CTL1对应于 UCB0CTLW0的低8位。

    您可以在 整个代码中使用单个16位寄存器(UCB0CTLW0)、2个8位寄存器(UCB0CTL0和 UCB0CTL1)或这两个寄存器的组合。 所有方法均有效。

    谢谢、

    Mitch