Page 5 of 6

Re: DS1307 - RTC Time Keeper

Posted: Thu Nov 28, 2013 6:11 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Thu Nov 28, 2013 7:19 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Thu Nov 28, 2013 9:20 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Thu Nov 28, 2013 10:06 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Thu Nov 28, 2013 10:47 pm
by acestu
Hi Jordy,

here is my latest chart with the weekly times on it....
Timeswitch_V1.fcfx
(15.11 KiB) Downloaded 1440 times
cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Fri Nov 29, 2013 7:47 pm
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:

Re: DS1307 - RTC Time Keeper

Posted: Fri Nov 29, 2013 8:42 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Fri Nov 29, 2013 9:51 pm
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 1395 times

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

cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Sat Nov 30, 2013 2:06 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Sat Nov 30, 2013 3:16 pm
by acestu
Hi Jordy,

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

cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Sat Nov 30, 2013 6:16 pm
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 1378 times
cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 5:08 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 5:32 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 6:15 pm
by acestu
Hi Jordy,

That's brilliant, thanks very much

Acestu

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 6:52 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 7:40 pm
by acestu
Hi Jordy,

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


cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Mon Dec 02, 2013 8:01 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Sun Dec 22, 2013 12:17 pm
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 43805 times

Re: DS1307 - RTC Time Keeper

Posted: Fri Dec 27, 2013 3:25 pm
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

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 12:03 am
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 1278 times

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 12:52 am
by acestu
Hi Jordy,

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

cheers
Acestu

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 1:17 am
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

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 1:33 am
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

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 1:39 am
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

Re: DS1307 - RTC Time Keeper

Posted: Sat Dec 28, 2013 1:43 am
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