Hi,
I connected up a DS1307 RTC to a 16F8ffA as per the following discussion thread:
viewtopic.php?f=29&t=8607&p=46788&hilit=rtc#p46788
I am managing to download the code to the 16F887A and I get the LCD displaying "DS1307 programmed", but when I do a read to obtain the date, I just get zero's displayed for the date. I am not sure if the DS1307 is actually being programmed. How can test if the pic is actually communicating with the DS1307.
DS1307 is connected to PORTC, LCD to PORTB. I am running the DS1307 RTC Programmer code by John, and using his read routine to read from the DS1307. I am also running the Keypad version of the code by Enamul and getting the same result.
I am using the DT-26 oscillator. Is this the correct one for the RTC? Can somebody perhaps suggest the correct oscillator to use (part number).
Thanks.
DS1307 RTC Problem
Moderator: Benj
Re: DS1307 RTC Problem
Hi
A quick way would be to connect an led to the sqw out pin on the 1307 and set it to work so you will see if its enabled, for the 1307 to keep time you need a back up battery as if theres not one there it will lose its settings, the crystal you have is fine
Regards
Dazz
A quick way would be to connect an led to the sqw out pin on the 1307 and set it to work so you will see if its enabled, for the 1307 to keep time you need a back up battery as if theres not one there it will lose its settings, the crystal you have is fine
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: DS1307 RTC Problem
Hi Dazz,
Thanks for the response. I figured out what the problem was; I was using the home edition of Flowcode 5, so when I compiled the code, FC5 did not generate the C code for the I2C component. Okay, I feel like an idiot, because I spent a few hours trying to find out what was causing the problem!! I bought the professional version and everything worked perfectly after I downloaded to the chip.
I have decided to use the DS1305 instead of the DS1307, because it has two programmable alarms. I have picked up a small problem using SPI, so I will post another call for help!
Thanks
Mervin
Thanks for the response. I figured out what the problem was; I was using the home edition of Flowcode 5, so when I compiled the code, FC5 did not generate the C code for the I2C component. Okay, I feel like an idiot, because I spent a few hours trying to find out what was causing the problem!! I bought the professional version and everything worked perfectly after I downloaded to the chip.
I have decided to use the DS1305 instead of the DS1307, because it has two programmable alarms. I have picked up a small problem using SPI, so I will post another call for help!
Thanks
Mervin
Re: DS1307 RTC Problem
Hi mervin
We've all been caught out for days at one time or another, glad you sorted it
Regards
Dazz
We've all been caught out for days at one time or another, glad you sorted it
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php