Page 1 of 1

Ds1307 Writing date problem

Posted: Wed Mar 30, 2011 11:50 am
by Jordy101091
Hi, Guys

I have some trouble with my DS1307. I can write the time succesfully but when i'm trying to set the date (dd/mm/yy) I get strange values. I have copy't the calculation from the example file (RTC_4b.fcf) to convert decimal numbers into binary coded decimal numbers.

I use DEC to BCD conversion for setting the time, I thought to use this same formula to convert the date data so the ds1307 can understand it. But one way ore the other it doesn't work. As you can see in the video I have made

What am I doing wrong here, maybe guys from the forum can give me a working example to work with I find out my self what I have done wrong.
I use the eeprom memory to store the converted data that I have set in the menu.

In the video you can see me setting different values of date, but no correct result. Hope you can help me.

AND yes I have selected the wright register address 04H to start writing the date first then the month and last the year and finish with a stop macro.


Link yo video: http://www.vimeo.com/21660419

Re: Ds1307 Writing date problem

Posted: Fri Apr 01, 2011 2:04 pm
by Dan81
Hello Jordy

There is an error in "RST-sec" macro.
A wrong copy/paste.
For the month , the component macro was "receive" instead of "transmit".

Sorry for your lost time.

Daniel

Re: Ds1307 Writing date problem

Posted: Tue Apr 05, 2011 9:02 pm
by Spanish_dude
I got myself some DS1307 RTC's so if the program made by Dan81 doesn't work, I'll try this week-end, if I haven't anything else to do.