Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20613

BASCOM-AVR : DS1307 RTC : REPLY

$
0
0
RTC Clock update..... I updated the above code from first post to turn on SQWout of the DS1307. Per the help file... Notice that you need to connect a 32768 Hz crystal in order to use the timer in async mode, the mode that is used for the clock timer. You also need to enable interrupts because of the interrupt service routine. I can switch the TOSC switch on the STK501 board to XTAL or to PINS and the program continues to display the incremental time. If an XTAL must be connected and the XTAL is disconnected why does it still work? With a scope on the SCL lines, you can see the clocking of the DS1307 at the giving interval. When the Print date and time, which calles the DATE$/TIME$ functions is rem'd out. No clocking is now seen on the SCL line. I thought per the help..... The compiler also creates an ISR that gets updates once a second. This works for AVR chips which can be asynchronously clocked from the TOSC1/2 pins. TOSC1 = Timer Oscillator Pin 1 TOSC2 = Timer Oscillator Pin 2 If that is the case why did the clocking stop on the DS1307's SCL line? I realize that the getdatetime call was rem'd out in the print statement. But if there was an ISR running per the help, why isn't the DS1307 still getting clocked at a one second rate? Working but not 100% understanding this. Can someone explain this to me? TIA, Mark

Viewing all articles
Browse latest Browse all 20613

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>