RTC SD2405 I2C and LCD1602 RGB conflict on I2C ?

Hello.

I have a strange phenomenon concerning I2C bus modules.

Modules: RTC SD2405 I2C and LCD1602 RGB

I'm trying to display text on an this LCD. It works fine until I use the RTC module. Then it starts endlessly displaying the last letter of the text.

(Everything from one company DFRobot , i belive it should work together)

The simplified code looks like this:

#include "GravityRtc.h"

#include "Wire.h"

#include "DFRobot_RGBLCD1602.h"

GravityRtc rtc; // Init RTC

DFRobot_RGBLCD1602 lcd(/*RGBAddr*/0x2D ,/*lcdCols*/16,/*lcdRows*/2); //16 characters and 2 lines of show


void setup() {

Serial.begin(9600);

rtc.setup();

lcd.init();

lcd.setRGB(111,254,244);

lcd.print("Texting");

}

void loop() {

rtc.read();

Serial.print(" Hour = "); // godzina

Serial.print(rtc.hour);

Serial.print(" Minute = "); // minuta

Serial.print(rtc.minute);

Serial.print(" Second = "); // sekunda

Serial.println(rtc.second);

}

Connections as in the picture:

Thank you for any help.

There's no printing to the LCD in this code except for "Texting" in Setup.

DFRobot LCD with RGB Backlight: https://www.dfrobot.com/product-1609.html
That is confusing, the display has a RGB_address and a I2C_address.
The RGB_address depends on the module:

       Moudule        | Version| RGBAddr|
-----------------------------------------
  LCD1602 Module      |  V1.0  | 0x60   |
  LCD1602 Module      |  V1.1  | 0x6B   |
  LCD1602 RGB Module  |  V1.0  | 0x60   |
  LCD1602 RGB Module  |  V2.0  | 0x2D   |

The I2C_address seems to be fixed to 0x3E: https://github.com/DFRobot/DFRobot_RGBLCD1602/blob/master/DFRobot_RGBLCD1602.h#L24


The DFRobot RTC module: https://wiki.dfrobot.com/Gravity__I2C_SD2405_RTC_Module_SKU__DFR0469
It's I2C address seems to be fixed to 0x32: https://github.com/DFRobot/Gravity-I2C-SD2405-RTC-Module/blob/master/GravityRtc/GravityRtc.h#L25


Things to do:

  1. Please split the wires. The flat ribbon cable has 4 wires to each other. Split those wires please.
  2. Run a I2C Scanner sketch with nothing connected, then with only the RTC connected, then with only the display connected, then with both.

Thank you for your willingness to help.

  1. When I scan only RTC :
    I2C device found at address 0x32
    When I scan only LCD :
    I2C device found at address 0x2D
    I2C device found at address 0x3E

When I scan two I got 3 adresses.
I2C device found at address 0x2D
I2C device found at address 0x32
I2C device found at address 0x3E

So, LCD use 2 adresses ? maybe.

But , Now I see one more thing.
I I disconect modul of RTC , its the sam.
It looks like there is indeed a software problem.
it endlessly displaying the last letter of the text too.

Maybe problem in library from DTRobot ?

If I comment this line :
//rtc.read();
LCD start work properly. (RTC of course not.)

Hi, @coltex
Welcome to the forum.

Have you tested the RTC on its own, with its own code?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

Hello,
I use libraries from DFRobot - vendor of LCD and RTC.

I just try with other library from DFRobot - "DFRobot_LCD.h" but the same efect.
Problem is in software, I can disconnect RTC - its the same.

Characters on display LCD appear in every cycle of this line :

rtc.read();

I have no idea why.

Besides this RTC work properly.

The RTC library interferes with the operation of the LCD module.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.