TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (387 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 codes)
  5. Bugz Bensce (97 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 (140168 times)
  2. FAT32 Library (72622 times)
  3. Network Ethernet Library (57644 times)
  4. USB Device Library (47957 times)
  5. Network WiFi Library (43553 times)
  6. FT800 Library (42942 times)
  7. GSM click (30140 times)
  8. mikroSDK (28670 times)
  9. PID Library (27057 times)
  10. microSD click (26552 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: 2156 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]

Add Standard bool / true / false to MikroC

0

This is not my library, but a opensource header file that adds boolean datatype to MikroC. Copy this file to the ../Mikroeleckronika/"your ide"/include/ directory. In your project that will use boolean types include this line: #include <stdbool.h>

[Learn More]

DS18X20 One Wire Library

5

Easily add DS18x20 sensor functions to your project.

[Learn More]