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: 863
Joined: Mon Nov 04, 2013 5:23 pm

Re: RTC board

Post by JimDrew »

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: 329
Joined: Sat Dec 05, 2015 9:22 pm

Re: RTC board

Post by NegSol »

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

simply copy over and rename

yellperil
Atari freak
Atari freak
Posts: 51
Joined: Sun Jun 04, 2017 10:53 am

Re: RTC board

Post by yellperil »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 105
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Post by cvenditti »

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

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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
Atariator
Atariator
Posts: 26
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Post by eris »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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

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

Re: RTC board

Post by kolla »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

Right. You cannot set the time from cores.

eris
Atariator
Atariator
Posts: 26
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Post by eris »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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
Atariator
Atariator
Posts: 26
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Post by eris »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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

eris
Atariator
Atariator
Posts: 26
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Post by eris »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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
Atariator
Atariator
Posts: 26
Joined: Fri Apr 06, 2018 11:32 pm

Re: RTC board

Post by eris »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Post by THaase »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 105
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Post by cvenditti »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Post by THaase »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Post by THaase »

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
Captain Atari
Captain Atari
Posts: 187
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: RTC board

Post by THaase »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 105
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Post by cvenditti »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: RTC board

Post by Sorgelig »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 105
Joined: Sun Nov 19, 2017 12:45 am

Re: RTC board

Post by cvenditti »

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

Locked

Return to “MiSTer”