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
DS1307 project 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:
DS1307 project problem
- 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
( 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 )
Seems to be a clock error ?
( I can't open the fcf as I only have flowcode v3 )
- 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
thats a pitty
What Can I do to so you can examine the file.
What Can I do to so you can examine the file.
the will to learn, should not be stopped by any price
- 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
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.Seems to be a clock error ?
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
the will to learn, should not be stopped by any price
- 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
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Eric Brouwer
- Posts: 20
- Joined: Sat Oct 30, 2010 10:17 am
- Has thanked: 3 times
- Been thanked: 11 times
Re: DS1307 project problem
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.
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.