RealTimeClock.Spin -raw data question
garyg
Posts: 420
Hi
I'm trying to understand the Raw data that is output to my terminal
from the RealTimeClock.spin program that I downloaded from the OBEX.
program is:
RealTimeClock.spin Version 1.01
Author: Mathew Brown
Copyright (c) 2008 Mathew Brown
The output is as follows:
Time:22:37:04 .. Date:Tue 09/09/14 .. Raw data: 4,37,22,9,9,14,3
The 3 at the right end of the output does not seem to have any meaning to me.
I don't see where it comes from.
The 3 never seems to change.
I don't see any reference to it in the RTC demo.
I realize this is a very basic question that I should be able to find, BUT
I can't seem to deduce the answer.
I'll try to attach a link to the program on the OBEX, but I'm not exactly sure how to do that
If I figure it out, I'll edit this post to include the link.
Here is the link
http://obex.parallax.com/object/499
Thanks for any input to this question.
it's the start of a hydroponic pump timer project that I've been thinking about for a while now.
garyg
I'm trying to understand the Raw data that is output to my terminal
from the RealTimeClock.spin program that I downloaded from the OBEX.
program is:
RealTimeClock.spin Version 1.01
Author: Mathew Brown
Copyright (c) 2008 Mathew Brown
The output is as follows:
Time:22:37:04 .. Date:Tue 09/09/14 .. Raw data: 4,37,22,9,9,14,3
The 3 at the right end of the output does not seem to have any meaning to me.
I don't see where it comes from.
The 3 never seems to change.
I don't see any reference to it in the RTC demo.
I realize this is a very basic question that I should be able to find, BUT
I can't seem to deduce the answer.
I'll try to attach a link to the program on the OBEX, but I'm not exactly sure how to do that
If I figure it out, I'll edit this post to include the link.
Here is the link
http://obex.parallax.com/object/499
Thanks for any input to this question.
it's the start of a hydroponic pump timer project that I've been thinking about for a while now.
garyg
Comments
I'm pretty sure it's the day of the week.
The "ReadStrWeekday" uses element #6 of the TimeDate array to find the day of the week string and everywhere else in the code the last element of the array accessed is #5. Apparently element #6 (day of the week) gets computed from the other data.
kuroneko , I was looking for the answer in the RTC_DEMO instead of the RealTimeClock.spin - so your answer did help lots.
Duane, I ran the RTC_DEMO.spin after setting my current time and date.
Now the last number in the raw data is 4 because it's Wed here.
Now that I'm understanding where the numbers are coming from, I'll be looking into
displaying the results on my LCD display and attempting to drive a buzzer or relays at
a particular time throughout the day.
Thanks again
garyg