DS1307 Question

DDJ2011

Member
If I don't have a backup battery right now, do I need to connect the Vbat pin to somewhere - and if so, where to? Ground I guess?
 

nick12ab

Senior Member
Yes, you must connect Vbat to Gnd if no backup battery is connected. If you leave it floating, unexpected results will occur as the IC disables i2c comms when Vbat rises above two thirds of the supply voltage
 

srnet

Senior Member
For any projects I am working on, I download the data sheets and save them in a project folder so that they are always to hand.

Plus seperate folders for PIC data sheets, a folder on my desktop with pictures of PICAXE pinouts, etc.

Saves sooooo much time.
 

IronJungle

Senior Member
Yes, you must connect Vbat to Gnd if no backup battery is connected.
I am attempting a 'meter clock' with a 14M2 and DS1307. The datasheet says: "Battery input for any standard 3V lithium cell or other energy source. Battery voltage must be held between 2.0V and 3.5V for proper operation."

I couldn't see anything about connecting Vbat to GND without a battery. If I tie Vbat to GND it will be under the 2.0V spec. Did I miss something?
 

nick12ab

Senior Member
I am attempting a 'meter clock' with a 14M2 and DS1307. The datasheet says: "Battery input for any standard 3V lithium cell or other energy source. Battery voltage must be held between 2.0V and 3.5V for proper operation."

I couldn't see anything about connecting Vbat to GND without a battery. If I tie Vbat to GND it will be under the 2.0V spec. Did I miss something?
You are missing something - page 6
If a backup supply is not required, VBAT must be grounded.
The '2.0V spec' is for proper operation when running from the battery.[hr][/hr]However, my claim of two thirds being the cut off point for communications is an exaggeration.
The nominal power-fail trip point (VPF) voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 x VBAT nominal.
 

g6ejd

Senior Member
Extract from data sheet, although I admit it took me a while to find it and only on the MAXIM web site, there is a short-form data sheet that excludes this statement:

Backup Supply Input for Any Standard 3V Lithium Cell or Other Energy Source. Battery voltage must be held between the minimum and maximum limits for proper operation. Diodes in series between the battery and the VBAT pin may prevent proper operation. If a backup supply is not required, VBAT must be grounded. The nominal power-fail trip point (VPF) voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 x VBAT nominal. A lithium battery with 48mAh or greater will back up the DS1307 for more than 10 years in the absence of power at +25°C.
UL recognized to ensure against reverse charging current when used with a lithium battery. Go to: www.maxim-ic.com/qa/info/ul/.
 

IronJungle

Senior Member
Well..... It's a few minutes later and I am here to tell you that if you send Vbat to GND on my project things get really hot and smelly in a hurry.
The RTC and 5V regulator were hot to the touch. The PICAXE and 3 meters (shown in the vid) just carried on happily....

I am stopping for the day, but one more question first:
The AXE091 dev board and the PICAXE RTC wizard seem to suggest the 24LC16B EEPROM is required.

Is the EEPROM required to have the D1307 function with the PICAXE?
 
Last edited:

MartinM57

Moderator
Then I think, unfortunately, you have a wiring error :(

Check, double check..and then check again (before you switch it on again) - remove the PICAXE and DS1307 and check connectivities ... The ones that should exist and the ones that shouldn't. Hopefully you haven't destroyed anything. Hopefully.
 

nick12ab

Senior Member
Well..... It's a few minutes later and I am here to tell you that if you send Vbat to GND on my project things get really hot and smelly in a hurry.
The RTC and 5V regulator were hot to the touch.
Weird. I have occasionally had this happen - at least the DS1307 survives (in my case). My guesses for how it could possibly happen are that there could be a hairline short between tracks on stripboard, could be some strange oscillation in the circuit causing the chip to misbehave or it could be because of latch-up.
 

IronJungle

Senior Member
Then I think, unfortunately, you have a wiring error :(
I know that everyone always says their wiring is correct, so I may as well join the pack...

I can see that nothing is connected to Vbat on breadboard. It is clearly floating. If I add a wire that brings Vbat to GND, then *hot*.

Now that I have gotten that out of my system, I will go recheck the wires. :cool:
 

eclectic

Moderator
snipped
I am stopping for the day, but one more question first:
The AXE091 dev board and the PICAXE RTC wizard seem to suggest the 24LC16B EEPROM is required.

Is the EEPROM required to have the D1307 function with the PICAXE?
1. The AXE091 has both a DS1307 socket and an EEPROM socket.

2. Are you getting your Wizards in a twist? See pics.

The DS1307 can be set without an EEPROM.

e
 

Attachments

eclectic

Moderator
I know that everyone always says their wiring is correct, so I may as well join the pack...

I can see that nothing is connected to Vbat on breadboard. It is clearly floating. If I add a wire that brings Vbat to GND, then *hot*.

Now that I have gotten that out of my system, I will go recheck the wires. :cool:

OK, now perhaps post a High quality photo of your setup.

e
 

IronJungle

Senior Member
e:

Thanks for the help. My replies...

@1) Yes. The AXE091 has the EEPROM, but I don't have the RTC on the AXE091. It is on a breadboard. I noticed the EEPROM connection when I was looking at the AXE091 schematic on how the RTC was connected. The RTC and EEPROM have common connections. Thus my question on if the EEPROM was needed.

@2) I used the RTC wizard in your first attachment. The MACAxePad does not have a RTC Wizard, so I created it on my Windows PC. I noticed one of the early commands from the wizard output is: " high 5 ' write protect eeprom ". So I am thinking the wizard needs the EEPROM? If not, is there an example?

@3) I wish I would have bet a dollar (or a pound) that you would ask this. :) See attached.

Thanks, all, for helping me with this.

all.JPGclose.JPG


1. The AXE091 has both a DS1307 socket and an EEPROM socket.
2. Are you getting your Wizards in a twist? See pics.
3. (from next post) OK, now perhaps post a High quality photo of your setup.
The DS1307 can be set without an EEPROM.
e
 

John West

Senior Member
I took a good look at you pictures, and while they're very high rez, the wiring is just disorganized enough that I can't be certain what connects to what.

I'd suggest you do two things:
1.) Rewire it so it's clear where everything is coming from and going to.
2.) Do not ever use both black and red wire to indicate the same power supply potential. Red is + Black is - (i.e. ground,) period. If white and green are the only other colors you have, use them for everything else. But don't mix them on the same signal path.

One of the first things I did for a student of mine was provide him with about 6 different colors of wire and tell him what I just told you. It was probably about the most useful thing I taught him.
 

IronJungle

Senior Member
Update on my project. Thanks for the help.

- Vbat is grounded now and things don't get hot.
- I have the RTC working. The output is blinking a LED every second.
- I am reading hours, mins, and secs from the RTC successfully.
- I am using the RTC time hours, mins, and secs to set a PWM for each meter.
- The PCM on each meter is working.

Next, I need to do some PICAXE math to get the meters to range 0 to full scale based on the hours, mins, and secs.

Things are coming along and thanks again.
 

John West

Senior Member
I'm thinking if you take a look at the mixture of red, black, green and white wires used in the same signal (and power) paths, your guess will not be far wrong. It's a lesson I'm still reminding myself of to this day, usually because I failed once again to follow it.
 

premelec

Senior Member
Hey John - if you use one color for everything then you've never got the wrong color connected~!.... I like Spectra Strip - the rainbow flatline - it's pretty.
 
Top