Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with DS1307 RTC not incrementing timing value?

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
Hello!! I just interfaced DS1307 with PIC18F8722, simulation in proteus is working fine but the problem is that it is not working in hardware.

I write time 17 hour 0 Min 09 sec and 26 Dec 2012 in rtc and its working fine and then read the time and date and displayed it on lcd, this working fine and just displaying this value with out incrementing

i changed the crystal 32.768Khz (though it might be not working properly) it works and then again fails to work

One strange thing when measuring volateg on oscillaor pin.
My Multimeter is in voltage mode and -ve probe is connected to ground and +ve probe is connected to oscillator first pin.

The Clock start running and by removing the probe it stops :-(

I am not able to know what is the problem, why it is not working.

Pls help

Connection
 

Have you connected a battery to the chip?
If not Vbat should be connected to gnd.
 

No i have not connected battery..
But connected theVbat pin to ground

i used 10k to pull the lines scl and sda

used capacitor of 32.768khz with 10pf capacitors connected to it and then other terminals are ofcapacitors grounded.
The strnge things is that timing and date are reading and written properly.
The timr is not incrementing dont know why?
i thought it was due to crystal
i changed crystal and after that it works fot few secs and then stop working

then i was measuring voltage using fluke multimeter as soon as i.connected the probe to oscillstor pin num 1
it starts working and as i remove the probe it stops.

its really strange thing
 

hat may be the problem. connect the battery backup or just disconnect it from ground. check for the incrementation. if you wrote a control word for a sqr_wave output can also check from the CRO.
 

It starts working now..
i just remove the capacitor from the crystal.

Just using the Crystal without using the capacitor.

Its working fine now.
 

Thanks for your reply

and yes yes i see datasheet and then remove the capacitors.

Can.anyone tell me how to update timing information even the system is switched off


Means in my code i write timing and date first
and after that reading these values and displaying it on lcd

but when i read at the starting it doesnt works.
dont know why.??
i dont want my clock to stop
how to implement it.
 

are you placed a backup battery to your RTC? if not place it. and read the RTC for time.

Previously I had not placed placed battery.

But now i had connected the battery 3V Battery and now nothing is working.

Means whatever i write i am getting it back..
Time is not incrementing again..

But after touching the probe of multimeter with first pin of crystal it starts working...
Don't know what is happening..

Even some time my rtc ds1307 get over heated.

But sometimes now..

I checked the pulses 32.768KHz Crystal on oscilloscope, nothing is coming..

Please suggest something what to do..
 

Previously I had not placed placed battery.

But now i had connected the battery 3V Battery and now nothing is working.

Means whatever i write i am getting it back..
Time is not incrementing again..

But after touching the probe of multimeter with first pin of crystal it starts working...
Don't know what is happening..

Even some time my rtc ds1307 get over heated.

But sometimes now..

I checked the pulses 32.768KHz Crystal on oscilloscope, nothing is coming..

Please suggest something what to do..

Using a standard oscilloscope probe to measure the output directly from a crystal can often stop or drastically alter the frequency of oscillation due to the capacitive loading from the probe.

Typically an active probe with a low capacitance loading is used in such situations.


The overheating of the DS1307 maybe an indication the device was damaged, subject to reverse polarity of either the battery or standard power connections or operated at a voltage outside its specification.


If you are setting the time and date properly and it is not incrementing as expected, have you ensured the Clock Halt (CH) bit is properly cleared to start the clock.

Upon powerup the CH bit, bit 7 of Register 0, is set effectively halting the clock, it must be manually clear to successfully start the clock incrementation.

Bit 7 of Register 0 is the clock halt (CH) bit. When this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. On first application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00 (MM/DD/YY DOW HH:MM:SS). The CH bit in the seconds register will be set to a 1. The clock can be halted whenever the timekeeping functions are not required, which minimizes current (IBATDR).

Also the use of 10kΩ resistors as pullups on SDA and SCL maybe a bit on the high side, if the DS1307 is the only device attached to the I2C bus you might try resistors in the 4.7kΩ to 2.2kΩ range.


Design calculations for robust I2C communications



BigDog
 
Thanks for your reply...
i changes my ds1307 rtc icand its working perfectly now..


its working perfectly from last 6 hours.


thanks for your replies
I will report any misbehaviour if occurs
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top