Difference between revisions of "RTC"
Line 8: | Line 8: | ||
{{#Widget:LibTable}} | {{#Widget:LibTable}} | ||
|- | |- | ||
− | |Defination || | + | |Defination ||<syntaxhighlight lang = "c"> void RTC_Init()</syntaxhighlight> |
|- | |- | ||
| Input Arguments || none | | Input Arguments || none | ||
Line 16: | Line 16: | ||
| Description || This function is used to Initialize the Ds1307 RTC. | | Description || This function is used to Initialize the Ds1307 RTC. | ||
|- | |- | ||
− | | Usage ||RTC_Init(); | + | | Usage ||<syntaxhighlight lang = "c"> RTC_Init();</syntaxhighlight> |
|} | |} | ||
Line 38: | Line 38: | ||
Note: The I/P arguments should of BCD,<br />like 0x12,0x39,0x26 for 12hr,39min and 26sec. | Note: The I/P arguments should of BCD,<br />like 0x12,0x39,0x26 for 12hr,39min and 26sec. | ||
|- | |- | ||
− | | Usage || RTC_SetTime(0x10,0x40,0x20); //All the arguments should be in BCD format | + | | Usage ||<syntaxhighlight lang = "c">RTC_SetTime(0x10,0x40,0x20); //All the arguments should be in BCD format</syntaxhighlight> |
|} | |} | ||
Line 60: | Line 60: | ||
Note: The I/P arguments should of BCD.<br />Like 0x15,0x08,0x47 for 15th day,8th month and 47th year. | Note: The I/P arguments should of BCD.<br />Like 0x15,0x08,0x47 for 15th day,8th month and 47th year. | ||
|- | |- | ||
− | | Usage || RTC_SetDate(0x15,0x08,0x47); //All arguments should be in BCD format. | + | | Usage ||<syntaxhighlight lang = "c">RTC_SetDate(0x15,0x08,0x47); //All arguments should be in BCD format.</syntaxhighlight> |
|} | |} | ||
Revision as of 11:23, 10 January 2015
Contents
[hide]RTC
RTC_Init
{{#Widget:LibTable}}Defination |
|
Input Arguments | none |
Return Value | none |
Description | This function is used to Initialize the Ds1307 RTC. |
Usage |
|
RTC_SetTime
{{#Widget:LibTable}}Defination |
|
Input Arguments |
|
Return Value | none |
Description | This function is used to update the Time(hh,mm,ss) of Ds1307 RTC. The new time is updated into the non volatile memory of Ds1307. Note: The I/P arguments should of BCD, |
Usage |
|
RTC_SetDate
{{#Widget:LibTable}}Defination |
|
Input Arguments |
|
Return Value | none |
Description | This function is used to set Date(dd,mm,yy) into the Ds1307 RTC. The new Date is updated into the non volatile memory of Ds1307. Note: The I/P arguments should of BCD. |
Usage |
|
RTC_GetTime
{{#Widget:LibTable}}Defination |
|
Input Arguments |
|
Return Value | none |
Description | This function is used to get the Time(hh,mm,ss) from Ds1307 RTC. Note: The time read from Ds1307 will be of BCD format, |
Usage |
|
RTC_GetDate
{{#Widget:LibTable}}Defination |
|
Input Arguments |
|
Return Value | none |
Description | This function is used to get the Date(d,m,y) from Ds1307 RTC. Note: The date read from Ds1307 will be of BCD format, |
Usage |
|