Component: Real Time Clock (PCF8563) (Real Time Clock)
Appearance
| Author | Matrix TSL |
| Version | 1.1 |
| Category | Real Time Clock |
Real Time Clock (PCF8563) component
Serial (I2C) Real Time Clock component for PCF8563 device.
Version information
Library Version, Component Version, Date, Author, Info 2, 1.1, 11-09-26, ST, Added generic GetDateTimeString macro
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetDate
| GetDate | |
| Returns the date as a string DDMMYY | |
| Unit | |
| 0=Day, 1=Weekday, 2=Month, 3=Year | |
| Return | |
GetDateTimeString
GetTime
| GetTime | |
| Returns a unit from the current time | |
| Unit | |
| 0=Second, 1=Minute, 2=Hour | |
| Return | |
Initialise
| Initialise | |
| Initialises the component ready for I2C communications. Checks for a power on reset flag indicating the RTC time/date needs to be set. 0=No POR detected, 1=POR detected | |
| Return | |
ReadRegister
| ReadRegister | |
| Read and return the value of the RTC register at the given address | |
| address | |
| BCDtoDEC | |
| 0=Return register value, 1=Convert BCD value to Decimal | |
| Return | |
SetDate
| SetDate | |
| Sets the date from numeric variables | |
| day | |
| Range: 1-31 | |
| weekday | |
| Range: 0-6 | |
| month | |
| Range: 1-12 | |
| year | |
| Range: 0-99 | |
| Return | |
SetTime
| SetTime | |
| Sets the time from numeric variables | |
| Sec | |
| Range: 0-59 | |
| Min | |
| Range: 0-59 | |
| Hour | |
| Range: 0-23 | |
| Return | |
WriteRegister
| WriteRegister | |
| Write the given data value to the RTC register at the given address | |
| address | |
| data | |
| DECtoBCD | |
| 0=Write data to register, 1=Convert Decimal value to BCD | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_RTC_(PCF8563).fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_RTC_(PCF8563).fcfx