Difference between revisions of "Unit DS1307"
Line 409: | Line 409: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 424: | Line 424: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use RTCDeviceStart instead | + | | Not intended to be called directly by applications, use RTCDeviceStart instead. |
|- | |- | ||
|} | |} | ||
Line 436: | Line 436: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use RTCDeviceStop instead | + | | Not intended to be called directly by applications, use RTCDeviceStop instead. |
|- | |- | ||
|} | |} | ||
Line 448: | Line 448: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use RTCDeviceGetTime instead | + | | Not intended to be called directly by applications, use RTCDeviceGetTime instead. |
|- | |- | ||
|} | |} | ||
Line 460: | Line 460: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use RTCDeviceSetTime instead | + | | Not intended to be called directly by applications, use RTCDeviceSetTime instead. |
|- | |- | ||
|} | |} | ||
Line 475: | Line 475: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 487: | Line 487: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 499: | Line 499: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 511: | Line 511: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 523: | Line 523: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 535: | Line 535: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 547: | Line 547: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 559: | Line 559: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 571: | Line 571: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Latest revision as of 04:11, 24 April 2018
Return to Unit Reference
Contents
[hide]Description
Maxim DS1307 Real Time Clock Driver unit
The Maxim DS1307 is an I2C interface, battery backed real time clock chip with full BCD clock and calendar and 56 bytes of software accessible NVRAM. The chip supports 12 or 24 hour format and is widely used in low cost RTC devices available from a range of suppliers.
This driver extends the real time clock API to include functions for directly reading and writing the NVRAM which could be used for storing device specific information and configuration or for non volatile storage of keys, passwords or tokens.
Constants
DS1307_*
DS1307_CHIP_*
DS1307_REG_*
DS1307_REG_*
DS1307_REG_SECONDS_*
DS1307_REG_HOUR_*
MCP794XX_REG_WEEKDAY_*
DS1337_REG_MONTH_*
DS1307_REG_CONTROL_*
DS1337_REG_CONTROL_*
DS1340_REG_CONTROL_*
DS1340_REG_FLAG_*
DS1337_REG_STATUS_*
RX8025_REG_CONTROL1_*
RX8025_REG_CONTROL2_*
Type definitions
DS1307 RTC time
DS1307 RTC device
Public variables
None defined
Function declarations
Initialization functions
DS1307 RTC functions
function DS1307RTCStart(RTC:PRTCDevice):LongWord;
function DS1307RTCStop(RTC:PRTCDevice):LongWord;
function DS1307RTCGetTime(RTC:PRTCDevice):Int64;
function DS1307RTCSetTime(RTC:PRTCDevice; const Time:Int64):Int64;
DS1307 helper functions
function DS1307ReadRTC(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):LongWord;
function DS1307WriteRTC(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):LongWord;
function DS1307ReadNVRAM(RTC:PRTCDevice; Offset:Byte; Buffer:Pointer; Size:LongWord):LongWord;
function DS1307WriteNVRAM(RTC:PRTCDevice; Offset:Byte; Buffer:Pointer; Size:LongWord):LongWord;
function DS1307ReadControl(RTC:PRTCDevice; var Control:Byte):LongWord;
function DS1307WriteControl(RTC:PRTCDevice; Control:Byte):LongWord;
function DS1307DefaultRTCTime(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):Boolean;
function DS1307FileTimeToRTCTime(RTC:PRTCDevice; const FileTime:Int64; Buffer:Pointer; Size:LongWord):Boolean;
function DS1307RTCTimeToFileTime(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord; var FileTime:Int64):Boolean;
Return to Unit Reference