New Project that is almost Done I would like some one to look at this code rout
Hi Every One
I have been working on this project for three month now when i have had the time
I would like for any one to tell me if i can clean up this routine in any way
I am think about putting an LCD Display to this Project but·I have used up ·67% of the memory·so this may not happen
Just an·![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
So let me know what you think
I want to Thank·any one that· look at this code routine for me
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/15/2008 9:04:32 PM GMT
I have been working on this project for three month now when i have had the time
I would like for any one to tell me if i can clean up this routine in any way
I am think about putting an LCD Display to this Project but·I have used up ·67% of the memory·so this may not happen
Just an·
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
So let me know what you think
I want to Thank·any one that· look at this code routine for me
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/15/2008 9:04:32 PM GMT
Comments
So, I made it into a subroutine called consolidate
You have·a lot·of DEBUG statements and everything in quotes takes up program memory.· So, using TIMER1 instead TIMER 1 and CLK instead of CLOCK·can save a lot of·program memory.
By incorporating consolidate and just a few abbreviations, I saved you 68 bytes (going from $2c1 to $305 = $44)
Thank You for your help and input that has help a lot
I must be going brain dead
I guess because I have so many little routine that go back and forth I got a little lost···
·······························································
Now i will be able to control the out side lights and save some money on the electric meter bill
I do not like clock that you have to set the time and adj for Day Light Saving or timer that do not adj to out side world that why i built my own
Timers
Here is the revised code that PJ help with Thank Again
········· That all folks··
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/16/2008 1:21:29 AM GMT
·hrs· = $00
·mins = $00
·secs = $00
so I made that into a subroutine (init_hms).
Also, each time you used GOSUB Set_Time you followed that with DEBUG CLS, CLS.· So, I incorporated the DEBUG into Set_Time.
That saved 48 bytes ($30)
part of Get_Time, then you can save even more.
·
Instead of --
GOSUB Get_Time
DEBUG HOME, HEX2 hrs, ":", HEX2 mins, ":", HEX2 secs
If I go too far... I may have to stay there.
Post Edited (PJ Allen) : 3/16/2008 3:41:30 AM GMT
Thanks for your help
You help learn a lot
·How to put all of these small·same type of routines all in to one or two main routine and call up the routine when need
I am going to try when·I write a·working code then go back and consolidate all of the same type of routines
Thank for the··
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam