Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS1307 interfacing with pic 16f877a

Status
Not open for further replies.

rcsnair

New Member
I am facing a problem with ds1307. I made a cirucuit to display date and time on 16x2 lcd display using pic16f877a. Its working perfectly well but when power supply goes, ds1307 is not keeping its time, I connected 3V battery to ds1307 as per its datasheet. Can any body help me regarding this problem.
 
Lets see the code.

The first code you insert into the PIC, tell the ds1307 to start off with say 12 hours and 10 minutes

every time you put that code in, you start from 12 hours and 10 minutes, you have to put that code ONLY ONCE, and then remove the part that tells it to start from that date, leave the battery wired to it at all times.

After you turn it off, what do you get? just zeros?
 
Circuit for my project

I am facing a problem with ds1307. I made a cirucuit to display date and time on 16x2 lcd display using pic16f877a. Its working perfectly well but when power supply goes, ds1307 is not keeping its time, I connected 3V battery to ds1307 as per its datasheet. Can any body help me regarding this problem.

The circuit is as shown in the following link

Digital Clock using PIC16F877A and DS1307 RTC Code in MikroC |Linux and Microcontroller Tips

I am using the crystal 32.768KHz

Thank you,
 
The circuit is as shown in the following link

Digital Clock using PIC16F877A and DS1307 RTC Code in MikroC |Linux and Microcontroller Tips

Hi
Looking at your link, that shows a DS1307 with no battery.?? pin3 at 0v
Perhaps the program is written assuming the power is never switched off the project.??

I am using the crystal 32.768KHz

Thank you,
Hi
Looking at your link, that shows a DS1307 with no battery.?? pin3 at 0v
Perhaps the program is written assuming the power is never switched off the project.??
ie: it re-inits the DS1307

EDIT:
Unable to get the program from that link.?
The d/s for the DS1307 says pull up resistors, not pull down, I use 2k2 pull ups, no problems.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top