RTL8711am i2c cant use

As shown in the picture, I used the default i2c and the built-in scanning program in the 4.06 version update. I used V-USB to power the i2c device 5V, and there is an AMS1117, 3.3V voltage regulator chip on the iic device demo board, which provides logic level for the i2c. All power supply comes from the micro USB of AMB82, and I connected AMB82 to the computer USB




Wire1 is actually pins 9 and 10, are you connecting to the circled pins 12 and 13?

If you are connecting to the circled pins 12 and 13, please use Wire.begin() instead

Thank you very much for your reply. I misunderstood the scanning routine in version 4.06 and changed it to Wire.begin(). After that, I successfully searched for the i2c device. However, the address seems to be different from what I scanned with Arduino uno. When I scanned with AMB82, it was 0x10, and when I scanned with Arduino uno, it was 0x18. I am curious as to why it is different

屏幕截图 2023-12-06 094722
If ADDR1 is grounded, the address should be 0x20. If ADDR1 is connected to 3.3v, the address should be 0x30. The current connection method is shown in the diagram

Sorry, I have a maximum number of replies. As a new user, I can only edit the previous reply again. I have retested the i2c1 corresponding to pins 9 and 10

I use pins 9 and 10 and Wire1. begin() to scan the address of the i2c device, which is still 0x10

What should be the address of the device?

Resulting in different I2C address might causing by the different version of I2C decoders, Arduino normally using 7-bit decoder thus the address is normally scanning from 1-127, however, there’re also 8-bit and 10-bit decoders being used.

Now, you might need a logic analyzer to check the waveform from your I2C slave responded to know the true address of your device.

Do you mind doing a cross comparison and try to see the address from both UNO board and AMB82-MINI while connecting ADDR1 to HIGH and LOW. Thanks

I use pins 9 and 10 and Wire1. begin() to scan the address of the i2c device, which is still 0x10

The address read by Arduino Uno is still 0x18. Interestingly, when I removed the R4 resistor on the I2c device, Arduino Uno read an address of 0x10, but AMB82 can no longer scan the device. So I was wondering if the address pin of this I2C device adjusted the timing of communication wake-up through a resistor. I found a timing table about this I2C device. The first picture shows the slave mode writing of the i2c device, and the second picture shows the slave mode reading of the i2c device.
1
2

I found the reason. When I removed R5 and pulled up 3.3V from ADDR1, both my uno and AMB82 scanned the same address, 0X18. Although I don’t know why it’s not the default 0x30 address of the i2c device, I think it should be normal. I will try to communicate to see if it is correct.

I realized this issue, actually there is an arithmetic shift to the right here, because the i2c address is only 7 bits, so when my program sets the address to 0x20, 0x20<<1=0x10, and when my program sets the address to 0x30<<1=0x18, the scanned address is the address after the arithmetic shift to the right. Thank you for your reply, thank you!

1 Like