MityDSP Documentation Index
tcDspRtcM41T81

Introduction

The tcDspRtcM41T81 class is a real-time clock class used to keep track of time in increments of seconds, minutes, hours, days and years. The M41T81 also has support for hundredths of a second resolution. This class provides functions for converting time formats, as well as getting and setting the current time.

See also:
MityDSP::tcDspRtcM41T81 Class Reference
MityDSP::tcDspI2C Class Reference

Example

This is a simple example of tcDspRtcM41T81 creation and usage:

{
// Assume an I2C object has already been created
// (See DspI2C.h for details).
// Create a tcDspRtc object
tcDspRtcM41T81 clock1(myI2C, I2C_address, 2005);
// Set the time to May 10, 2005 4:30 PM (16:30 in 24-hour time)
clock1.set_time(2005, 5, 10, 16, 30, 0);
// Store the current time in a tsCLTime structure
unsigned short hundredths;
tsCLTime current_time = clock1.get_time(&hundredths);
...
}

  
Generated on Mon Apr 22 2013 11:33:02 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.