SparkFun will be closed May 25, 2015 for Memorial Day. Orders placed after 2pm on Friday the 22nd will ship out on Tuesday. Thanks!
Frequently Asked Questions
Mon-Fri, 9am to 5pm
U.S. Mountain Time:
Chat With Us
October 15, 2010
about 4 years ago
For Arduino Uno users -
I have built on the code John Vaughters included in his tutorial (nice job, btw). Created an RTC library and added the class accessors listed below. Plus, I have a test harness that exercises the library. This is a work in progress (still a little rough, a little light on comments), but if you are just getting started with this nice little 1307 breakout board, perhaps my work might be of some use. Plus, I could use the feedback.
void getTimeDate(struct timeDateContainer workingPtr);
void printTimeDate(struct timeDateContainer nowPtr);
void setSeconds(int seconds);
void setMinutes (int minutes);
void setHours (int hours);
void setDayOfWeek (int dayOfWeek);
void setDayOfMonth (int dayOfMonth);
void setMonthOfYear (int monthOfYear);
void setYear (int year);
byte isItAMorPM (void);
void setAmPm (int amPmDesignator);
void set24HourMode (void);
void set12HourMode (void);
void turn1307On (void); - not yet implemented V 4.0
void turn1307Off (void); - ditto
void readMemoryBlock (byte destinationArray,
void clearMemoryBlock (void);
byte bcdToDec(byte val);
byte decToBcd(byte val);
// should be able to use byte instead of unsigned char?
void I2cWriteUtility (unsigned char newValue,
unsigned char dataOffset,
unsigned char dataMask);
unsigned char I2cReadUtility (unsigned char dataOffset);
Forgot your password?
No account? Register one!