Problem with DS1307_RTCDemo
TimH
Posts: 48
I having problems setting the time of the DS1307.
I have it wired as described with 10K pull ups to 3.3V
The only code I changed was the RX and TX pins and the baud rate (set to 115200)
I get the help menu but however I enter the Time and Date the information is not updated.
I can see clock and data activity between RTC and Prop.
I'm wondering it I have a bad DS1307
Does anyone know the format I need to send to update the Time and Date ?
Thanks
I have it wired as described with 10K pull ups to 3.3V
The only code I changed was the RX and TX pins and the baud rate (set to 115200)
I get the help menu but however I enter the Time and Date the information is not updated.
I can see clock and data activity between RTC and Prop.
I'm wondering it I have a bad DS1307
Does anyone know the format I need to send to update the Time and Date ?
Thanks
Comments
The program was on the Obex named DS1307_RTCDemo
I receive the message to enter the exact time but every format I've entered does not update the RTC
It then prompts for each component of the time and date.
To change the time you enter "time"
I do receive the instruction to enter the exact time but however I enter it, the updated date/time is what I suppose is the default "Sunday, December 01, 2000 12:01:48 AM"
The time does increment but I can never change it.
Note: it is set up to use pin 2 for SDA and pin 1 for SCL.
The terminal comm is set for 57600
It waits for you to enter "y" within 5 sec if you want to set the clock and prompts for each date/time component.
You're right about the "time" command.
My guess is it's a wiring issue. Which Propeller board are you using? The QuickStart's pin positions are opposite one would expect for P28 and P29.
I have SDA connected to P29 via a 1K with 10K pull up to 3.3
SCL to P 28 with 10K pull up.
Thanks Ron
I went thru the time set procedure but get the same result - date and time are zeros.
I'm starting to think I have a bad DS1307 - I just don't seem to be able to write to it.
That is certainly possible. Have you ever gotten that IC to work before?
Are you using a 3V coin cell for the DS1307?
I just re-read the data sheet and found if you don't connect a battery then connect pin 3 to Gnd.
I thought that was it but same result.
No - I've never had this chip working - brand new.
I prefer of DS3221 chip - more accurate and no external crystal.
I have this Macetech module and a couple of his earlier version:
http://macetech.com/store/index.php?main_page=product_info&products_id=8&zenid=4ee70dc779c0e53cf59c5189ee3f9acb
Good luck!
I was sending CR & LF at the end of each parameter - I changed the terminal program to only send CR and now OK
Ron - Still not got your method working but will keep at it.
Thanks all
You shouldn't don't need the 1K series resistor. The I2C line is not driven by the DS1307. The line will only transition between 3.3V and 0V (I monitored this with an oscilloscope once to convince myself (with a DS1307 chip)). Some 5V devices that will work with 3.3V logic won't work if there's a resistor in series. It might not be interfering with the data but it's certainly not needed.
I'm running a tweaked version of my code now - it displays the date and time on the Parallax 16x2 serial LCD module.
Not sure why it is not working for you if you changed the pin assignments for your wiring setup...