ATTN KYE - DS1307 RTC engine
Kye,
I tried a couple of DS1307 objects but yours was the only one that seemed to work.
I have made a version of your RTC driver which allows setting/reading the DS1307 in 12 hour mode (in addition to 24 hour).
I have other programs (for Basic Stamps and Arduinos) that use 12 hour mode so that is why I wanted to try it in SPIN.
It works great but I have a question.
Your methods have comments like "6 Stack Longs" etc.
What exactly does that mean and how did you calculate the value?
Thanks,
- Ron
I tried a couple of DS1307 objects but yours was the only one that seemed to work.
I have made a version of your RTC driver which allows setting/reading the DS1307 in 12 hour mode (in addition to 24 hour).
I have other programs (for Basic Stamps and Arduinos) that use 12 hour mode so that is why I wanted to try it in SPIN.
It works great but I have a question.
Your methods have comments like "6 Stack Longs" etc.
What exactly does that mean and how did you calculate the value?
Thanks,
- Ron
Comments
So, if you were running out of memory you would have a good idea then of how large the stack needed to be for a cog...
I calculated that value using the wisdom provided by Chip Gracey in one of the webinars. He said, that every functions needs 3 stacks longs plus one for every local variable and argument. So... using that info I then just built up the stack estimate for each function. You'll find that its in the ball park of how many stack longs each function uses.
I thought maybe you had some sort of analysis program that calculated the memory requirements.
I might expand this code some more to handle the DS3231 RTC alarm capabilities but there are a lot of options for setting alarms...