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/MSP430G2102:MSP430G2102 I2C 配置问题

Guru**** 2560080 points
Other Parts Discussed in Thread: MSP430G2102, MSP430F2416

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/601326/ccs-msp430g2102-msp430g2102-i2c-configuration-issue

器件型号:MSP430G2102
主题中讨论的其他器件: MSP430F2416

工具/软件:Code Composer Studio

我正在使用 MSP430G2102、在 CCS 示例 msp430g2xx2_USI_09.c 中、IO 配置为:

P1OUT = 0xC0;// P1.6 & P1.7上拉
P1REN |= 0xC0;// P1.6 & P1.7上拉

我找不到配置 P1SEL 和 P1SEL2寄存器的示例、但在数据表中、我发现:

我应该配置  P1SEL 和 P1SEL2寄存器吗?

我还‘s MSP430x2xx 系列用户指南中的内容:

在 MSP430F261x 和 MSP430F2416/7/8/9的某些 I/O 端口上、启用
在模块功能被选择时(PxSEL = 1)、上拉/下拉电阻器(PxREN = 1)是正确的
不禁用逻辑输出驱动器。 不建议使用这种组合、可能会导致出现这种情况
不需要的电流流过内部电阻器。 请参阅器件专用数据表引脚
原理图以了解更多信息。 '

 该通道没有提到 MSP430G2102、这是否意味 着 MSP430G2102可以 在使能 的上拉电阻器时设置 PxSEL = 1?

如果外部有上拉寄存器、我可以禁用内部上拉寄存器吗?

谢谢!

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

    当 USICTL0寄存器中的 UIPEx 位置位时、将自动生成相应的 P1SELx 设置。 这可以在用户指南的第14.2.1节中看到。 您还可以使用外部上拉电阻器、并根据需要禁用内部电阻器。

    此致、
    Caleb Overbay