Francisco
11-18-2010, 08:56 PM
Hello all,
I am trying to set the time in the BackPack using a DS1302 time chip with the following code:
rtc.readTime( @hour, @minute, @second ) 'read time from DS1302
rtc.readDate( @day, @month, @year, @dow ) 'read date from DS1302
pr.str(string(SETTIM, year, month, day, hour, minute, second)) 'set time on backpack
the object im using for the ds1302 is from here: http://obex.parallax.com/objects/519/
The compile error i get is: Error: Not a Long Address
basically the string() is not accepting the date variables.
To debug, I tried creating new variables of type LONG and then reassigned the date values to these new longs to see if it would work but still not working.
Does anyone have a clue?
Thank you.
I am trying to set the time in the BackPack using a DS1302 time chip with the following code:
rtc.readTime( @hour, @minute, @second ) 'read time from DS1302
rtc.readDate( @day, @month, @year, @dow ) 'read date from DS1302
pr.str(string(SETTIM, year, month, day, hour, minute, second)) 'set time on backpack
the object im using for the ds1302 is from here: http://obex.parallax.com/objects/519/
The compile error i get is: Error: Not a Long Address
basically the string() is not accepting the date variables.
To debug, I tried creating new variables of type LONG and then reassigned the date values to these new longs to see if it would work but still not working.
Does anyone have a clue?
Thank you.