DS3231 - RTC Time Keeper

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

Moderator: Benj

mohandino
Posts: 22
Joined: Fri Jun 29, 2007 9:41 pm
Has thanked: 1 time
Contact:

Re: DS3231 - RTC Time Keeper

Postby mohandino » Mon May 18, 2015 7:09 pm

Hello,

Can you tell me if the V2.1 version is now the best or not ?

thanks

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Fri Jun 26, 2015 2:55 pm

Hello,
I am using the Tiny RTC with the great DS3231 component. (Many thanks for it)
But my day of week return is alway a day behind. Would it just be the cheap bit of hardware I've bought or am I making a mistake somewhere.bthanks for any advice.
Attachments
image.jpg
I'm always a day behind, same as the rest of my life
(1.32 MiB) Downloaded 2771 times

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby hyperion007 » Fri Jun 26, 2015 3:01 pm

Doesn't the Tiny RTC I2C module use the DS1307 chip and not the DS3231? Does the DS1307 have exactly the same commands and functions?

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby medelec35 » Fri Jun 26, 2015 3:18 pm

Hi Daniel,
Yes the DS1307 and Ds3231 use exactly the same commands.
So if time is being displayed correctly with DS3231 and then you swap with DS1307, the time will be correctly displayed.
I would recommend Ds3231 as they are accurate to 3 minutes per year and you can assess built in temperature sensor.

Martin
These users thanked the author medelec35 for the post:
Pactor (Fri Jun 26, 2015 6:35 pm)
Rating: 5.56%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby hyperion007 » Fri Jun 26, 2015 3:20 pm

Ok. I just never used the DS1307 because as you say, the DS3231 is far superior.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby medelec35 » Fri Jun 26, 2015 3:35 pm

Hi Pactor
Pactor wrote:But my day of week return is alway a day behind. Would it just be the cheap bit of hardware I've bought or am I making a mistake somewhere.bthanks for any advice.

The day of the week (1 to 7) is not automatically calculated from the date and month,
So if day of the week is out then it requires manually changing to correct day of the week.
All the RTC does is increment that day of the week by one at 00:00.00 and if day of the week was 7 then will be changed to 1.

Martin
These users thanked the author medelec35 for the post:
Pactor (Fri Jun 26, 2015 6:35 pm)
Rating: 5.56%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Fri Jun 26, 2015 6:35 pm

Thanks for the info.
What ever date I put in a day of week is coming a day behind, but there seems to be no option to set the week, I'm not sure how it's arriving at it.
I will have a look a real DS3231

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby medelec35 » Sat Jun 27, 2015 9:09 am

Hi Pactor,
Was the DS3231 already set up with current day date and time, or did you program the date day and time?
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Sat Jun 27, 2015 10:31 am

Hello,
I just programmed the time and the date, there seems to be nothing on the component to set the day of week only to read DOW, it seems to be working it out somehow.
There's some clever boys at work somewhere. I'm sure I can get over it, I normally have some idea of what day it is, most days anyway.
I will read back the posts more.
Thanks

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby medelec35 » Sat Jun 27, 2015 12:46 pm

In that case you have two options.
1. Program the day using something like flowchart posted here
Or
2) Modify Flowchart your using to either probram RTC with new day or to display a different day of the week so correct day is shown.

Option one would probable be the easiest.
Flowchart posted can be improved, but since none has posted about any issues, I have not updated it.

Perhaps has a suggestion Jordy could add a WriteDay function?

Martin
These users thanked the author medelec35 for the post:
Pactor (Sat Jun 27, 2015 11:31 pm)
Rating: 5.56%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Sat Jun 27, 2015 11:31 pm

Thanks very much for the help.

Mark

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Sat Jun 27, 2015 11:48 pm

I've borrowed everyone's examples and have it running with DS18B20 sensor and RTC
All I need is a magnifying glass to see it on this tiny dot matrix display.
Attachments
image.jpg
I have it running with the DS18B20 sensor
(1.04 MiB) Downloaded 2727 times

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1079
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 440 times
Been thanked: 488 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Steve001 » Sun Jun 28, 2015 5:49 pm

Hi Pactor ,
That Display Looks Nice What Is It ?

Steve
Success always occurs in private and failure in full view.

Pactor
Posts: 48
Joined: Sat Apr 11, 2015 12:07 pm
Has thanked: 14 times
Been thanked: 9 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby Pactor » Sun Jun 28, 2015 7:11 pm

I got it from Ebay but its very small only an inch or so across £5.50

http://www.ebay.co.uk/usr/failsafe_electronics

LCD 0.96" 4 pin, 2 pin operation trough SPI or I2C.

Resolution: 128x64 pixels

Color: blue and yellow

Dimension: 28x28mm

Vcc: 2.2V - 5.5V
These users thanked the author Pactor for the post:
medelec35 (Sun Jun 28, 2015 8:48 pm)
Rating: 5.56%
 

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

Re: DS3231 - RTC Time Keeper

Postby petesmart » Tue Jun 28, 2016 1:51 pm

HI Jordy,

I have been looking at your component for the DS3231 that you posted some time back. Would it be possible for me to get access to the source so that I can update it to drive a DS3232? this is a later version RTC

Happy to post back the updated version on the forum.

all the best

Pete
sorry about that Chief!