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
Ds1307 Writing date problem
Moderator: Benj
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
- Dan81
- Valued Contributor

- Posts: 268
- Joined: Sun Jan 15, 2006 4:07 pm
- Location: Albi France
- Been thanked: 60 times
- Contact:
Re: Ds1307 Writing date problem
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
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
- Attachments
-
- RTC-v4c.fcf
- (20.28 KiB) Downloaded 352 times
-
Spanish_dude
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: Ds1307 Writing date problem
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.