Clock code need to modify to use as timer
I recently used alarm clock (BS2CLOCK.BS2) ON A BASIC STAMP2.
http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv33.pdf
I would like to use and modify·the code·now for a project that requires additionally a timer to be active every 15 min for a few secs. The timer would have to be in sync with the correct time. In other words after setting the correct time the timer would be active at 15 min intervals. With this project I would not need the standard alarm and could use the OUT15 pin for this. Also it would not be necessary to set the 15 min interval with the buttons, set in the code is ok.
My job is designing mechanical items and I am new to the microcontrollers. Do you have any suggestions for me? Any help would be greatly appreciated.
·
Thank
David
http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv33.pdf
I would like to use and modify·the code·now for a project that requires additionally a timer to be active every 15 min for a few secs. The timer would have to be in sync with the correct time. In other words after setting the correct time the timer would be active at 15 min intervals. With this project I would not need the standard alarm and could use the OUT15 pin for this. Also it would not be necessary to set the 15 min interval with the buttons, set in the code is ok.
My job is designing mechanical items and I am new to the microcontrollers. Do you have any suggestions for me? Any help would be greatly appreciated.
·
Thank
David
Comments
·· The need for a timer was discussed in the following thread.· I would see if this is along the lines of anything you're trying to do.· I hope this helps.· Take care.
http://forums.parallax.com/showthread.php?p=568430
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Use the value of rawtime calcluated in the program. It is a value that goes from 0 to1439, the number of minutes since midnight each day.
rawTime = (hr10 * 600) + (hr01 * 60) + (mn10 * 10) + mn01
Then every 15 minutes the value of rawtime // 15 will equal zero. There is also a value of seconds, calculated from secs = sc10 * 10 + sc01
Including the value of seconds keeps it from repeating the pulse.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I like this little routine i tried this and i works very good· Thanks for Posting it······· ·
Sam········
Thanks for the rawtime code. I inserted it into the BS2CLOCK.bs2 and pulses every 1 min, I can't seem to get it to work for 15min. Im sure I have something off.
Possibly the wrong place. I had to use the code with PBASIC 2.5. any suggestions woul be helpful.
Thank you
David