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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
(12.65 KiB) Downloaded 11615 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
(16.33 KiB) Downloaded 11612 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

Hi Jordy,

here is my latest chart with the weekly times on it....
Timeswitch_V1.fcfx
(15.11 KiB) Downloaded 342 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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 316 times
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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 303 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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 317 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by JohnCrow »

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 11792 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by dazz »

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.06 KiB) Downloaded 246 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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by acestu »

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
Contact:

Re: DS1307 - RTC Time Keeper

Post by Jordy101091 »

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
the will to learn, should not be stopped by any price

Post Reply