Page 1 of 1

DS1307 project problem

Posted: Sun Mar 20, 2011 2:21 pm
by Jordy101091
Hi all,

I have a problem with my DS1307 chip.
I use this example file (init_time_v3.fcf) to study the I2C protocol.

My problem is as follow:

First thing that I have done was remove the backup battery and disconnect the chip from the 5V supply. Then replaced the chip and connect it to +5V and reinserted the backup battery. I loaded the flowcode into my PIC16F877A and pressed button A0. the time is set correctly and the clock is running.

PERFECT.

When I want to change the time from 07:30:00 to lets say 11:25:00 the DS1307 is going crazy. When I upload the code into my chip all kinds of different time value are showing up (01:01:01 and then 32:06:48 and then 00:00:85 ect.) Only when I keep pressing A0 the time is wright and the clock is running properly. Why is the chip doing this.

can some one please explain whats happening.

I will attach the example file that I have got from the forum.

Hope you can help me out.

Regards Jordy

Re: DS1307 project problem

Posted: Sun Mar 20, 2011 2:57 pm
by Spanish_dude
( previous topic : http://www.matrixmultimedia.com/mmforum ... 213#p23318 )

Seems to be a clock error ?
( I can't open the fcf as I only have flowcode v3 )

Re: DS1307 project problem

Posted: Sun Mar 20, 2011 3:05 pm
by Jordy101091
thats a pitty

What Can I do to so you can examine the file.

Re: DS1307 project problem

Posted: Sun Mar 20, 2011 3:29 pm
by Jordy101091
Seems to be a clock error ?
I have search the whole internet to find something/someone with a relation to my problem but i can find anything. Thats the only thing going wrong.
I can set the time with an menu that I have made. and it loads correctly but the random values are showing up only when I hold down button A0 it shows up correctly.

I'm thinking with all my knowledge but I can figure It out.

Please help :oops:

Re: DS1307 project problem

Posted: Mon Mar 21, 2011 11:31 am
by Benj
Hello,

Are you using your own hardware or are you using E-blocks? Could it be that your switch is left floating when the switch is not pressed rather then being tied to a voltage rail with a resistor?

Re: DS1307 project problem

Posted: Mon Mar 21, 2011 11:33 am
by Benj
Hello,

Are you using your own hardware or are you using E-blocks? Could it be that your switch is left floating when the switch is not pressed rather then being tied to a voltage rail with a resistor?

Re: DS1307 project problem

Posted: Sun May 22, 2011 10:36 pm
by Eric Brouwer
Another problem during testing and development of DS1307 projects, is that there in normally no battery connected to the DS1307. In this case, the Vbat pin (pin 3) MUST be connected to 0V. With the pin floating, the DS1307 will sometimes block writes to the device.

Not related to your problem, but it might save someone else many frustrating hours. When designing the product, also ensure that your battery holder is of the type that short out the positive and negative terminals of the battery holder when the battery is removed.

Re: DS1307 project problem

Posted: Wed May 25, 2011 1:01 pm
by achillis1
Hello Jordy,

I know I am a little late but did you solved your problems regarding DS1307?

Best Regards,

Andreas Achilleos