DS1307 Real Time Clock SWQ/OUT current draw when using Vbat and a pullup
![Zoot](https://forums.parallax.com/uploads/userpics/559/nW4UO23UEIWZ4.png)
Somebody said...
PIN 7 SWQ/OUT
Square Wave/Output Driver. When enabled, the SQWE bit set to 1, the SQW/OUT pin
outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz, 32kHz). The SQW/OUT
pin is open drain and requires an external pullup resistor. SQW/OUT operates with either
VCC or VBAT applied.
I'm using the DS1307 on a project (it's an I2C RTC similar to the DS1302). I have no problem using the RTC or with my code, but I was in the process of hooking up the SQW/OUT pin and had a question.
I was going to use this pin running at 1hz with a poll latched pin on my Stamp, along with the required pullup. BUT if the SQW/OUT pin runs on Vbat as well as Vcc, then wouldn't I be drawing current from my RTC backup battery over and above the needs of the RTC/NVRAM itself? I was going to use the SQW for a "seconds" watchdog timer, but not at the expense of running down the backup battery faster.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
pdf
![](/plugins/FileUpload/images/file.png)
695K
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Do you really mean the Stamp is powered down, or only that it is in a SLEEP or POLLWAIT state?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
And yes, the pullup is to the main electronics (and Stamp) Vdd. Duh -- with power off at Vdd I wouldn't see a current draw from the RTC backup battery.
I was using a 20k pullup but it sounds like I can go much higher to cut down on current draw regardless. Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST