Hi ,
I am to developing a project using the 16F877A connected to a D1307 to provide time and date information. I want to run a routine (to control a couple of stepper motors etc.), which will start at a specific time of day from Monday to Sunday, execute and stop at a specific time. I want to configure the start time and end time per day on any specific day. For times when the !6F877A is not executing the routine, it will basically be idle and just display the time on the LCD (if possible, to save power).
I'm not sure exactly how to implement this; do I have to constantly read time information from the D1307 and compare it to START_TIME. If equal, execute the routine, then stop. Thereafter start comparing times from the D1307 to the next configured START_TIME and so on. Is there a simpler method using an interrupt or something similar.
Thanks.
RTC Interrupt
-
kersing
- Valued Contributor

- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: RTC Interrupt
I moved this question to a more appropriate forum. The tips & tricks forum is for sharing your tips and tricks, not for questions.
If you are a flowcode 4 or 5 user, please register for the appropriate forum using the links below.
If you are a flowcode 4 or 5 user, please register for the appropriate forum using the links below.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC Interrupt
Hi Mervin,
I did a project on here which in the end used a pic device and DS1307 via I2C for time and date, it was the work of Enamul , maybe the code might help you, if you do a forum search for "24hour Timer RTC" you will find it...
Hope this helps
Acestu
I did a project on here which in the end used a pic device and DS1307 via I2C for time and date, it was the work of Enamul , maybe the code might help you, if you do a forum search for "24hour Timer RTC" you will find it...
Hope this helps
Acestu
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
Re: RTC Interrupt
Hi Mervin,
Look at the end of this thread and you will find Enamul has posted a daylight saving time version of an RTC date and time clock on a pic16f877A
http://www.matrixmultimedia.com/mmforum ... =29&t=8607
Hope this helps
Acestu
Look at the end of this thread and you will find Enamul has posted a daylight saving time version of an RTC date and time clock on a pic16f877A
http://www.matrixmultimedia.com/mmforum ... =29&t=8607
Hope this helps
Acestu
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.
Re: RTC Interrupt
Guys,
Sorry if this is posted in the wrong forum. I could not find a link to post a new message under Flowcode 5 forum.
I connected up the DS1307 as per the following discussion:
http://www.matrixmultimedia.com/mmforum ... 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, 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.
Sorry if this is posted in the wrong forum. I could not find a link to post a new message under Flowcode 5 forum.
I connected up the DS1307 as per the following discussion:
http://www.matrixmultimedia.com/mmforum ... 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, 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.
Re: RTC Interrupt
Hi Mervinm
Follow the link in my sig to sign up for the v5 forums
Regards
Dazz
Follow the link in my sig to sign up for the v5 forums
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: RTC Interrupt
Dazz, thanks. I have registered on the Flowcode v5 forum. I will post my previous message there.