DS3231 Pinout Questions

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
d9856
 
Posts: 6
Joined: Tue Dec 11, 2018 10:59 am

DS3231 Pinout Questions

Post by d9856 »

I am new to microcontrollers, and I have a question about a setup that I need some assistance with.

I have an ESP32 NodeMCU32s mcu, and it is connected to an RA8875 controller that drives my 2354 7" TFT display. The RA8875 is already connected to the MOSI, MISO, SCK and SS pins and works well. I just received my DS3231 RTC and I see that it uses SCL and SDA pins to connect to the microcontroller. I understand that the board has "a default I2C address of 0x68 and cannot be changed" (https://learn.adafruit.com/adafruit-ds3 ... uino-usage), but also that on Arduino it can be used through the A5 and A4 analog pins. I wanted to confirm that I could use the corresponding analog pins on my board, or if I'm misunderstanding the documentation.

If I cannot use the analog pins, is there a preferred/supported method for connecting this board and possibly sharing the SCL pin? What would I connect the SDA pin to on my mcu?

Thank you.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DS3231 Pinout Questions

Post by adafruit_support_bill »

A4 and A5 double as the SDA and SCL pins only on Atmega 168 and 328 processors such as the Arduino UNO.

To connect an i2c device to your NodeMCU, you need to use the SDA and SCL pins on your NodeMCU. Thee pins can be shared with other i2c devices - provided that each device on the bus has a unique address.

User avatar
d9856
 
Posts: 6
Joined: Tue Dec 11, 2018 10:59 am

Re: DS3231 Pinout Questions

Post by d9856 »

Thank you for getting back to me.
adafruit_support_bill wrote:A4 and A5 double as the SDA and SCL pins only on Atmega 168 and 328 processors such as the Arduino UNO.

To connect an i2c device to your NodeMCU, you need to use the SDA and SCL pins on your NodeMCU. Thee pins can be shared with other i2c devices - provided that each device on the bus has a unique address.
Connecting the module together with the RA8875 to share the MOSI/SDA and SCL pins does not seem to work. The RA8875 continues to work, but when I call `rtc.begin()` I get false back and cannot communicate with the module. I have verified the pins used, and I've even checked the continuity between all modules. What else can I do?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: DS3231 Pinout Questions

Post by adafruit_support_bill »

The ESP32 has multiple i2c interfaces: https://randomnerdtutorials.com/esp32-i ... duino-ide/

User avatar
d9856
 
Posts: 6
Joined: Tue Dec 11, 2018 10:59 am

Re: DS3231 Pinout Questions

Post by d9856 »

adafruit_support_bill wrote:The ESP32 has multiple i2c interfaces: https://randomnerdtutorials.com/esp32-i ... duino-ide/
That seems to have cleared things right up for me and I was able to connect to my module. Thank you for your help and for the resource.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”