ts-7000
[Top] [All Lists]

[ts-7000] Re: TS-7800 RTC problem

To:
Subject: [ts-7000] Re: TS-7800 RTC problem
From: "fulatoro" <>
Date: Wed, 12 Mar 2008 22:25:37 -0000

--- In  "jirimacku" <> wrote:
>
> 
> > > > The time obtained from RTC by rtc7800 makes random jumps. 
> 
> > I guess the RTC registers are changing during the time the six
> > registers are being read.  According to the RTC datasheet, the clock
> > register values can be 'frozen' by writing to bit 7 of control
> > Register B.  The code currently does this when setting the RTC, but
> > not reading from it.
> > 
> > Can you try adding the following patch (untested!):
> >     
> > --- rtc7800.c   2008-03-11 11:17:48.000000000 -0400
> > +++ rtc7800_test.c      2008-03-11 11:16:55.000000000 -0400
> > @@ -95,6 +95,7 @@
> >      struct timeval tv;
> >      int h,pm;
> >  
> > +    wRTC(0xB,rRTC(0xB) | 0x80);  // disable update
> >      t.tm_sec = frombcd(rRTC(0x0));
> >      t.tm_min = frombcd(rRTC(0x2));
> >      h = rRTC(0x4) & 0x7F;
> > @@ -103,6 +104,7 @@
> >      t.tm_mon = frombcd(rRTC(0x8)) - 1;
> >      t.tm_year = frombcd(rRTC(0x9)) + 100;
> >      t.tm_isdst = -1;
> > +    wRTC(0xB,rRTC(0xB) & ~0x80); // re-enable update
> >  
> >      now = mktime(&t);
> >      tv.tv_sec = now;
> > 
> > 
> > 
> > Regards, ............. Charlie
> >
> 
> Hi,
> so after 13+ hours there is no time discontinuity with the patched
> code. It seems to fix the problem. Thanks a lot!
> 
> Jiri
>


I have been running a similar test as well since the patch.  It seems
to be working as well.  I was having similar problems with the RTC as
well.  I am stilling running the test and I will update if there are
changes.

Moussa



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU