DS1307 project problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

DS1307 project problem

Post 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
Attachments
init_time_v3 (3).fcf
The file from the forum
(15.5 KiB) Downloaded 419 times
the will to learn, should not be stopped by any price

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times

Re: DS1307 project problem

Post 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 )

User avatar
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 project problem

Post by Jordy101091 »

thats a pitty

What Can I do to so you can examine the file.
the will to learn, should not be stopped by any price

User avatar
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 project problem

Post 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:
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DS1307 project problem

Post 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?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DS1307 project problem

Post 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?

User avatar
Eric Brouwer
Posts: 20
Joined: Sat Oct 30, 2010 10:17 am
Has thanked: 3 times
Been thanked: 11 times

Re: DS1307 project problem

Post 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.

User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times

Re: DS1307 project problem

Post by achillis1 »

Hello Jordy,

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

Best Regards,

Andreas Achilleos

Post Reply