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.
DS3231 Pinout Questions
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: DS3231 Pinout Questions
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.
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.
- d9856
- Posts: 6
- Joined: Tue Dec 11, 2018 10:59 am
Re: DS3231 Pinout Questions
Thank you for getting back to me.
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?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.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: DS3231 Pinout Questions
The ESP32 has multiple i2c interfaces: https://randomnerdtutorials.com/esp32-i ... duino-ide/
- d9856
- Posts: 6
- Joined: Tue Dec 11, 2018 10:59 am
Re: DS3231 Pinout Questions
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.adafruit_support_bill wrote:The ESP32 has multiple i2c interfaces: https://randomnerdtutorials.com/esp32-i ... duino-ide/
Please be positive and constructive with your questions and comments.