Pins for Real TIme Clock

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jeff009
 
Posts: 48
Joined: Sun Jun 10, 2012 11:54 am

Pins for Real TIme Clock

Post by jeff009 »

I'm working on a project which is using the DS1307 Real Time Clock breakout board kit. I have the SDA hooked up to Analog 4, and SCL hooked up to Analog 5 (just like the instructions state), and it's working fine with my Uno.

My question though, is what if I'm using it with a board which doesn't have A4 and A5, but does have A0 and A1... what sets the RTC to use A4 and A5? I've been reading over RTCLib.cpp and RTClib.h and I don't see how it's being set up to use those pins. Is it possible to set the RTC library to use A0 and A1 instead?

Thanks,

Jeff

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Pins for Real TIme Clock

Post by Franklin97355 »

The clock uses i2c and the Uno brings that out on pins A4 and A5. You need to connect the board to whatever pins on your device communicate with i2c. On some devices you can use any two pins, others have dedicated pins.

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

Return to “Other Products from Adafruit”