RTC board

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

JimDrew
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Mon Nov 04, 2013 5:23 pm

Re: RTC board

Postby JimDrew » Sat Dec 02, 2017 1:11 pm

That if says "navigate to /usr/share/zoneinfo/posix folder and find there the name of your place or time zone." How is this done? Under Linux? Through the SD card? If so, on a PC?
I am the flux ninja

NegSol
Captain Atari
Captain Atari
Posts: 222
Joined: Sat Dec 05, 2015 9:22 pm

Re: RTC board

Postby NegSol » Sat Dec 02, 2017 2:19 pm

I use an FTP client for this:
https://github.com/MiSTer-devel/Main_Mi ... ork-access

simply copy over and rename

yellperil
Atariator
Atariator
Posts: 21
Joined: Sun Jun 04, 2017 10:53 am

Re: RTC board

Postby yellperil » Mon Jan 29, 2018 1:11 pm

My build using parts from RS Components (Australia).

Capacitor Ceramic X5R 0805 10V 10uF
RS Stock No.802-9850

STMicroelectronics, M41T81M6F
RS Stock No.809-1420

Crystal 32.768KHz 2x6mm
RS Stock No.547-6979

Coin cell battery holder,SMT,low profile
RS Stock No.161-3707

Socket 2mm vertical 3mm lead 9+9 way
RS Stock No.779-2999

CRCW0805 Resistor T/R 0.125W,1%,4K7
RS Stock No.679-1496

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Postby cvenditti » Tue Apr 10, 2018 3:10 pm

What is the part # for temperature sensor on RTC v1.3?
Thank you
Cyril

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Tue Apr 10, 2018 9:03 pm

You don't need to solder Temp Sensor. It's optional and currently not used.
I've used P/N AD7415ARTZ-0500 on my board.

https://twen.rs-online.com/web/p/temper ... rs/5236276

eris
Retro freak
Retro freak
Posts: 12
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Postby eris » Tue May 01, 2018 10:17 pm

Sorgelig,

I was studying the RTC board and I'm trying to figure out how it works with the Minimig core. Obviously the M41T81 communicates with the Linux side via I2C. It updates periodically and via the hwclock command. How does the minimig pick up this date and time? Does it have direct access via some kind of FPGA to I2C bridge or is it getting it by asking Linux via NTP or some other interface?

Thanks,

eris

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Wed May 02, 2018 2:47 am

MiSTer binary sends RTC info to cores among other info such as keyboard, mouse, etc.

kolla
Captain Atari
Captain Atari
Posts: 163
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: RTC board

Postby kolla » Wed May 02, 2018 2:11 pm

Sorgelig wrote:MiSTer binary sends RTC info to cores among other info such as keyboard, mouse, etc.


I suppose writing to the clock from the Minimig is simply ignored (I have not tested).
-- kolla

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Wed May 02, 2018 2:32 pm

Right. You cannot set the time from cores.

eris
Retro freak
Retro freak
Posts: 12
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Postby eris » Wed May 02, 2018 3:50 pm

Sorgelig wrote:MiSTer binary sends RTC info to cores among other info such as keyboard, mouse, etc.


Is this interface documented or should I just read the linux RTC service code?

Thx

JimB

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Wed May 02, 2018 4:06 pm

There is no book of documentation if you mean this.
You can check hps_io.v signals. There you will find RTC info.
It would be more clear if you would tell what you want to do. Are you writing core which needs RTC?

eris
Retro freak
Retro freak
Posts: 12
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Postby eris » Wed May 02, 2018 4:43 pm

Sorgelig wrote:There is no book of documentation if you mean this.
You can check hps_io.v signals. There you will find RTC info.
It would be more clear if you would tell what you want to do. Are you writing core which needs RTC?


Ok, thanks. I was wondering what would be required if I wanted to use a different chip like the DS3231?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Wed May 02, 2018 5:02 pm

It will require to add driver for this chip into Linux Kernel.

eris
Retro freak
Retro freak
Posts: 12
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Postby eris » Wed May 02, 2018 5:05 pm

Sorgelig wrote:It will require to add driver for this chip into Linux Kernel.


Okay. I see. The date-time service just formats the Linux date/time and passes it to the Minimig core, so you only need to change the Linux driver to support the new RTC chip.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Wed May 02, 2018 6:19 pm

eris wrote:Okay. I see. The date-time service just formats the Linux date/time and passes it to the Minimig core, so you only need to change the Linux driver to support the new RTC chip.

right.
But i strongly suggest to use recommended chips. They are not hard to find and there is board already for them.
Otherwise you will have to modify and compile every new kernel release.

eris
Retro freak
Retro freak
Posts: 12
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Postby eris » Wed May 02, 2018 6:53 pm

Sorgelig wrote:
eris wrote:Okay. I see. The date-time service just formats the Linux date/time and passes it to the Minimig core, so you only need to change the Linux driver to support the new RTC chip.

right.
But i strongly suggest to use recommended chips. They are not hard to find and there is board already for them.
Otherwise you will have to modify and compile every new kernel release.


Good point. I might use still use the recommended chip, but I'm trying to make a little proto-board that includes just the I/O and accessory devices I need. That should be easy enough.

THaase
Atari freak
Atari freak
Posts: 67
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Postby THaase » Thu May 03, 2018 8:55 am

As I don't like the Citizen Cylindrical Can type of crystal mentioned to work with RTC Board on the wiki page I would like to give a second working combination:

M41T81SM6F (Same as mentioned on the Wiki Page)
LCSC (alternative link to LCSC slightly cheaper)

together with:

Seiko Epson Q13FC1350000400 (+- 20ppm / 12.5pF / 70 kOhms )
LCSC
Digikey

I've some more RTC Chips here to test - so maybe I can provide some more working combinations later.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Thu May 03, 2018 12:38 pm

The board originally designed for SMD crystals (what i'm using). Cylindrical crystals are adopted by other users :)

THaase wrote:M41T81SM6F

does it work for you correctly? I had issue with M41T81S chip. Time runs out very fast in off state. May be it was just bad crystal/chip combination. M41T81 works well.

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Postby cvenditti » Thu May 03, 2018 1:18 pm

THaase wrote:M41T81SM6F (Same as mentioned on the Wiki Page)
LCSC (alternative link to LCSC slightly cheaper)


Or super cheap (but might take 4 weeks to come :? ):
https://www.aliexpress.com/item/M41T81- ... 0.0.HpTzM8

THaase
Atari freak
Atari freak
Posts: 67
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Postby THaase » Thu May 03, 2018 1:18 pm

Sorgelig wrote:does it work for you correctly?


Looks like having no issues (just running for some hours).
Let's see how it behaves over the weekend on battery.

THaase
Atari freak
Atari freak
Posts: 67
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Postby THaase » Thu May 03, 2018 1:23 pm

cvenditti wrote:Or super cheap (but might take 4 weeks to come :? ):
https://www.aliexpress.com/item/M41T81- ... 0.0.HpTzM8


Great - I'll give them a try (just ordered) - maybe without die :-)

THaase
Atari freak
Atari freak
Posts: 67
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Postby THaase » Fri May 04, 2018 7:43 am

THaase wrote:
Sorgelig wrote:does it work for you correctly?


Looks like having no issues (just running for some hours).
Let's see how it behaves over the weekend on battery.


So running after 16 hours on battery still in sync.
Works fine I guess.

Next RTC Chips to try :-)

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Postby cvenditti » Sun May 06, 2018 11:57 am

Sorgelig wrote:You don't need to solder Temp Sensor. It's optional and currently not used.
I've used P/N AD7415ARTZ-0500 on my board.

https://twen.rs-online.com/web/p/temper ... rs/5236276


Can I use a AD7415ARTZ-1500RL7 (https://lcsc.com/product-detail/Tempera ... 43909.html) instead of the AD7415ARTZ-0500RL7

Thank you

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2380
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Postby Sorgelig » Sun May 06, 2018 12:12 pm

Generally speaking, no. They have different I2C addresses.
Currently there is no software support for temp sensor and i cannot tell if it will be easy to support different addresses or not.

User avatar
cvenditti
Atari maniac
Atari maniac
Posts: 83
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Postby cvenditti » Sun May 06, 2018 1:23 pm

Sorgelig wrote:Generally speaking, no. They have different I2C addresses.
Currently there is no software support for temp sensor and i cannot tell if it will be easy to support different addresses or not.

I just order some v1.3 pcb. I will wait more software support before start to do one.
Thank you


Return to “MiSTer”

Who is online

Users browsing this forum: THaase and 2 guests