DS1307 square wave generator?
rwgast_logicdesign
Posts: 1,464
So ive been building this board the last few days and it has come time to add the RTC to it. My initial plan was to use a ds1307 on the i2c bus to save some pins, but I didn't realize it needed a 5v VCC till I went through the data sheet this morning. They way my board is set up as far as power rails is a little different than most, and I would like the clock to run even when the the 5v rail is unplugged, i know if the backup battery is used the chip will keep the time even when the 5v rail is unplugged but will the propeller be able to read write to it on backup power only, I am assuming not?
I have some DS1302 chips also so I though about just using one of those instead. Basically this really comes down to a trade off in features I want/need and the DS1307 square wave generator has my interest peeked, I am trying to figure out an application for it. It appears as though it is only able to output a set frequency, so you cant just make it pulse every hour or something like that? The only use I can figure out is to output the square wave to the propeller and use it to count the pulses in order to get timing under 1 second, In which case the prop can already do this.... I'm just trying to figure out what this could be used for and if it is worth having. Even off the wall creative uses.
I have some DS1302 chips also so I though about just using one of those instead. Basically this really comes down to a trade off in features I want/need and the DS1307 square wave generator has my interest peeked, I am trying to figure out an application for it. It appears as though it is only able to output a set frequency, so you cant just make it pulse every hour or something like that? The only use I can figure out is to output the square wave to the propeller and use it to count the pulses in order to get timing under 1 second, In which case the prop can already do this.... I'm just trying to figure out what this could be used for and if it is worth having. Even off the wall creative uses.
Comments
In the pin description on page 6, then a little bit about how to set up the registers in the i2c section. This is why Im curious about uses for this pin. I tried Googling it mostly came up with irrelevant Arduino threads where they keep track of the pulses via an interrupt to get timing in fractions of a second. The propeller has more than adequate short term timing so I am not really sure what this pin would be useful for. I will be using the 1307 anyways, as it turns out my oscillators require a 5v VCC too so may as well stick with the 1307. I just feel like there has to be a use for this pin i am missing.
https://github.com/manitou48/crystals
High frequency output from the RTC pulse output is helpful if you need to calibrate the RTC against an accurate timebase, or measure its temperature sensitivity. It's easier to make that comparison at 32768Hz than at 1Hz.
That one looks pretty nice, too. I'll have to keep it in mind. It looks like Mouser just started stocking the ISL12020M and it's almost $3 cheaper than the Maxim DS32xx series, but it's a DFN package and they don't have the SOIC version (ISL12022M). Maybe they'll add it soon. Digi-Key has it, but I almost never buy from there since Mouser is close and regular shipping only takes a day or two.
The ISL12020M in the dfn20 package is soooo tiny in comparison to the soic20. Also has the built-in crystal. I do have some breakout boards for it. It is a DIP14 board that holds both the rtc and also a 4-channel 16-bit ADC (ADS1115) on the same i2c buss. precision-pal. Would something like that be of interest to you guys?
I like the DS3234 also. I have one to try out. I like the +/- 2pmm, programmable square wave output, 2-time of day alarms, battery backup, and 2.7-5.0 volt support.
Sparkfun has a nice breakout board WITH battery holder for a good price:
https://www.sparkfun.com/products/10160
Also, if you're using #DS1307_RTCDemo, the programSQW method limits the square wave output to 1 Hz and 4096Hz. In order to get 8092 and 32768 Hz outputs, change the "& 1" to "& 3" in the line
Shameless plug: the I2C driver in my sig contains a DS1307 demo.