m
m
Line 4: Line 4:
 
=Objective=
 
=Objective=
 
=RTC Registers=
 
=RTC Registers=
 +
 +
 +
=====CCR ( Clock Control Register )=====
 +
{| class="wikitable" style="text-align:center; background-color:#ABCDEF;margin: 1em auto 1em auto"
 +
!colspan = '9'|CCR
 +
|-
 +
|31:5|| 4 || 3:2|| 1|| 0 
 +
|-
 +
| - || CCALEN || - || CTCRST || CLKEN
 +
|}
 +
 +
'''Bit 0 – CLKEN : Clock Enable'''<br>
 +
 +
'''Bit 1 - CTCRST : CTC Reset'''<br>
 +
 +
'''Bit 3:2 '''
 +
 +
'''Bit 4 - CCALEN''' <br>
 +
 +
'''Bit 31:5 '''
 +
 +
=====Time Counter Register =====
 +
{| class="wikitable" style="text-align:center; background-color:#ABCDEF;margin: 1em auto 1em auto"
 +
!colspan = '9'|Time Counter Register
 +
|-
 +
|Name|| Description || Range|| 0 
 +
|-
 +
|SEC || Seconds value|| 0 to 59
 +
|-
 +
|MIN || Minutes value|| 0 to 59
 +
|-
 +
|HOUR || Hours value|| 0 to 23
 +
|-
 +
|DOM || Day of Month value|| 1 to 28,29,30 or 31 <br> ( depending on the
 +
month and whether it is a leap year).
 +
|-
 +
|DOW || Day of Week value|| 0 to 6
 +
|-
 +
|DOY || Day of Year value|| 1 to 365 (366 for Leap Year)
 +
|-
 +
|MONTH || Month value|| 1 to 12
 +
|-
 +
|YEAR || Year value|| 0 to 4095
 +
|}
 +
 
=Steps for configuring RTC=
 
=Steps for configuring RTC=
 
=Code EXample=
 
=Code EXample=

Revision as of 20:27, 4 June 2015

---

Objective

RTC Registers

CCR ( Clock Control Register )
CCR
31:5 4 3:2 1 0
- CCALEN - CTCRST CLKEN

Bit 0 – CLKEN : Clock Enable

Bit 1 - CTCRST : CTC Reset

Bit 3:2

Bit 4 - CCALEN

Bit 31:5

Time Counter Register
Time Counter Register
Name Description Range 0
SEC Seconds value 0 to 59
MIN Minutes value 0 to 59
HOUR Hours value 0 to 23
DOM Day of Month value 1 to 28,29,30 or 31
( depending on the

month and whether it is a leap year).

DOW Day of Week value 0 to 6
DOY Day of Year value 1 to 365 (366 for Leap Year)
MONTH Month value 1 to 12
YEAR Year value 0 to 4095

Steps for configuring RTC

Code EXample

Example 1

Using Explore Embedded Liberaries