# RTL8711am i2c cant use

**URL:** <https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846>\
**Category:** Peripherals\
**Tags:** evb-amb82\
**Created:** [May 8, 2023, 12:48pm UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846 "2023-05-08T12:48:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![qweqwewq](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/qweqwewq/32/1422_2.png) [@qweqwewq](https://forum.amebaiot.com/u/qweqwewq)\
**Post date:** [May 8, 2023, 12:48pm UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/1 "2023-05-08T12:48:58Z")

</div>

Hello, recently I’ve encountered an issue with a development board called DSI5168 made by a small Taiwanese manufacturer. This board is developed using Rtl8711am. I wanted to connect a sensor using the i2c protocol and while testing some i2c functions, the Serial port showed that the sensor was not connected. Therefore, I tried using an i2c scanner to test without a sensor connected and it showed a lot of devices. I’m not sure if it’s a software issue, but I’ve heard that the wire.h file may have some problems. I have attached my i2c scanner file and a screenshot of the Serial port. Can anyone help me with this?  
[i2c\_scanner.zip](https://forum.amebaiot.com/uploads/short-url/nuEVRWMRudm5O6QiOdFCuD0dAd7.zip) (826 位元組)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/e/e1939575476b915fe40a7c4005d3e9247d19a3e5.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/5/5625a3c415c8f444043838df9e1f3bcdf77743ac.png)

Sorry, I am a beginner using development boards and I am not sure if the SDK refers to the library of my Ameba development board. Nevertheless, I am attaching the URL and version.

URL：[https://raw.githubusercontent.com/Ameba8195/Arduino/master/release/package\_realtek.com\_ameba\_index.json](https://raw.githubusercontent.com/Ameba8195/Arduino/master/release/package_realtek.com_ameba_index.json)

version：2.0.6

I2C sensor CCS811\_Air\_Quality code ：  
[Example1\_BasicReadings.zip](https://forum.amebaiot.com/uploads/short-url/bXaIrdwgVuHcwL4pxT7q8gmHXOq.zip) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [May 9, 2023, 1:57am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/2 "2023-05-09T01:57:24Z")

</div>

Hi @qweqwewq ，

Welcome to AmebaIoT Forum. 😀

I have noticed that you are using Ameba1(RTL8195AM/RTL8711AM/RTL8710AF) Arduino Environment. Therefore, please specify the Arduino SDK version and the example name that you are running. It will be easier for us to help with reproducing your issue.

Thank you

---

<div class="post-metadata">

**Author:** ![qweqwewq](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/qweqwewq/32/1422_2.png) [@qweqwewq](https://forum.amebaiot.com/u/qweqwewq)\
**Post date:** [May 9, 2023, 5:51am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/3 "2023-05-09T05:51:38Z")

</div>

Hi @dakamaster , thank you for getting back to me. I have an update and I am attaching the URL and version of my development board library, although I am not sure if it is what you need.

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [May 15, 2023, 3:43am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/4 "2023-05-15T03:43:43Z")

</div>

Hi @qweqwewq ,

Sorry, I am not able to test the code you provided on the i2c scanner since I don’t have the CCS811 Air Quality sensor. However, I have double-checked I2C examples [Ameba Arduino: [RTL8195AM] [RTL8710AF] I2C - Display data on LCD screen](https://www.amebaiot.com/en/ameba-arduino-i2c-lcd/) on my Ameba1 (RTL8195AM), and it is working as normal. This means the I2C driver for Ameba1 is functioning well.

 ![MicrosoftTeams-image (1)](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/5/5e39da23a61286b285e6a17aa8c0dcb9a1121961.jpeg)

I have doubted that the root cause of your issue is because you using the SDK from a non-official platform. The SDK that I am using is downloaded from [GitHub amb1\_arduino](https://github.com/ambiot/amb1_arduino) `v2.0.12`. Which is different from the Arduino Preference URL you provided. Therefore, you can either follow:

1. GitHub [Readme](https://github.com/ambiot/amb1_arduino/blob/dev/README.TXT) to update your SDK;  
or
2. Read through the Ameba1 [Getting Start](https://www.amebaiot.com/en/ameba-arduino-getting-started/) guide on our official website.

Thank you!

---

<div class="post-metadata">

**Author:** ![qweqwewq](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/qweqwewq/32/1422_2.png) [@qweqwewq](https://forum.amebaiot.com/u/qweqwewq)\
**Post date:** [May 23, 2023, 5:25am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/5 "2023-05-23T05:25:35Z")

</div>

Hi, @dakamaster! Thank you for your response. Now,I can use the I2C sensor, but I’m still unable to use the I2C scanner code. I’m really wondering why the I2C scanner code detects multiple devices even when I don’t have any sensor connected to the Ameba board. Could you please help me figure out why this is happening?

Note: I have already upgraded to the latest SDK.

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 4:20am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/6 "2023-12-05T04:20:04Z")

</div>

I find the same thing too 😣I used amb82 mini,then,i found this

 ![屏幕截图 2023-12-05 122600](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/6/60a5cd2a58eaa0000c009dddd8629cec660babed.png)

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 5:59am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/7 "2023-12-05T05:59:24Z")

</div>

I try to test,but this problem stll there

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [December 5, 2023, 6:46am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/8 "2023-12-05T06:46:50Z")

</div>

Hi @ren_yucheng,

May I know what issue are you exactly facing? I2C Scanner should be working now in 4.0.6 pre-release.

Can you screenshot the error?

Thank you.

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 7:23am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/9 "2023-12-05T07:23:00Z")

</div>

I am using the amb82mini in the Arduino environment, and the new version does not encounter situations where the device is not mounted but the address can be scanned, but my I2c device cannot be recognized. I use Arduino Uno to scan the same I2c device, and the address can be quickly scanned. My I2c address is 0X18

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [December 5, 2023, 7:45am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/10 "2023-12-05T07:45:37Z")

</div>

Hi @ren_yucheng, may I know what I2C device are you using and can I see the output on your serial monitor?

Thank you.

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 7:51am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/11 "2023-12-05T07:51:45Z")

</div>

I have obtained a stepper motor driver chip for MS32007, which has a demo board. Both SDL and SDA have done 3.3V pull-up, and the pull-up resistance is 4.7K  
 ![屏幕截图 2023-12-05 155010](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/f/f6f87458dd29ac0b21e1d764face3611a3c6efa4.png)

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 7:54am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/12 "2023-12-05T07:54:48Z")

</div>

I can use Uno to scan this stepper motor driver chip, and use Arduino’s i2c scanning routine to quickly discover the address。Perhaps it’s because this MS32007 has a 7-bit chip address plus 1 bit read or write, totaling 8 bits?

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 8:15am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/13 "2023-12-05T08:15:30Z")

</div>

The serial monitor keeps showing no address found

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [December 5, 2023, 8:20am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/14 "2023-12-05T08:20:55Z")

</div>

Is it possible if you try to capture the data from the logic analyzer? Currently we do not have this MS32007 to reproduce the issue. This I2C device may not be compatible with our board yet. Right now, we have been testing with LCD device ([I2C Module for Character LCD](https://sg.cytron.io/p-i2c-module-for-character-lcd?r=1&gclid=Cj0KCQiAsburBhCIARIsAExmsu6ICozmA80_2xkIby9oXvHp1zH2v75k9udRi3v9WQx24uV93AdycL0aArJOEALw_wcB)) and its able to trace the address accurately.

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [December 5, 2023, 8:27am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/15 "2023-12-05T08:27:02Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/9/9643656a286ca69bb38bf9c7f7660fa2d362d2ef.png)  
This is the written data for 1 address scanning.

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 10:24am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/16 "2023-12-05T10:24:04Z")

</div>

I replaced the CW2015 battery meter chip, and the Arduino Uno can scan it, but the amb82mini still cannot scan it with the latest 4.0.6 version, and the serial port keeps showing “No I2C devices found”

---

<div class="post-metadata">

**Author:** ![ren\_yucheng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ren_yucheng/32/1799_2.png) [@ren\_yucheng](https://forum.amebaiot.com/u/ren_yucheng)\
**Post date:** [December 5, 2023, 10:41am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/17 "2023-12-05T10:41:13Z")

</div>

![屏幕截图 2023-12-05 183649](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/9/90da1730ad153411743971a2a1492e414bd0e0da.png)  
There seems to be a switch here, so I need specific operations, right？

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [December 6, 2023, 12:48am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/18 "2023-12-06T00:48:32Z")

</div>

Hi @ren_yucheng ,  
Actually, the AMB82-MINI I2C supporting 10-bit I2C decoding. I think the address might not be the root cause for your case.

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [December 6, 2023, 12:51am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/19 "2023-12-06T00:51:12Z")

</div>

May I know which group of I2C pins that you are using currently. For example, please remember to check whether you are using Wire.begin() or Wire1.begin()?  
What’s more, it’s better to provide a photo of the physical connection of your hardware settings to aids us troubleshooting for you.  
Thanks

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [December 6, 2023, 12:53am UTC](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846/20 "2023-12-06T00:53:56Z")

</div>

For the testing setup I was using, simply just connect SDA, SCL to the dedicated I2C group selected, then connected power and ground. There is nothing that I have done with those switches.  
Thanks

[Next page](https://forum.amebaiot.com/t/rtl8711am-i2c-cant-use/1846.md?page=2)
