Thanks all for your answer.
Indeed Don, I thougt about using "hwclock" or "date" command in my
application, but my system (TS8) is RT (adeos+rtai). I've tried to
use the date command, and it seems that this closes my entire
application ("LXRT releases PID xxx" for all threads). I also tried
to acces to /dev/misc/rtc, but I couldn't read something in this file
(seg fault).
Yes Kevin, my RTC is based on the DS-1687 package, I will take a look
at the documentation, specially the register you mentioned. I'm going
to make some try, I will let you know the result.
Thanks again.
Julien
--- In Kevin Cozens <> wrote:
>
> Julien wrote:
> > I'm trying to control date&hours with one of my program. To do
this,
> > I would like to use my TS5620. I read some details in TS7200
manual,
> > about addresses of RTC registers (starting at 0x11700000), and
about
> > the size (just the first 14 bytes).
> >
> > Unfortunatly, I don't really understand how it works, since I read
> > same value from 0x11700000 to 0x1170000E. For example if I write
0xF
> > at 0x1170000E, I will read 0xF at 0x11700002 too.
>
> The application I'm working on also needs to set date and time. It
is probably
> better to use the 'date' command but it is possible to set the date
and time
> by writing to the clock chip registers. I've done this sort of
thing in the past.
>
> Based on my past experience with RTC's, the 14 bytes that hold the
date/time
> information are not simple memory locations you can read or write
to whenever
> you want. There is a status register with a busy bit you need to
check which
> tells you when it is safe to write/read the registers.
>
> The TS-7250 uses a DS-1687 RTC. If your board uses the same RTC
package, you
> can find the datasheet for it at:
> http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2757
>
> Take a look at page 12 which has the details of three control
register at
> address 0Ah. In particular, look at the UIP (update-in-progress)
bit. The
> safest way to read/write to the chips is to wait until you see the
UIP bit
> transition from 1 to 0 before doing any reads/writes as that will
guarantee
> you at least 244uS of time for your operations.
>
> It is also interesting to note in the datasheet that the RTC comes
with 242
> bytes of RAM. This is 128 bytes more than is available in the
Motorola 6818
> series of clock chips. Despite this, the TS-7250 information I've
been reading
> only talks about only 114 bytes of RAM as being available in the
RTC.
>
> --
> Cheers!
>
> Kevin.
>
> http://www.ve3syb.ca/ |"What are we going to do today,
Borg?"
> Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
> | Try to assimilate the world!"
> #include <disclaimer/favourite> | -Pinkutus & the Borg
>
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/
|