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 in RTC as it does not work when it is removed from power.

Status
Not open for further replies.

ARAVINDHANK

Newbie level 6
Joined
Jan 23, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
I am using PIC18, an RTC DS1307 and an LCD. the timer is running in good condition only when it is powered, it does not works in battery mode. Can anybody solve this problem......?
 

you've obviously connected it incorrectly, or are not providing a Vbatt of 3 volts. What exactly do you mean by working in battery mode ? Are you trying to read/ write during 3v condition ? If so, then DS1307 is designed to not respond in this situation. Its a feature.
 

What I mean is that the RTC must continue displaying the time when it is disconnected from 5V and connected to the LCD again with 5 V again. Otherwise how can I test that the clock is running even in battery mode. Is there any other way?
 

What I mean is that the RTC must continue displaying the time when it is disconnected from 5V and connected to the LCD again with 5 V again. Otherwise how can I test that the clock is running even in battery mode. Is there any other way?

Ok, so now you need to post your circuit setup, and also your code, along with some details of what exactly does happen.
Are you initialising the RTC with your PIC ? If so, then does your PIC also go through a Reset sequence when you cycle through the battery mode ?
 

I have written coding to calculate engine hours. The RTC must work even when the PIC is switched OFF and ON ie., the clock must not stop. But when switched OFF and ON, the timer starts running from initial value. Can you suggest any solution?
 

Attachments

  • scr.doc
    266.5 KB · Views: 61

This is always so in the Proteus, it does not simulate the battery mode when not running :)razz:).

The 1307 has a CH (Clock Halt) bit, it's the bit 7 of the register 0 (datasheet!).
In reality (not in the simulator!) this bit can be tested at startup, and if it is zero, the clock is running, but if it is 1 then have to re-initialize it.

However, if you want to test the circuit in Proteus, you can reset the processor (do not stop the simulation !).
zuisti
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top