DS1307 - RTC Time Keeper
Posted: Sat Sep 14, 2013 10:25 pm
DS1307 - Component
Current Version = 1.65
Best working version = 1.65
Info:
I thought it would be really nice if we could program the DS1307 with just a few macros.
In the past you would have a couple of macro calls to communicate and setting up the DS1307, well not anymore.
I have made a DS1307 component which lets you easy use the DS1307 device and configure it. No need to have difficult calculations.
With this component you can just put in your time and date data in decimal values the component takes care of the rest. A nice thing is that you can choose what the behaviour is of the SQW output.
Via a simple pull down menu you can select what the output frequency is.
This component uses just 9 component macros:
- Initialise
- DayOfWeek
- ReadDate
- ReadTime
- WriteDate
- WriteTime
- AutoTimeAdjust
- TimerUpdate
- CheckTimerBit
(A help file will be attached for those that doesn't understand the function of every macro)
Component Use:
The component can be used by copying the ".fcpx" file into the component directory of Flowcode v6.
Then component can be found under the tap inputs as DS1307.
Future Updates:
Future update will include:
--
Help File:
Download:
V1.64 V1.65 ChangeLog:
V1.1 = Added the ability to use different time and date delimiters.
V1.2 = Added the ability to use BST (British Summer Time) time adjustment ----> Note: AutoTimeAdjust macro needs to be called for BST to work!!!
V1.3 = Added Timer Clock Functionality, the user can enable up to 10 timers.
------- DS1307 Injector component integrated for correct simulation
V1.4 = Added Automatic calculation of Day of Week --> Valid up to 2199
------- Configurable Timer outputs fixed so they can be used
V1.5 = Removed Automatic Calculation of Day Of Week, the reason is that its a complex algorithm and it uses floating point calculation.
------- This uses a lot of space that small uC do not have, so for that reason I have removed it.
------- Added the ability to read back the time in 12Hr or 24Hr Format.
------- Added the ability to configure the timers in 12Hr or 24Hr mode.
V1.6 = Added the ability to choose between different return values for the Day of Week.
------- Number: this will return a number corresponding the Day of week (1 for sunday, 2 for Monday and so on)
------- First Three Chars: this will return the first three characters of the day of week
------- Whole Word: this will return the whole word for the day of week
V1.61 = Fixed timer issue with Timers 9 and 10 not coming on.
------- Changes the Component Icon to a submitted icon of acestu
V1.62 = Improved TimerUpdate macro by requesting the output pin status, for better return value result.
V1.63 = Fixed an issue with the TimerUpdate macro that returns false results and output pin flickering.
--------- Added a new macro CheckTimerBit, this macro can be used to check the timer status bits.
V1.64 = the communication pins do not default after re-opening the program.
--------- Added a new variable which lets you use the output pins.
--------- Timers can now be used without the need to use the output pins.
V1.65 = Added an Improved calculation for "Day Of Week" the DOW doesn't need to be given from version 1.65 and higher.
Attention:
Automatic Time Adjustment (BST);
- The "AutoTimeAdjust" macro needs to be called periodically for this functionality to work properly
Timer Clock;
- The "TimerUpdate" macro needs to be called periodically for this function to work properly
- The time need to be entered without delimiter for example NOT 22:00 BUT 2200 The same for NOT 06:00 BUT 600
- Don't forget to specify the timer that needs to update ( 1 to 10 )
- Timer outputs can only be configured if the corresponding timer is also enabled!!!
- 24Hr Time format is selected then AM/PM I the component properties menu is greyed out.
Current Version = 1.65
Best working version = 1.65
Info:
I thought it would be really nice if we could program the DS1307 with just a few macros.
In the past you would have a couple of macro calls to communicate and setting up the DS1307, well not anymore.
I have made a DS1307 component which lets you easy use the DS1307 device and configure it. No need to have difficult calculations.
With this component you can just put in your time and date data in decimal values the component takes care of the rest. A nice thing is that you can choose what the behaviour is of the SQW output.
Via a simple pull down menu you can select what the output frequency is.
This component uses just 9 component macros:
- Initialise
- DayOfWeek
- ReadDate
- ReadTime
- WriteDate
- WriteTime
- AutoTimeAdjust
- TimerUpdate
- CheckTimerBit
(A help file will be attached for those that doesn't understand the function of every macro)
Component Use:
The component can be used by copying the ".fcpx" file into the component directory of Flowcode v6.
Then component can be found under the tap inputs as DS1307.
Future Updates:
Future update will include:
--
Help File:
Download:
V1.64 V1.65 ChangeLog:
V1.1 = Added the ability to use different time and date delimiters.
V1.2 = Added the ability to use BST (British Summer Time) time adjustment ----> Note: AutoTimeAdjust macro needs to be called for BST to work!!!
V1.3 = Added Timer Clock Functionality, the user can enable up to 10 timers.
------- DS1307 Injector component integrated for correct simulation
V1.4 = Added Automatic calculation of Day of Week --> Valid up to 2199
------- Configurable Timer outputs fixed so they can be used
V1.5 = Removed Automatic Calculation of Day Of Week, the reason is that its a complex algorithm and it uses floating point calculation.
------- This uses a lot of space that small uC do not have, so for that reason I have removed it.
------- Added the ability to read back the time in 12Hr or 24Hr Format.
------- Added the ability to configure the timers in 12Hr or 24Hr mode.
V1.6 = Added the ability to choose between different return values for the Day of Week.
------- Number: this will return a number corresponding the Day of week (1 for sunday, 2 for Monday and so on)
------- First Three Chars: this will return the first three characters of the day of week
------- Whole Word: this will return the whole word for the day of week
V1.61 = Fixed timer issue with Timers 9 and 10 not coming on.
------- Changes the Component Icon to a submitted icon of acestu
V1.62 = Improved TimerUpdate macro by requesting the output pin status, for better return value result.
V1.63 = Fixed an issue with the TimerUpdate macro that returns false results and output pin flickering.
--------- Added a new macro CheckTimerBit, this macro can be used to check the timer status bits.
V1.64 = the communication pins do not default after re-opening the program.
--------- Added a new variable which lets you use the output pins.
--------- Timers can now be used without the need to use the output pins.
V1.65 = Added an Improved calculation for "Day Of Week" the DOW doesn't need to be given from version 1.65 and higher.
Attention:
Automatic Time Adjustment (BST);
- The "AutoTimeAdjust" macro needs to be called periodically for this functionality to work properly
Timer Clock;
- The "TimerUpdate" macro needs to be called periodically for this function to work properly
- The time need to be entered without delimiter for example NOT 22:00 BUT 2200 The same for NOT 06:00 BUT 600
- Don't forget to specify the timer that needs to update ( 1 to 10 )
- Timer outputs can only be configured if the corresponding timer is also enabled!!!
- 24Hr Time format is selected then AM/PM I the component properties menu is greyed out.