DS1307 - RTC Time Keeper
Moderator: Benj
Re: DS1307 - RTC Time Keeper
Hi
Attached is a commented flowchart which shows how to use the BST function, its quite cool watching the demo add or subtract an hour
if i have time later today i will put up a chart for the timers
Regards
Dazz
Attached is a commented flowchart which shows how to use the BST function, its quite cool watching the demo add or subtract an hour
if i have time later today i will put up a chart for the timers
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Dazz,
I will download now and have a look .....
cheers
Acestu
I will download now and have a look .....
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Dazz,
It is the Timer part that I can't seem to work, do you have any ideas ?
cheers
Acestu
It is the Timer part that I can't seem to work, do you have any ideas ?
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
Oke,
Here is the help file that I promised to make.
Here is the help file that I promised to make.
- Attachments
-
- DS1307 Help.zip
- Help File V1.3
- (242.69 KiB) Downloaded 1881 times
the will to learn, should not be stopped by any price
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hey thanks for doing this Jordy, much appreciated....
Acestu
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
I have just had another look at the component, I am only giving you some input, all commercially available time clocks usually have:
4 x on - off timed periods
They can be either
24hr which means that the on - off times will work every single day at the same time
7 day which means that you can select which day to work
5 -2 which means that you can have the on - off period different at weekends
Now consider this with your timer, if I wanted a heating system to come on at 7.00am until 8.00am then 12.00pm until 1.00pm then 4.00pm until 10.00pm every day, I would need 21 timers to do this, so there is going to have to be another parameter in there which you can set for 24HR, 5Day or 2Day
Am I making sense?
cheers
Acestu
I have just had another look at the component, I am only giving you some input, all commercially available time clocks usually have:
4 x on - off timed periods
They can be either
24hr which means that the on - off times will work every single day at the same time
7 day which means that you can select which day to work
5 -2 which means that you can have the on - off period different at weekends
Now consider this with your timer, if I wanted a heating system to come on at 7.00am until 8.00am then 12.00pm until 1.00pm then 4.00pm until 10.00pm every day, I would need 21 timers to do this, so there is going to have to be another parameter in there which you can set for 24HR, 5Day or 2Day
Am I making sense?
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
Oke I get your point.
I will have look tomorrow and update this component so the timer clock is more convenient to use.
Im now working on the part that calculates the day of week, where I use the gregorian algorithm to do this.
Hope it works in one go.
Will let you know tomorrow.
Regards Jordy
I will have look tomorrow and update this component so the timer clock is more convenient to use.
Im now working on the part that calculates the day of week, where I use the gregorian algorithm to do this.
Hope it works in one go.
Will let you know tomorrow.
Regards Jordy
the will to learn, should not be stopped by any price
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
Thanks, I wish I could help in some way, when you have finished the component perhaps I could make a video of how to use it or something similar.......
I am not up to scratch on my Gregorian Alogorythyms i'm afraid
cheers
Acestu
Thanks, I wish I could help in some way, when you have finished the component perhaps I could make a video of how to use it or something similar.......
I am not up to scratch on my Gregorian Alogorythyms i'm afraid
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
Thanks for the tip,
I have managed to get this to work, so now you don't have to now what day of the week it is. It calculates this for you.
Anyway thanks for the tip.
I hope I can release an update tonight ore tomorrow.
Regards jordy
I have managed to get this to work, so now you don't have to now what day of the week it is. It calculates this for you.
Anyway thanks for the tip.
I hope I can release an update tonight ore tomorrow.
Regards jordy
the will to learn, should not be stopped by any price
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
I have investigated this some more and I think you are not correct, or its just me.acestu wrote:Hi Jordy,
I have just had another look at the component, I am only giving you some input, all commercially available time clocks usually have:
4 x on - off timed periods
They can be either
24hr which means that the on - off times will work every single day at the same time
7 day which means that you can select which day to work
5 -2 which means that you can have the on - off period different at weekends
Now consider this with your timer, if I wanted a heating system to come on at 7.00am until 8.00am then 12.00pm until 1.00pm then 4.00pm until 10.00pm every day, I would need 21 timers to do this, so there is going to have to be another parameter in there which you can set for 24HR, 5Day or 2Day
Am I making sense?
cheers
Acestu
I only need just 3 timers just to configure you examples stated above, How do you get to a number of 21?
In you example you show that you want 3 timers:
#1 = 7.00AM to 8.00AM
#2 = 12.00PM to 01.00PM
#3 = 04.00PM to 10.00PM
All timer are active everyday of the week so this will be from Sunday to Saturday.
See the attached picture of my configuration:
I hope this makes sense to you, if not I would like to hear it.
Regards Jordy
PS. If Im correct I have said that all time information for the timers needed to be entered in 24Hr notation. The reason for this is
that this notation is easier to work with in my program.
the will to learn, should not be stopped by any price
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
No problem, I am sure you are right, after all you wrote it, I will build a circuit tonight and put it on test..............
Thanks
Acestu
No problem, I am sure you are right, after all you wrote it, I will build a circuit tonight and put it on test..............
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
I have just started to put a chart together, however when I went to assign a digital pin to the timers they are all greyed out and nothing is selectable ?
Have I done something wrong ?
cheers
Acestu
I have just started to put a chart together, however when I went to assign a digital pin to the timers they are all greyed out and nothing is selectable ?
Have I done something wrong ?
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
No you haven't done anything wrong the problem is, when I assign a true ore false statement to the corresponding output pin I get a some strange error message from Flowcode when I want to test it so you cannot use the output pins at this moment.
However you can still use the return value of the Timer Update macro to activate a output (the standard way)
If you remember the TimerUpdate macro returns the following return value
255 = timer is not enabled
1 = timer is active
0 = timer is not active
Hope this helps you out, I will try to fix this problem ASAP
Regards Jordy
However you can still use the return value of the Timer Update macro to activate a output (the standard way)
If you remember the TimerUpdate macro returns the following return value
255 = timer is not enabled
1 = timer is active
0 = timer is not active
Hope this helps you out, I will try to fix this problem ASAP
Regards Jordy
the will to learn, should not be stopped by any price
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: DS1307 - RTC Time Keeper
Evening Jordy.
Cheers,
Jonny
What is the error you are getting? Perhaps if I can replicate that here then I can help?when I assign a true ore false statement to the corresponding output pin I get a some strange error message from Flowcode when I want to test it so you cannot use the output pins at this moment.
Cheers,
Jonny
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
I put this chart togethor last night, could you have a look at it please and see if I have done it correctly ......
Thanks
Acestu
I put this chart togethor last night, could you have a look at it please and see if I have done it correctly ......
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
When I get home in will check your flowcode programacestu wrote:Hi Jordy,
I put this chart togethor last night, could you have a look at it please and see if I have done it correctly ......
Thanks
Acestu
Regards jordy
the will to learn, should not be stopped by any price
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
The error I'm getting is some kind of syntax error.JonnyW wrote:Evening Jordy.
What is the error you are getting? Perhaps if I can replicate that here then I can help?when I assign a true ore false statement to the corresponding output pin I get a some strange error message from Flowcode when I want to test it so you cannot use the output pins at this moment.
Cheers,
Jonny
When I get home I can tell you exactly what the error is.
Regards jordy
the will to learn, should not be stopped by any price
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
Acestu,
I think that you have correctly build your Flowcode and it should work on your hardware.
In simulation in will not work until the injector component also processes the day of week.
if you have any question, then let me know.
regards Jordy
I think that you have correctly build your Flowcode and it should work on your hardware.
In simulation in will not work until the injector component also processes the day of week.
if you have any question, then let me know.
regards Jordy
the will to learn, should not be stopped by any price
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
Jonny,
This is the error message when im trying to compile my component Flowcode:
I have highlighted the calculation that produces this error, if I comment this calculation the error disappears.
Tmr1Output is the variable for the output pin that the user can select.
I have PM't you the C code of the component.
Reards Jordy
This is the error message when im trying to compile my component Flowcode:
Code: Select all
Target folder: \\NASHJJAKL\Jordy Kleian\D6ULV5~V\FKZ0BJ~O\FHCR4V~2\TVVGTI~B\DS1307
Source name: \\NASHJJAKL\Jordy Kleian\Documenten\Flowcode Projects\Flowcode v6 Componenten\Time Keeping\DS1307\DS1307.fcfx
Title:
Description:
Device: PIC.16F.16F877A
Generated by: Flowcode v6.0.3.0
Date: Sunday, November 17, 2013 13:41:00
Users: 1
Registered to: jordy101091
Licence key: B55ZN2
NIET VOOR COMMERCIELE TOEPASSINGEN
http://www.matrixmultimedia.com
Fouten bij het genereren van C-code:
DS1307.c : 1954 : error : Syntaxfout
DS1307.c : 1963 : error : Syntaxfout
KLAAR
Tmr1Output is the variable for the output pin that the user can select.
I have PM't you the C code of the component.
Reards Jordy
the will to learn, should not be stopped by any price
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
Thanks for the reply, also It will be interesting to see what Jonny comes up with......
cheers
Acestu
Thanks for the reply, also It will be interesting to see what Jonny comes up with......
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
I have yet released another update of the DS1307 component.
This update includes automatic calculation of the DOW (Day Of week) this value is valid up to 2199.
Also the strange behaviour is fixed whit the timer outputs so now you can use them.
It can be downloaded from the start post
This update includes automatic calculation of the DOW (Day Of week) this value is valid up to 2199.
Also the strange behaviour is fixed whit the timer outputs so now you can use them.
It can be downloaded from the start post
the will to learn, should not be stopped by any price
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: DS1307 - RTC Time Keeper
Hi Jordy,
Now you have released your newest version, I have modified my chart to suit, could you have a look and see if you think it is right please...
cheers
Acestu
EDIT Also I did notice this: I forgot to change the date in write date ie yesterdays date, and I received this message--
Now you have released your newest version, I have modified my chart to suit, could you have a look and see if you think it is right please...
cheers
Acestu
EDIT Also I did notice this: I forgot to change the date in write date ie yesterdays date, and I received this message--
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi Jordy.
That error may be because the pins are not connected.
The properties behave like pre-processor when converted to C. This means if you have a property called 'connection' and it is assigned to pin A 5 then what Flowcode does is take the line:
connection = 1
And replace it with:
$PORTA.5 = 1
However, if the pin is not connected Flowcode can not replace it with anything meaningful, so it sticks a zero in there instead:
0 = 1
Which is a syntax error. This is fudged during simulation and calculation entry so you can enter calculations even with unconnected pins.
If all your pins are connected OK this should work OK. If not, Flowcode should throw a warning (which you can disable via an event in each component). If the pins are connected OK and Flowcode is still producing this error you may have to PM me the source (in confidence of course) and I can see if there is an obscure bug we have not seen yet.
Jonny
That error may be because the pins are not connected.
The properties behave like pre-processor when converted to C. This means if you have a property called 'connection' and it is assigned to pin A 5 then what Flowcode does is take the line:
connection = 1
And replace it with:
$PORTA.5 = 1
However, if the pin is not connected Flowcode can not replace it with anything meaningful, so it sticks a zero in there instead:
0 = 1
Which is a syntax error. This is fudged during simulation and calculation entry so you can enter calculations even with unconnected pins.
If all your pins are connected OK this should work OK. If not, Flowcode should throw a warning (which you can disable via an event in each component). If the pins are connected OK and Flowcode is still producing this error you may have to PM me the source (in confidence of course) and I can see if there is an obscure bug we have not seen yet.
Jonny
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: DS1307 - RTC Time Keeper
This is, because you are now using the updated component V1.4 which includes auto DOW calculation you do not have to enter the Day of week you self. But in Flowcode you have used the old component where you have to specify the day of week.acestu wrote:Hi Jordy,
Now you have released your newest version, I have modified my chart to suit, could you have a look and see if you think it is right please...
cheers
Acestu
EDIT Also I did notice this: I forgot to change the date in write date ie yesterdays date, and I received this message--
Because this is not needed you have to update just that macro "WriteDate".
What you need to do is double click on that error message and you will go to the macro where this error occurred. then double click on this macro and simply select the same macro form the component list (As you normaly do). you notice that there is one line missing "DAY".
If you have done this it should work fine.
Regards Jordy
the will to learn, should not be stopped by any price