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.

[参考译文] TMS320F28027:代码和 IIC 问题

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1119450/tms320f28027-code-and-iic-issue

器件型号:TMS320F28027

大家好、

以下是客户提出的问题、可能需要您的帮助:

在代码 Example_2802xI2C_EEPROM.c 的 uint16_t I2CA_WriteData (struct I2CMSG *msg)函数中、有以下代码段:  

//设置要发送的数据
I2caRegs.I2CDXR = msg->MemoryHighAddr;
I2caRegs.I2CDXR = msg->MemoryLowAddr;

1) 1)上述代码是否适用于 AT24C02? 上述代码是否适用于 AT24系列的所有 EEPROM 芯片?  

2)写入地址1时、以下内容是否正确编程?  

I2caRegs.I2CDXR = 0;//msg->MemoryHighAddr;
I2caRegs.I2CDXR = 1;//msg->MemoryLowAddr;

3) 3)此外、客户也按照例程进行了读取、但数据全部为0xff。 为什么是这样?

您可以帮助检查此案例吗? 谢谢。

此致、

樱桃