Download Print this page

sparkfun RV-8803 Hook-Up Manual page 12

Real time clock module (qwiic)

Advertisement

With everything connected properly, we're ready to move on to uploading a sketch and start keeping track of time!
RV-8803 Arduino Library
Note: This tutorial assumes you are familiar with Arduino products and you are using the latest stable version of the Arduino IDE on your desktop. If
this is your first time using the Arduino IDE, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino
library, please check out our installation guide.
The easiest way to install the library is to search for SparkFun RV-8803 in the Arduino Library Manager tool. You can also manually install the RV-8803
Library from the GitHub Repository or you can download it by clicking the button below.
Library Functions
The list below outlines all of the functions of the library with some quick descriptions of what they do. The examples cover most of the functions so we
recommend going through those first.
Device Setup & Settings
bool begin(TwoWire &wireport);
- Configures the microcontroller to convert to 12 hour mode.
void set12Hour();
- Configures the microcontroller to not convert from the default 24 hour mode.
void set24Hour();
- Returns true if the microcontroller is configured to 12 hour mode.
bool is12Hour();
- Returns true if the microcontroller is in 12 hour mode and the RTC has an hours value greater than or equal to 12 (Noon).
bool isPM();
char* stringDateUSA();
- Returns the date in the DD/MM/YYYY format.
char* stringDate();
- Returns the time in hh:mm:ss (Adds AM/PM if in 12 hour mode).
char* stringTime();
char* stringTimeStamp();
The format is hh:mm:ss:HHXM with \0 terminator where 'X' is 'A' or 'P' depending on the time of day.
char* stringTime8601();
bool setTime(uint8_t sec, uint8_t min, uint8_t hour, uint8_t date, uint8_t month, uint8_t year, uint8_t day);
registers using a set of individual variables.
bool setTime(uint8_t * time, uint8_t len);
SECONDS, MINUTES, HOURS, WEEKDAY, DATE, MONTH, YEAR}
bool setHundredthsToZero();
RV8803 to set this register to zero. Check out section 4.13 of the RV-8803 Application Manual for more information about this function.
DOWNLOAD THE SPARKFUN RV-8803 LIBRARY (ZIP)
- Initializes the RV-8803 on the I C bus.
- Returns the date in MM/DD/YYYY format.
- Returns the most recent timestamp captured on the EVI pin (if the EVI pin has been configured to capture events).
- Returns timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss).
- Sets the RTC's time registers using an array with the following structure;
- The hundredths register is read only so instead of writing to it, this function uses the Reset Bit Function on the
2
- Sets the RTC's time
{HUNDREDTHS,

Advertisement

loading
Need help?

Need help?

Do you have a question about the RV-8803 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Bob-16281