I want to use the breakout kit 264 ( RTC clock based on chip DS1307 ) with an Arduino Mega. The needed pins from the DS1307 circuit are, in this order: GND, 5V, SDA and SCL ( SQW not used ). In Arduino Mega, SDA pin is 20 and SCL pin is 21. But in order to put the DS1307 circuit attached to the Mega without any addidtional cabling, I need to know if its possible to do the following:
Arduino <--> Adafruit 264
18 TX1 <--> GND (?)
19 RX1 <--> 5V (?)
20 SDA <--> SDA (OK)
21 SCL <--> SCL (OK)
The question is if I can use Arduino pin TX1 (18) as a GND and pin RX1 (19) as a 5V with some code like this one:
Code: Select all
int wgnd = 18;
int w5v = 19;
void setup() {
pinMode(wgnd, OUTPUT);
digitalWrite(wgnd, LOW);
pinMode(w5v, OUTPUT);
digitalWrite(w5v, HIGH);
}
Regards,
Joan