DS1307
Moderator: Benj
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
DS1307
Hi guys,
I have been investigating how to use the DS1307 with FC. I have been through the various FC release forums but when I try and download the example flow codes, I only seem to get the MAIN routine and all the MACRO's are missing. Any Idea how to solve this issue?
Secondly, after following the few examples on the forum, I have written a flow code program but my program only outputs the values for HH:MM:SS of 45:85:85. Strangely enough there have been other guys on the forum that have had the same problem but I haven't been able to see how they solved it because of the fact that I was unable to view the full flow codes that they posted (as I explained above)
Anyone out there that can have a look at my program and help or help me to download a working example. Any help will be much appreciated. I have posted my version here.
Thanks
I have been investigating how to use the DS1307 with FC. I have been through the various FC release forums but when I try and download the example flow codes, I only seem to get the MAIN routine and all the MACRO's are missing. Any Idea how to solve this issue?
Secondly, after following the few examples on the forum, I have written a flow code program but my program only outputs the values for HH:MM:SS of 45:85:85. Strangely enough there have been other guys on the forum that have had the same problem but I haven't been able to see how they solved it because of the fact that I was unable to view the full flow codes that they posted (as I explained above)
Anyone out there that can have a look at my program and help or help me to download a working example. Any help will be much appreciated. I have posted my version here.
Thanks
- Attachments
-
- RTC.fcfx
- (18.41 KiB) Downloaded 210 times
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Hi Keejay,
You can download an excellent DS1307 user component here:
http://www.matrixtsl.com/mmforums/viewt ... 58&t=12882
Hope this helps
Stuart
You can download an excellent DS1307 user component here:
http://www.matrixtsl.com/mmforums/viewt ... 58&t=12882
Hope this helps
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
Hi Stuart,
Thanks for the info. I've installed the component macro for the DS1307. I had to use the software I2C as my DS1307 is connected to channel 2 and the macro only has an options for channel 1 or software I2C. Unfortunately, this also gives me a time of 45:85:85.Ive checked with my scope that I have a 1Hz pulse on the SQW pin and that there is activity on the SDA SCL pins. So I'm not sure what the problem could be? Pull Up resistors are installed as well. I'm using this device but connected to a PIC18F46K22:
http://www.amazon.com/SainSmart-DS1307- ... rds=ds1307
Anybody have any ideas?
Thanks for the info. I've installed the component macro for the DS1307. I had to use the software I2C as my DS1307 is connected to channel 2 and the macro only has an options for channel 1 or software I2C. Unfortunately, this also gives me a time of 45:85:85.Ive checked with my scope that I have a 1Hz pulse on the SQW pin and that there is activity on the SDA SCL pins. So I'm not sure what the problem could be? Pull Up resistors are installed as well. I'm using this device but connected to a PIC18F46K22:
http://www.amazon.com/SainSmart-DS1307- ... rds=ds1307
Anybody have any ideas?
- Attachments
-
- RTC2.fcfx
- (11.69 KiB) Downloaded 193 times
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
I've even tried to use the hardware channel one now and I still get 45:85:85 for the HH:MM:SS.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Hi Keejay,
I will have a look at it for you ...
cheers
Stuart
I will have a look at it for you ...
cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Hi Keejay,
Try this chart and let me know how you get on.....
cheers
Stuart
P.S. this has another macro called First_Time, let me know if you don't manage to download it.
Try this chart and let me know how you get on.....
cheers
Stuart
P.S. this has another macro called First_Time, let me know if you don't manage to download it.
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
Hi Stuart,
Thanks for the post. I've programmed the PIC and uploaded the results onto YouTube for you to have a look. As you'll see, the time is very erratic - every so often the correct time is displayed but never the correct date. I'm just wondering whether there is a clock timing issue or something because some cycles the time is correct and then on other it's not? Could be this RTC module that I'm using? I've ordered some DS1307 chips to interface directly and am hoping that will resolve this issue.
https://www.youtube.com/watch?v=R-YvHiIB5qU
Any thoughts?
Thanks for the post. I've programmed the PIC and uploaded the results onto YouTube for you to have a look. As you'll see, the time is very erratic - every so often the correct time is displayed but never the correct date. I'm just wondering whether there is a clock timing issue or something because some cycles the time is correct and then on other it's not? Could be this RTC module that I'm using? I've ordered some DS1307 chips to interface directly and am hoping that will resolve this issue.
https://www.youtube.com/watch?v=R-YvHiIB5qU
Any thoughts?
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Hi Keejay,
Can you post a picture of your breadboard setup, and have you got 4.7k pull up resistors on your i2c clock and data, also your MCLR pin needs to be pulled high with a 10k resistor to avoid unwanted resetting.
Cheers
Stuart
Can you post a picture of your breadboard setup, and have you got 4.7k pull up resistors on your i2c clock and data, also your MCLR pin needs to be pulled high with a 10k resistor to avoid unwanted resetting.
Cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
Hi Stuart,
I'll post a photo tomorrow of the breadboard setup. The 4.7k pull up resistors are all in place as per the datasheet yes. MCLR has a 10k pull up resistor as well.
Norman
I'll post a photo tomorrow of the breadboard setup. The 4.7k pull up resistors are all in place as per the datasheet yes. MCLR has a 10k pull up resistor as well.
Norman
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
The person in this post had the same problem. Someone was able to post a flowcode that solved it, but when I try and download that flowcode, I only get the MAIN macro and not the called MACROs of the downloaded flowcode.
http://www.matrixtsl.com/mmforums/viewt ... 307#p40815
http://www.matrixtsl.com/mmforums/viewt ... 307#p40815
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Hi Keejay,
I have just downloaded that chart and there are 11 macros including Main, when you download it and open it go into the macro menu at the top and when you put your mouse over "Show as Flowchart" you should see the macros , and if you click on the macros then they should apear in tabs on the chart, if you don't see any macros then we have a problem...
let me know
Stuart
I have just downloaded that chart and there are 11 macros including Main, when you download it and open it go into the macro menu at the top and when you put your mouse over "Show as Flowchart" you should see the macros , and if you click on the macros then they should apear in tabs on the chart, if you don't see any macros then we have a problem...
let me know
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Flowcode v5 User
- Posts: 115
- Joined: Tue Jul 23, 2013 10:02 am
- Been thanked: 15 times
- Contact:
Re: DS1307
Hi Stuart,
Thanks for all your input. I managed to get it to work now with a plain DS1307 chip. The module that I was trying to use seems to not be 100 % compatible with the DS1307 component macro. Thanks again.
Thanks for all your input. I managed to get it to work now with a plain DS1307 chip. The module that I was trying to use seems to not be 100 % compatible with the DS1307 component macro. Thanks again.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: DS1307
Ok,
Glad you sorted it out.
cheers
Stuart
Glad you sorted it out.
cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.