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.

[SOLVED] [Moved]: problem in Real Time Clock ? clock does not run in DS1307

Status
Not open for further replies.

N.Karthick

Junior Member level 2
Joined
Sep 19, 2014
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Tirupur, India
Activity points
166
Dear experts,

i'm getting problem in RTC on hardware. clock does not run in DS1307. First i set the time on rtc DS1307, whenever i read the clock, it will shows the same time as i set.

kindly find the attachment for the circuit i used.

- - - Updated - - -

PIN 1 & 2 connected to 32.78khz
PIN 3 connected to 2032 BAT
PIN 4 Connected to GND
PIN 5 connected to SDA
PIN 6 connected to SCL
PIN 7 NC
PIN 8 Connected to 7805. (I/P Voltage is 4.95v)

Proteus adjusts everything for proper running any integrated circuits.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    335.9 KB · Views: 87
Last edited by a moderator:

Assuming you really intended to wire the SDA pins together and SCL pins together and assuming your software really is writing and reading correctly, the only other conclusion is that the crystal oscilator is not running. Check the 32.768KHz crystal and it's connections to the DS1307. Note the frequency should be in KHz, not MHz as you have shown.

Brian.
 

The output on pin 7 is your best debugging tool.

Enable the DS1307 registers to output a 1 Hz signal, and connect an LED (with a series resistor) on its output.
A properly working unit will display a blinking LED.
 

sorry,i just uploaded wrong schematic , here i attached correct schematic.
 

Attachments

  • Untitled.png
    Untitled.png
    124.3 KB · Views: 98

Thats better! Electrically it should now work but my original diagnosis still stands. There is no "stop/start" control in the DS1307, it should start counting as soon as the 32.768KHz crystal oscillates so if the time isn't advancing the only reason can be that the oscillator is not running.

Brian.
 

one question raised during real time hardware.

in simulation i set the time only not date. it will works, is this same on the hardware?
 

Oops! You are quite right FvM, my apologies.

Referring to post #7, if the clock is running, the date will still work but obviously will not be set correctly. It isn't necessary to set all the registers before counting commences.

Are you running this only in a simulation or in real hardware? Possibly your simulator does not accurately reflect the functions of the DS1307 and time keeping is not implemented.

Brian.
 

in simulation i am getting ouput properly.

but not in hardware. when i read the ds1307 it will shows the same time what i earlier set .
 

I assume you setting the time every time when its got POR or reset.
disable the setting time function from your code once its sets.and load the code again.
 

Thank you for all replies . i found the problem, i'm not set the date. after i setting it works properly.

because simulation takes the date and time form the system clock.

anyway thanks to all.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top