TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137036 times)
  2. FAT32 Library (70167 times)
  3. Network Ethernet Library (56037 times)
  4. USB Device Library (46361 times)
  5. Network WiFi Library (41978 times)
  6. FT800 Library (41307 times)
  7. GSM click (29079 times)
  8. mikroSDK (26519 times)
  9. PID Library (26453 times)
  10. microSD click (25449 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Library

RTC 1307 Library

Rating:

10

Author: Richard Lowe

Last Updated: 2013-09-19

Package Version: 1.0.0.0

Category: Timers (Real time clock)

Downloaded: 2106 times

Not followed.

License: MIT license  

Makes easy addition of ds1307 RTC.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "RTC 1307 Library" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "RTC 1307 Library" changes.

Do you want to report abuse regarding "RTC 1307 Library".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Library Blog


Currently only for AVR but ARM coming soon.

Requires: Boolean support found on libstock

Easy access to all RTC functions including RAM read / write as well as RTC output.  Has "daylight savings time" support.  This is the current law for dst, but future revisions will allow for a custom dst if the law were to change.

Several functions exist in this library including GMT HTTP header output for your web server project.

Example:

#include "ds1307.h"
#include <stdbool.h>

#define msg( txt ) UART1_Write_Text( txt )

void main() 
{
   ds1307_config_t rtc;
   rtc.time_zone = -8;
   rtc.dst_enable = TRUE;
   rtc.config = DS1307_SQW_1HZ;
   
   UART1_Init( 38400 );
   Delay_ms( 100 );
   
   ds1307_init( &rtc );
   
   EICRA |= (1<<ISC01) | (1<<ISC00);
   EIMSK |= (1<<INT0);
   SREG_I_bit = 1;
   
}

void rtc_sw_ISR() iv IVT_ADDR_INT0 ics ICS_AUTO {
    msg( ds1307_get_system_time_str() );
    msg( "\r\n" );
}

NOTE* Time is kept in GMT on the hardware.  Local time is supported through "time_zone". 

ALSO FROM THIS AUTHOR

Static Data Structures

5

Add static data structures to your project.

[Learn More]

DS18X20 One Wire Library

5

Easily add DS18x20 sensor functions to your project.

[Learn More]

Task Scheduler

10

This is a light Round Robin style task scheduler. You can define the maximum number of tasks and add those tasks to be ran at scheduled intervals. You will need to provide a clock source.

[Learn More]