Member #156578

Member Since: October 15, 2010

Country: United States

  • 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
    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);
    bool is12HourModeEnabled(void);
    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[],
    byte numberOfBytes,
    byte startingOffset);
    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);