Component: Real Time Clock (MCP7940N) (Real Time Clock)

From Flowcode Help
Revision as of 11:52, 3 February 2023 by Wiki bot (talk | contribs)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Real Time Clock


Real Time Clock (MCP7940N) component

Serial (I2C) Real Time Clock component for MCP7940N device. When used with a MIAC project this component gives access to the internal RTC (if fitted, depending upon model) and the component properties will be automatically configured.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RTC_(MCP7940N).fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RTC_(MCP7940N).fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples




Macro reference

SetTime

Fc9-comp-macro.png SetTime
Sets the time from a string HHMMSS 
Fc9-string-icon.png - STRING Time
 
Fc9-void-icon.png - VOID Return


GetTime

Fc9-comp-macro.png GetTime
Returns the time as a string HHMMSS 
Fc9-string-icon.png - STRING 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-u8-icon.png - BYTE Return


SetDate

Fc9-comp-macro.png SetDate
Sets the date from a string DDMMYY 
Fc9-string-icon.png - STRING Date
 
Fc9-void-icon.png - VOID Return


GetDate

Fc9-comp-macro.png GetDate
Returns the date as a string DDMMYY 
Fc9-string-icon.png - STRING 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-void-icon.png - VOID Return


Initialise

Fc9-comp-macro.png Initialise
Initialises the component ready for I2C communications 
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