TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (393 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (123 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 (140562 times)
  2. FAT32 Library (73065 times)
  3. Network Ethernet Library (58074 times)
  4. USB Device Library (48250 times)
  5. Network WiFi Library (43842 times)
  6. FT800 Library (43327 times)
  7. GSM click (30367 times)
  8. mikroSDK (29004 times)
  9. PID Library (27120 times)
  10. microSD click (26742 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: 2167 times

Not followed.

License: MIT license  

Makes easy addition of ds1307 RTC.

No Abuse Reported
  • 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

Printf Support AVR / ARM

0

Adds printf and sprintf functionality to MikroC. Uses about 1.5k.

[Learn More]

STM DMA Library

15

This is the first of DMA functions that will be available for the ST line of ARM microcontrollers. The idea was born from a forum post. The idea worked so well I made it into a convenient MikroC library. So far.... memory to memory transfers is what is functional

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