Jump to content

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

From Flowcode Help
Revision as of 14:37, 13 July 2026 by SteveT (talk | contribs) (Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

GetDate
Returns the date as a string DDMMYY 
- BYTE Unit
0=Day, 1=Weekday, 2=Month, 3=Year 
- BYTE Return


GetTime

GetTime
Returns a unit from the current time 
- BYTE Unit
0=Second, 1=Minute, 2=Hour 
- BYTE 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 
- BOOL Return


ReadRegister

ReadRegister
Read and return the value of the RTC register at the given address 
- BYTE address
 
- BOOL BCDtoDEC
0=Return register value, 1=Convert BCD value to Decimal 
- BYTE Return


SetDate

SetDate
Sets the date from numeric variables 
- BYTE day
Range: 1-31 
- BYTE weekday
Range: 0-6 
- BYTE month
Range: 1-12 
- BYTE year
Range: 0-99 
- VOID Return


SetTime

SetTime
Sets the time from numeric variables 
- BYTE Sec
Range: 0-59 
- BYTE Min
Range: 0-59 
- BYTE Hour
Range: 0-23 
- VOID Return


WriteRegister

WriteRegister
Write the given data value to the RTC register at the given address 
- BYTE address
 
- BYTE data
 
- BOOL DECtoBCD
0=Write data to register, 1=Convert Decimal value to BCD 
- VOID Return


Property reference

Properties
Connections
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SDA Remap Pin
 
SCL
Pin used for SCL (clock signal) 
SCL Remap Pin
 
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.  
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Simulation
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