DS1307 - RTC Time Keeper
Moderator: Benj
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi Jordy,
You say that the "check timer bit" tells you if the particular timer is Enabled, but the macro that was needed was one to tell you if a particular timer was not just Enabled but it was actually ON, this would allow me to create a BOOST button, would this be possible at all ?
Sorry for being a pain Jordy
cheers
Acestu
You say that the "check timer bit" tells you if the particular timer is Enabled, but the macro that was needed was one to tell you if a particular timer was not just Enabled but it was actually ON, this would allow me to create a BOOST button, would this be possible at all ?
Sorry for being a pain Jordy
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
In need to dissapoint you om that.
There is no feedback from the output pin to any kind of input that I can use in flowcode.
Really crude to say but you just need to hope your output is high or low.
There no other way, without feedback I cannot realise what you are after.
With that of the table, for you application is absolutely critical that you need to know if the actual output is high or not.
If so you could you (simple words) just connect the output to a input so if you want to know the output is high then the input must also be high.
Ore sounds this to simple
Regards Jordy
There is no feedback from the output pin to any kind of input that I can use in flowcode.
Really crude to say but you just need to hope your output is high or low.
There no other way, without feedback I cannot realise what you are after.
With that of the table, for you application is absolutely critical that you need to know if the actual output is high or not.
If so you could you (simple words) just connect the output to a input so if you want to know the output is high then the input must also be high.
Ore sounds this to simple
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 updated the component to version 1.64
in this version the communication pins SDA / SCL are stored and do not default back when re-opening you code.
Also I have added a new variable to each timer "Output Enable" with this variable you can choose if you want to use the timer output ore not.
This lets you compile you program with all timers enabled but not outputs used.
I hope you like these changes.
Regards Jordy
You can download the program here: http://www.matrixmultimedia.com/mmforum ... 58&t=12882
in this version the communication pins SDA / SCL are stored and do not default back when re-opening you code.
Also I have added a new variable to each timer "Output Enable" with this variable you can choose if you want to use the timer output ore not.
This lets you compile you program with all timers enabled but not outputs used.
I hope you like these changes.
Regards Jordy
You can download the program here: http://www.matrixmultimedia.com/mmforum ... 58&t=12882
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
Hi Everybody,
In the past I have decided to leave out the automatic calculation of the day of week.
Today I spend a little bit of time at another project, and discovered that the automatic calculation of the day of the week would be really handy.
So I went back to my previous version of the DS1307 component (V1.4) and looked at the formula and how to simplify it so it would actually fit inside a PIC16F877A with some other code as well. The first formula that I created in Flowcode uses different array to hold data for the month and stuff, I figured well If im going to work again on this formula, I might as well do it wright the "second time".
So I started from scratch, and reinvented the Gregorian Formula.
After 2 Hours of flowcoding I finally had it all working and it uses hardly any extra space on the target device.
So my question to all the DS1307 Component users is: Do you want a new update of the component with a automatic Day Of Week solution.
Regards Jordy
In the past I have decided to leave out the automatic calculation of the day of week.
Today I spend a little bit of time at another project, and discovered that the automatic calculation of the day of the week would be really handy.
So I went back to my previous version of the DS1307 component (V1.4) and looked at the formula and how to simplify it so it would actually fit inside a PIC16F877A with some other code as well. The first formula that I created in Flowcode uses different array to hold data for the month and stuff, I figured well If im going to work again on this formula, I might as well do it wright the "second time".
So I started from scratch, and reinvented the Gregorian Formula.
After 2 Hours of flowcoding I finally had it all working and it uses hardly any extra space on the target device.
So my question to all the DS1307 Component users is: Do you want a new update of the component with a automatic Day Of Week solution.
Regards Jordy
the will to learn, should not be stopped by any price
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi Jordy,
Should be really nice
Wich algorithm are you using ?
Regards,
Bernard
Should be really nice
Wich algorithm are you using ?
Regards,
Bernard
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- 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
Hi
Im using a gregorian formula to calculate the day of week.
I have used this website to get me going: http://www.millersville.edu/~bikenaga/n ... endar.html
I will add this option as soon as I get time for it.
Regards Jordy
Im using a gregorian formula to calculate the day of week.
I have used this website to get me going: http://www.millersville.edu/~bikenaga/n ... endar.html
I will add this option as soon as I get time for it.
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 updated the component to version 1.65 which includes the Day of week calculation.Crenwick wrote:Hi Jordy,
Should be really nice
Wich algorithm are you using ?
Regards,
Bernard
From now on you don't have to enter this value.
If you used version 1.64 and lower then you need to re-enter the macro WriteDate. Because when you compile you program with the new version 1.65,
you will get a error message from the compiler saying "To many Arguments" you will have to adjust this by re-entering the WriteDate Macro.
Regards Jordy
the will to learn, should not be stopped by any price
Re: DS1307 - RTC Time Keeper
I have problem with this, i have latest version of Flowcode V6 and have tried 1.6.5 and 1.6.4 versions of this component, and i get this when adding it to project: Failed to add the component: DS1307 RTC
Hope someone answers and helps me !
Hope someone answers and helps me !
- 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
If you can share your flowcode program, trough a sharing site I can have a look for you.
Also and don't quote me on this, but if you have a trail version of flowcode it won't let you use the I2C component
I think. I could be wrong, if so please correct me.
Regards jordy
Also and don't quote me on this, but if you have a trail version of flowcode it won't let you use the I2C component
I think. I could be wrong, if so please correct me.
Regards jordy
the will to learn, should not be stopped by any price
Re: DS1307 - RTC Time Keeper
Actually i have trial version, downloaded V6 just for testing this! Thank you for information.
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
- Contact:
Re: DS1307 - RTC Time Keeper
Good afternoon,
I wonder if with this component can use a DS1338.
I leave the link
http://www.ebay.co.uk/itm/3-3V-5V-I2C-R ... 4179022677
Thank you
I wonder if with this component can use a DS1338.
I leave the link
http://www.ebay.co.uk/itm/3-3V-5V-I2C-R ... 4179022677
Thank you
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi,
Yes, it's pin/register compatible and works also on 3v3.
Regards,
Yes, it's pin/register compatible and works also on 3v3.
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi
I have a problem.
In simulation of this component is ok.
When I move the program to the chip it shows me
00:00:00
00/00/00
Have tried for a pull-up resistance on SDA and SCL pins in but gave the same thing.
Does the chip configuration? If you can confirm that the error is not setting thanked
I have a problem.
In simulation of this component is ok.
When I move the program to the chip it shows me
00:00:00
00/00/00
Have tried for a pull-up resistance on SDA and SCL pins in but gave the same thing.
Does the chip configuration? If you can confirm that the error is not setting thanked
- Attachments
-
- RTD_DataLogger_Experiencia.fcfx
- (11.58 KiB) Downloaded 894 times
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: DS1307 - RTC Time Keeper
Have you programmed the chip with a time and date?
Do you have a battery backup for the chip? Otherwise you would need to program the time and date every time you power up the system.
Do you have a battery backup for the chip? Otherwise you would need to program the time and date every time you power up the system.
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi
Who can tell me how to shoot the variable minutes and seconds to use for another purpose?
I want 30 seconds in 30 seconds do a particular function, but do not know how to do this without a variable seconds.
Who can tell me how to shoot the variable minutes and seconds to use for another purpose?
I want 30 seconds in 30 seconds do a particular function, but do not know how to do this without a variable seconds.
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
- Contact:
Re: DS1307 - RTC Time Keeper
HiEmanuel Lourenco wrote:Hi
Who can tell me how to shoot the variable minutes and seconds to use for another purpose?
I want 30 seconds in 30 seconds do a particular function, but do not know how to do this without a variable seconds.
Anyone know how I can do this?
greetings
-
- Posts: 39
- Joined: Tue Feb 12, 2013 9:07 am
- Has thanked: 4 times
- Been thanked: 5 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hello
I'm working on a similar clock, with the possibility of downloading time with DCF77. Decoding the information I have more or less an refined. I only have a problem communicating with RTC DS1307, which in your project is used. My processor is a PIC16F876A clocked at 19.66 MHz, RTC1307 hooked into RC4 SDA and SCL RC3 (of course podciądnięte at 5V using resistors 3300 ohm). In my system it looks so bad that the processor reads data from the RTC by writing such information 45:85:85 45/25/165. Can I ask for help?
I'm working on a similar clock, with the possibility of downloading time with DCF77. Decoding the information I have more or less an refined. I only have a problem communicating with RTC DS1307, which in your project is used. My processor is a PIC16F876A clocked at 19.66 MHz, RTC1307 hooked into RC4 SDA and SCL RC3 (of course podciądnięte at 5V using resistors 3300 ohm). In my system it looks so bad that the processor reads data from the RTC by writing such information 45:85:85 45/25/165. Can I ask for help?
- Attachments
-
- rtctest.fcf
- (86.21 KiB) Downloaded 964 times
-
- Posts: 39
- Joined: Tue Feb 12, 2013 9:07 am
- Has thanked: 4 times
- Been thanked: 5 times
- Contact:
Re: DS1307 - RTC Time Keeper
I'm sorry I was wrong threads.siwo278 wrote:Hello
I'm working on a similar clock, with the possibility of downloading time with DCF77. Decoding the information I have more or less an refined. I only have a problem communicating with RTC DS1307, which in your project is used. My processor is a PIC16F876A clocked at 19.66 MHz, RTC1307 hooked into RC4 SDA and SCL RC3 (of course podciądnięte at 5V using resistors 3300 ohm). In my system it looks so bad that the processor reads data from the RTC by writing such information 45:85:85 45/25/165. Can I ask for help?
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi all. Maybe I found bug in DS1307 component /or not/. When I choose day of week to be displaying as number, for example 5 /Friday/, the day is true. When I choose day to be displaying as word /first 3 or all/, it's false- displaying "Thursday".
Also I try example with PIC16F876A and found that if I connect DS1307 to RC3 and RC4 /it's default/ circuit not work.
The time says 45:85 and the date is 45/25/165, the day is 255. When I change pins, as an example RC2 and RC5 - it work correct.
I try with simple timer but it's not work. Maybe I didn't do something right?
I have question: can I adjust the timers from software and if I can, how make it?
I upload my example and be happy if somebody explain where's my mistakes.
Also I try example with PIC16F876A and found that if I connect DS1307 to RC3 and RC4 /it's default/ circuit not work.
The time says 45:85 and the date is 45/25/165, the day is 255. When I change pins, as an example RC2 and RC5 - it work correct.
I try with simple timer but it's not work. Maybe I didn't do something right?
I have question: can I adjust the timers from software and if I can, how make it?
I upload my example and be happy if somebody explain where's my mistakes.
- Attachments
-
- DS1307.rar
- (24.59 KiB) Downloaded 983 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: DS1307 - RTC Time Keeper
Hi Jordy,
We all appreciate you sharing the user component you developed, so thank you.
If you are interested, I have created a fairly simple way to calculate the dates (from years 2000 - 2099) that BST and GMT come into force.
Then these dates are used to adjust BST and GMT times, so hours are automatically adjusted +1 or -1 at the correct times.
Tried on hardware and is fully working.
If you wish to implement it within your DS1307 component then I can help you with the two basic formula's (unless you already know/or implemented already).
I could also post the formula's on this thread if its of some interest.
We all appreciate you sharing the user component you developed, so thank you.
If you are interested, I have created a fairly simple way to calculate the dates (from years 2000 - 2099) that BST and GMT come into force.
Then these dates are used to adjust BST and GMT times, so hours are automatically adjusted +1 or -1 at the correct times.
Tried on hardware and is fully working.
If you wish to implement it within your DS1307 component then I can help you with the two basic formula's (unless you already know/or implemented already).
I could also post the formula's on this thread if its of some interest.
Martin
-
- Posts: 61
- Joined: Sat Apr 11, 2015 12:07 pm
- Has thanked: 20 times
- Been thanked: 14 times
- Contact:
Re: DS1307 - RTC Time Keeper
What a great piece of work, its working great so far on the Arduino UNO, the only strange thing is the date is coming back as a day behind, I expect I'm doing something wrong somewhere.
Thanks very much for your work
Thanks very much for your work