Difference between revisions of "Component: Real Time Clock (MCP7940N) (Real Time Clock)"
From Flowcode Help
Jump to navigationJump to searchLine 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/RTC_(MCP7940N).fcfx FC_Comp_Source_temp/RTC_(MCP7940N).fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/RTC_(MCP7940N).fcfx FC_Comp_Source_temp/RTC_(MCP7940N).fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 73: | Line 73: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 81: | Line 83: | ||
==Macro reference== | ==Macro reference== | ||
− | === | + | ===GetDate=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDate''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Returns the date as a string DDMMYY |
|- | |- | ||
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | |
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 110: | Line 107: | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===Initialise=== | ||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
+ | |- | ||
+ | | colspan="2" | Initialises the component ready for I2C communications | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 152: | Line 163: | ||
− | === | + | ===SetTime=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTime''' |
+ | |- | ||
+ | | colspan="2" | Sets the time from a string HHMMSS | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING |
+ | | width="90%" | Time | ||
|- | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 184: | Line 200: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Revision as of 12:02, 3 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Real Time Clock |
Contents
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_temp/RTC_(MCP7940N).fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/RTC_(MCP7940N).fcfx
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 | |
- STRING | Return |
GetTime
GetTime | |
Returns the time as a string HHMMSS | |
- STRING | Return |
Initialise
Initialise | |
Initialises the component ready for I2C communications | |
- VOID | Return |
ReadRegister
ReadRegister | |
Read and return the value of the RTC register at the given address | |
- BYTE | address |
- BYTE | Return |
SetDate
SetDate | |
Sets the date from a string DDMMYY | |
- STRING | Date |
- VOID | Return |
SetTime
SetTime | |
Sets the time from a string HHMMSS | |
- STRING | Time |
- VOID | Return |
WriteRegister
WriteRegister | |
Write the given data value to the RTC register at the given address | |
- BYTE | address |
- BYTE | data |
- VOID | Return |