TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 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 (136605 times)
  2. FAT32 Library (69807 times)
  3. Network Ethernet Library (55881 times)
  4. USB Device Library (46212 times)
  5. Network WiFi Library (41857 times)
  6. FT800 Library (41067 times)
  7. GSM click (28941 times)
  8. PID Library (26400 times)
  9. mikroSDK (26306 times)
  10. microSD click (25323 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: 2102 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

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]

ST EEPROM Emulation

5

Adaptation of STs' EEPROM Emulator to MikroC.

[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]