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]
Rating:
Author: Ebrahim Rahmanian
Last Updated: 2018-12-19
Package Version: 1.0.0.0
Category: Timers (Real time clock)
Downloaded: 418 times
Not followed.
License: MIT license
:)
Do you want to subscribe in order to receive notifications regarding "Library All in One - 32 function and sub , RTC ds1307 1307 in Mikroc ARM Stm32 :) (with SoftwareI2c and HardwareI2c Lib)" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Library All in One - 32 function and sub , RTC ds1307 1307 in Mikroc ARM Stm32 :) (with SoftwareI2c and HardwareI2c Lib)" changes.
Do you want to report abuse regarding "Library All in One - 32 function and sub , RTC ds1307 1307 in Mikroc ARM Stm32 :) (with SoftwareI2c and HardwareI2c Lib)".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1545254011_library_all_in_o_mikroc_arm.rar [8.48KB] | mikroC PRO for ARM |
|
//+==========================================================================+
//|1.edit "Defult software I2c Config" code in "Ds1307Mikroc.c" |
//|2.include "Ds1307Mikroc.h" in project |
//|3.call "DS1307_I2C_Init()" |
//|4.if is first Run ds1307 then call "Ds1307_play()" |
//|5.Enjoy! |
//|==========================================================================|
//|Mana Research Group© [MRG] |
//|Simple lib for RTC Ds1307 Software I2c Mode |
//|ver : 950201_2 (2016/1/20) |
//|Ebrahim Rahmanian www.Mikroc.ir |
//+==========================================================================+
//==========================================================
//Init Hardware_i2c
void DS1307_I2C_Init();
//==========================================================
//==========================================================
////Hardware I2C stop
//void DS1307_I2C_Stop();
//==========================================================
//==========================================================
//If return 0 then ds1307 is Pause
//If return 1 then ds1307 is Play
char Ds1307_is_play0_pause1();
//==========================================================
//==========================================================
//Play ds1307
//if is first Run ds1307 then call Ds1307_play()
void Ds1307_play();
//==========================================================
//==========================================================
//Pause ds1307 time counter
void Ds1307_pause();
//==========================================================
//==========================================================
//Set second
//Second_0_59 = 0 … 59
void Ds1307_set_second(char Second_0_59);
//==========================================================
//==========================================================
//Get second
//Return 0…59
char Ds1307_get_second_0_59();
//==========================================================
//==========================================================
//Set minuite
//Minute_0_59 = 0…59
void Ds1307_set_minute(char Minute_0_59);
//==========================================================
//==========================================================
//Get minute
//Return 0…59
char Ds1307_get_minute_0_59();
//==========================================================
//==========================================================
//If ds1307 is 24h mode then
//Return 0 and ds1307 is 12h mode return 1
char Ds1307_is_24h_0_12h_1_mode();
//==========================================================
//==========================================================
//Set ds1307 to 24h or 12h mode:
//If _24h_0_12h_1=0 then 24h mode
//Else if _24h_0_12h_1=1 then 12h mode
void Ds1307_set_24h_or_12h_mode(char _24h_0_12h_1);
//==========================================================
//==========================================================
//If time is am then return 0
//If time is pm then return 1
//This Function worked in 24h and 12h mode.
char Ds1307_is_pm_1_am_0();
//==========================================================
//==========================================================
//Get Hour
//Return 0…23
//This Function worked in 24h and 12h mode.
char Ds1307_get_hour_0_23();
//==========================================================
//==========================================================
//Get Hour
//Return 0…12
//If is 0:00Am retrun 0
//Then is 12:00pm Return 12
//And otherwise is 1…11
//This Function worked in 24h and 12h mode.
char Ds1307_get_hour_0_12();
//==========================================================
//==========================================================
//Set Hour
//Hour_0_23 = 0…23
//This Function worked in 24h and 12h mode.
void Ds1307_set_hour_0_23(char Hour_0_23 );
//==========================================================
//==========================================================
//Set Hour
//Hour_0_12 = 0…12
//Am0_pm1 = 0 or 1
//0 is AM and 1 is Pm
//This Function worked in 24h and 12h mode.
void Ds1307_set_hour_0_12(char Hour_0_12, char Am0_pm1 );
//==========================================================
//==========================================================
//Get Day of Week
//Return 1…7
//1 is first day of week and 7 is Last day of week.
char Ds1307_get_dayofweek_1_7();
//==========================================================
//==========================================================
//Set day Of week
//Dayofweek_1_7 = 1…7
//1 is first day of week and 7 is Last day of week.
//void Ds1307_set_dayofweek(char Dayofweek_1_7);
void Ds1307_set_dayofweek(char Dayofweek_1_7);
//==========================================================
//==========================================================
//Get day Of Month
//Return 1…31
char Ds1307_get_dayofmonth_1_31();
//==========================================================
//==========================================================
//Set Day Of Month
//Dayofmonth_1_31 = 1…31
void Ds1307_set_dayofmonth(char Dayofmonth_1_31);
//==========================================================
//==========================================================
//Get Month Of Year
//Return 1…12
//Ex)
//1 is "jan" and 12 is "Dec"
char Ds1307_get_monthofyear_1_12();
//==========================================================
//==========================================================
//Set Month of Year
//Monthofyear_1_12 = 1…12
//Ex)
//1 is "jan" and 12 is "Dec"
void Ds1307_set_monthofyear(char Monthofyear_1_12);
//==========================================================
//==========================================================
//Get Year
//Return 0…99
//0 is 2000 and 99 is 2099
char Ds1307_get_year_0_99();
//==========================================================
//==========================================================
//Set Year
//Year_0_99 = 0…99
//0 is 2000 and 99 is 2099
void Ds1307_set_year(char Year_0_99);
//==========================================================
//==========================================================
//External 1hz Clock on
//(ds1307 sqw/out pin)
//Please Read Ds1307 DataSheet
void Ds1307_external_1hz_on();
//==========================================================
//==========================================================
//External 4096hz Clock on
//(ds1307 sqw/out pin)
//Please Read Ds1307 DataSheet
void Ds1307_external_4096hz_on();
//==========================================================
//==========================================================
//External 8192hz Clock on
//(ds1307 sqw/out pin)
//Please Read Ds1307 DataSheet
void Ds1307_external_8192hz_on();
//==========================================================
//==========================================================
//External 32768hz Clock on
//(ds1307 sqw/out pin)
//Please Read Ds1307 DataSheet
void Ds1307_external_32768hz_on();
//==========================================================
//==========================================================
//Set External Clock Off
//And Digital Level of SQWE pin set 0
//Please Read Ds1307 DataSheet
void Ds1307_external_off_sqwe_0();
//==========================================================
//==========================================================
//Set External Clock Off
//And Digital Level of SQWE pin set 1
//Please Read Ds1307 DataSheet
void Ds1307_external_off_sqwe_1();
//==========================================================
//==========================================================
//Read byte in ds1307 Ram
//Ram_byte_index_0_55= 0…55 address of ram
char Ds1307_read_ram(char Ram_byte_index_0_55);
//==========================================================
//==========================================================
//Write byte in ds1307 Ram
//Ram_byte_index_0_55= 0…55 address of ram
//Value = value!
void Ds1307_write_ram(char Ram_byte_index_0_55 ,char Value);
//==========================================================