RTC and spin how to set?
mctrivia
Posts: 3,772
I am having trouble with getting an RTC to work with my prop.
I have the RTC object defined as:
rtc : "DS1302_full"
rtc.setDatetime( _month,_day, _year, _dow, _hour, _min, _sec )
however when I run
rtc.readTime( @_hour, @_min, @_sec ) 'read time from DS1302
I get 65,65 back for hours and min
and when I run
rtc.setDatetime(8,13,2010,6,14,29,0 ) 'month, day, year, day of week, hour, minute, second
it still reads back 65,65
I am using the sparkfun RTC Module. Any ideas what is wrong?
I have the RTC object defined as:
rtc : "DS1302_full"
rtc.setDatetime( _month,_day, _year, _dow, _hour, _min, _sec )
however when I run
rtc.readTime( @_hour, @_min, @_sec ) 'read time from DS1302
I get 65,65 back for hours and min
and when I run
rtc.setDatetime(8,13,2010,6,14,29,0 ) 'month, day, year, day of week, hour, minute, second
it still reads back 65,65
I am using the sparkfun RTC Module. Any ideas what is wrong?
Comments
Use my driver in the OBEX.
rtc : "DS1307_RTCEngine"
the folowing returns all 0s
rtc.readTime
_hour:=rtc.ClockHour
_min:=rtc.ClockMinute
_sec:=rtc.ClockSecond 'read time from DS1302
_day:=rtc.ClockDay
_month:=rtc.ClockMonth
_year:=rtc.ClockYear
_dow:=rtc.ClockDate 'read date from DS1302
this seems to do nothing:
rtc.writeTime(0,10,17,13,6,8,2010 ) '(second, minute, hour, day, date, month, year)
before first time accessing clock I run this:
rtc.RTCEngineStart(29,28,-1)
??? help
Use the built in demo. It tells you what is going wrong.