Component: Real Time Clock (PCF8563) (Real Time Clock)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Real Time Clock


Real Time Clock (PCF8563) component

Serial (I2C) Real Time Clock component for PCF8563 device.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

GetDate

Fc9-comp-macro.png GetDate
Returns the date as a string DDMMYY 
Fc9-u8-icon.png - BYTE Unit
0=Day, 1=Weekday, 2=Month, 3=Year 
Fc9-u8-icon.png - BYTE Return


GetTime

Fc9-comp-macro.png GetTime
Returns a unit from the current time 
Fc9-u8-icon.png - BYTE Unit
0=Second, 1=Minute, 2=Hour 
Fc9-u8-icon.png - BYTE Return


Initialise

Fc9-comp-macro.png 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 
Fc9-bool-icon.png - BOOL Return


ReadRegister

Fc9-comp-macro.png ReadRegister
Read and return the value of the RTC register at the given address 
Fc9-u8-icon.png - BYTE address
 
Fc9-bool-icon.png - BOOL BCDtoDEC
0=Return register value, 1=Convert BCD value to Decimal 
Fc9-u8-icon.png - BYTE Return


SetDate

Fc9-comp-macro.png SetDate
Sets the date from numeric variables 
Fc9-u8-icon.png - BYTE day
Range: 1-31 
Fc9-u8-icon.png - BYTE weekday
Range: 0-6 
Fc9-u8-icon.png - BYTE month
Range: 1-12 
Fc9-u8-icon.png - BYTE year
Range: 0-99 
Fc9-void-icon.png - VOID Return


SetTime

Fc9-comp-macro.png SetTime
Sets the time from numeric variables 
Fc9-u8-icon.png - BYTE Sec
Range: 0-59 
Fc9-u8-icon.png - BYTE Min
Range: 0-59 
Fc9-u8-icon.png - BYTE Hour
Range: 0-23 
Fc9-void-icon.png - VOID Return


WriteRegister

Fc9-comp-macro.png WriteRegister
Write the given data value to the RTC register at the given address 
Fc9-u8-icon.png - BYTE address
 
Fc9-u8-icon.png - BYTE data
 
Fc9-bool-icon.png - BOOL DECtoBCD
0=Write data to register, 1=Convert Decimal value to BCD 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-16-icon.png SDA Remap Pin
 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png SCL Remap Pin
 
Fc9-type-7-icon.png Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms
 

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