DS1307 - RTC Time Keeper

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Thu Nov 28, 2013 6:11 pm

Hi John,

My board will work fine but when the pickit3 usb is plugged in the seconds stop, if I remove the MCLR programmer wire they start again ....

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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Thu Nov 28, 2013 7:19 pm

Hi,

I have tested the timer with switches on the same day and if 1 timer is enabled it comes on, however if you set 2 timers the first will come on but the second one doesn't, I have attached a pic of the 2 set timers, I will try multiday now...

timertest1.png
timertest1.png (12.65 KiB) Viewed 10087 times


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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Thu Nov 28, 2013 9:20 pm

Hi,

I have just tried the Timer with weekly switches and the first one comes on but the second doesn't

Has anyone else tried the component in this way, if so could you post your findings please..


timertest2.png
timertest2.png (16.33 KiB) Viewed 10084 times


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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Thu Nov 28, 2013 10:06 pm

acestu wrote:Hi,

I have just tried the Timer with weekly switches and the first one comes on but the second doesn't

Has anyone else tried the component in this way, if so could you post your findings please..


timertest2.png


cheers
Acestu


Could you post or pm me you flowcode so I could have a look and maybe spot the problem.
If it's not you flowcode then I have to search the component code for bugs.

Regards Jordy
These users thanked the author Jordy101091 for the post:
acestu (Thu Nov 28, 2013 10:58 pm)
Rating: 5.56%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Thu Nov 28, 2013 10:47 pm

Hi Jordy,

here is my latest chart with the weekly times on it....

Timeswitch_V1.fcfx
(15.11 KiB) Downloaded 303 times


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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Fri Nov 29, 2013 7:47 pm

HI acestu,

I have had a looked you Flowcode and I immediately spotted you problem.
You are updating timer one and not timer 2 here is a snapshot of your program.

Image

You need to do this again for timer 2.

All timers that are enabled you need to use the timerupdate acro for each individual timer.

Perhaps I could change this so that all enabled timer are updated, but I need to figure out how to return the status bytes.

anyway I have attached a updated Flowcode:
Attachments
Timeswitch_V1.fcfx
updated file
(15.49 KiB) Downloaded 281 times
These users thanked the author Jordy101091 for the post (total 2):
medelec35 (Fri Nov 29, 2013 7:50 pm) • acestu (Fri Nov 29, 2013 8:42 pm)
Rating: 11.11%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Fri Nov 29, 2013 8:42 pm

Hi Jordy,

Thanks for finding the problem, there is no need apologies for anything your doing a great job, I am going to reprogram my chip now.......

thanks again
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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Fri Nov 29, 2013 9:51 pm

Hi Jordy,

I have created a new chart and enabled all ten timers, upon testing timers go on and off fine until number 9 and 10 which do not come on, I am posting the chart so you can have a look at it...

Timeswitch_V2.fcfx
(16.63 KiB) Downloaded 265 times



EDIT: I have changed all the times and tried again but timers 9 and ten do not come on.

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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Sat Nov 30, 2013 2:06 pm

I have updated the component to version V1.61.

In this version the timers 9 and 10 has been fixed, they should turn on and of as expected.

You can download the new version from the start post,

Regards Jordy
These users thanked the author Jordy101091 for the post (total 2):
acestu (Sat Nov 30, 2013 3:16 pm) • medelec35 (Sat Nov 30, 2013 9:27 pm)
Rating: 11.11%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Sat Nov 30, 2013 3:16 pm

Hi Jordy,

Your a star :D , I will try this when I get home from work !

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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Sat Nov 30, 2013 6:16 pm

Hi Jordy,

All ten timers are tested and working now, chart is included if anyone wants to try the project....Make sure you install version 1.6.1. of the DS1307 component first though...

Timeswitch_V4.fcfx
(16.85 KiB) Downloaded 295 times


cheers
Acestu
These users thanked the author acestu for the post:
medelec35 (Sat Nov 30, 2013 9:27 pm)
Rating: 5.56%
 
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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Mon Dec 02, 2013 5:08 pm

Hi Jordy,

Do you think that there would be a possibility of adding variables to your component that confirm that the individual timer outputs are on so that I can add the boost function ?

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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Mon Dec 02, 2013 5:32 pm

I think I can do that, I will try and add this today, perhaps If ait work in one go I can update the component today as well.
If not I will update the component tomorrow
These users thanked the author Jordy101091 for the post:
acestu (Mon Dec 02, 2013 6:16 pm)
Rating: 5.56%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Mon Dec 02, 2013 6:15 pm

Hi Jordy,

That's brilliant, thanks very much

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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Mon Dec 02, 2013 6:52 pm

Acestu,

I have updated the component to version V1.62.
In this version I have modified the TimerUpdate macro so that it returns a return value after checking the output pin status.

So hopefully it should work fine now, if not please let me know.

Regards Jordy
These users thanked the author Jordy101091 for the post:
acestu (Mon Dec 02, 2013 7:39 pm)
Rating: 5.56%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Mon Dec 02, 2013 7:40 pm

Hi Jordy,

Thanks for the new version, I will try it out now....


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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Mon Dec 02, 2013 8:01 pm

Hi Jordy,

I have just programmed the chip with the new component but now when the timers come on the LED flickers, also the return values are not making any sense, I am presuming that I don't have to do anything with the updated component ?

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.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 714 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby JohnCrow » Sun Dec 22, 2013 12:17 pm

Just built a nice little Adafruit RTC board.
Same basic circuit as my original boards, but a lot smaller. Soldered it to the proto area of the dev board e-block.

Bought it from oomlout (Who by co-incidence are also in Halifax)

DS1307 RTC.jpg
DS1307 RTC.jpg (60.43 KiB) Viewed 9741 times
1 in 10 people understand binary, the other one doesn't !

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Fri Dec 27, 2013 3:25 pm

Hi all,

Its been a while since I have posted something, but here I am.
I finally found the solution to my problem this morning when I was under the shower.
A rather strange place to come to a solution of just one of the many problems in life :lol:

But hey I fixed it and that's what matters, it took a while but now we can move on to the next problem :wink:

Hope you enjoy this component just as much I am.

You can download the updated version of the main topic also I have updated the help file.

Regards Jordy
the will to learn, should not be stopped by any price

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby dazz » Sat Dec 28, 2013 12:03 am

Hi jordy
Not sure if its just my system but if you dont enable all timers and assign them pins ,It errors on compiling with a message about unconnected ports
Msg file attached so you can see the error
Regards
Dazz

Flowcode1.msg.txt
(2.11 KiB) Downloaded 225 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Sat Dec 28, 2013 12:52 am

Hi Jordy,

I tried it too and Flowcode crashed on me, there were several "Too many argument warnings"

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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Sat Dec 28, 2013 1:17 am

I don't get it,

The problem with the error messages when you don't have all the outputs connected, that I can understand and im working on this.
But you're problem is new to me because I can program my uC fine.

:idea: :arrow: :idea:

Ahha I now what it is, you need to look at the TimerUpdate macro in the past you must provide a variable of which timer you wanted to update.
This Is not relevant anymore so you need to click on this error, you will see that in the following area:

Image

Double-click and it jumps straight to the source of the error, you only need to double click on that macro and re-enter it.
This will solve you're problem
These users thanked the author Jordy101091 for the post:
acestu (Sat Dec 28, 2013 1:33 am)
Rating: 5.56%
 
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Sat Dec 28, 2013 1:33 am

Hi Jordy,

I will have a look now, I think what you are saying is that we need to remove all the Timer Update Macros that we have put in 1 for each timer ....

Do you just have 1 Timer Update now for all ?

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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby acestu » Sat Dec 28, 2013 1:39 am

Hi Jordy,

I have deleted 9 of the Timer Updates so there is just 1, now it compiles, I will test the board for you in the next couple of days ......

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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: DS1307 - RTC Time Keeper

Postby Jordy101091 » Sat Dec 28, 2013 1:43 am

you only have to use TimerUpdate once in you whole program.
It doesn't matter if the timer is enabled or not.

with the CheckTimerBit macro you can check if the timer is enabled or not.

true (1) = enabled
false (0) = disabled

the CheckTimerBit allows 1...10 input that represents the timer you want to check the return value will be 1 or 0 depending on the timer state.

Regards Jordy
These users thanked the author Jordy101091 for the post:
acestu (Sat Dec 28, 2013 1:48 am)
Rating: 5.56%
 
the will to learn, should not be stopped by any price