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 »

Sorgelig wrote:
THaase wrote:Thanks a lot - may I know which components you've used?
i wrote the part numbers in schematics. See the PDF file.
The pdf doesn't have the full BOM. What battery holder did you use?
I am the flux ninja

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

Re: RTC board

Post by Sorgelig »

JimDrew wrote:
Sorgelig wrote:
THaase wrote:Thanks a lot - may I know which components you've used?
i wrote the part numbers in schematics. See the PDF file.
The pdf doesn't have the full BOM. What battery holder did you use?
it is written in PDF right under the circuit:

Code: Select all

B1: Keystone 3000 (SMD) - preferred
B1a: Keystone 500 (THT)

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

Re: RTC board

Post by JimDrew »

This text is NOT on the pdf in the Github for v1.2 of the RTC.

The only text in the .pdf (which is just a print of the Altium schematic page) is:

B1, B1a: Only one battery should be installed.
U1: M41T81, M41T81S, MCP79400, MCP79401, MCP79402, MCP79410, MCP79411, MCP79412
X1: 12.5pF for M41Txx, 6-9pF for MCP794xx

Also note that there is not a BOM list available (like the SDRAM board) for the IOBoard.
You do not have the required permissions to view the files attached to this post.
I am the flux ninja

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

Re: RTC board

Post by Sorgelig »

hmm.. then i've forgot to commit my latest changes.
Anyway, you know now :)

I don't provide BOM because i don't create it. Resistors, capacitors and connectors i buy in local store and have no idea about their part numbers.

BOMs for I/O board and SDRAM have been created by contributor (gagadagatika) who ordered all components online. Anyone is welcome to contribute :)

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

Re: RTC board

Post by JimDrew »

Are the BOMs available? Your schematic for the IOBoard doesn't show any type of part numbers for important items, like the VGA connector and others.

I bought a 100 of each board with plans to assemble at least some, but without having an actual BOM with recommended part numbers, it's difficult to do. :)

The link for the SDR SDRAM daughter board in the Github is broken!
I am the flux ninja

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

Re: RTC board

Post by Sorgelig »

BOM is here:
https://github.com/MiSTer-devel/Main_Mi ... mbly-(DIY)
JimDrew wrote:The link for the SDR SDRAM daughter board in the Github is broken!
which one?

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

Re: RTC board

Post by JimDrew »

Your link doesn't go to the DIY page - it reverts you back to the /wiki page. Not sure why. This BOM is for v3.1 of the IOBoard, not v5.2 of the IOBoard. Does the v5.2 board use the exact same parts? Also note that R28 in the BOM has the correct YAGEO part number, but the link is pointing to the 560 ohm resistor (not a 10K resistor).

Sorgelig wrote:
JimDrew wrote:The link for the SDR SDRAM daughter board in the Github is broken!
which one?
On the MISTer Hardware page:

https://github.com/MiSTer-devel/Hardware_MiSTer

You can click on the RTC or IOBoard links just fine, but the SDRAM link gives a 404 error.
I am the flux ninja

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

Re: RTC board

Post by Sorgelig »

JimDrew wrote:Your link doesn't go to the DIY page - it reverts you back to the /wiki page.
Fixed. it's forum engine bug.
JimDrew wrote:You can click on the RTC or IOBoard links just fine, but the SDRAM link gives a 404 error.
fixed.
JimDrew wrote: This BOM is for v3.1 of the IOBoard, not v5.2 of the IOBoard. Does the v5.2 board use the exact same parts? Also note that R28 in the BOM has the correct YAGEO part number, but the link is pointing to the 560 ohm resistor (not a 10K resistor).
as i've wrote above, this BOM and the whole page has been created by contributer. It was on the time when v3.1 was actual.
v5.x uses almost the whole subset of v3.1 BOM. May be you will want to replace the buttons to a large one, so replace them in v3.1 BOM.
Only Slide switch (you can fin the P/N in I/O Board thread), MicroSD socket and Fan with socket are added. Please move to I/O board thread if you want to discuss about I/O board parts - i will try to help there.

bernouilli
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Fri Jan 06, 2017 5:02 pm
Location: Paris/France

Re: RTC board

Post by bernouilli »

Would it be possible to use some kind of already built board like this one :
www.ebay.com/itm/172686122064

This one has a ds1037 chip but others have ds3231.
I suppose it would need a software patch on the MiSTer side. Right ?

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

Re: RTC board

Post by Sorgelig »

bernouilli wrote: I suppose it would need a software patch on the MiSTer side. Right ?
Yes, it will need a driver on linux side.

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

Re: RTC board

Post by JimDrew »

Is there some way to easily test the RTC boards? Something simple like the memtest program?
I am the flux ninja

User avatar
gagadagatika
Atari freak
Atari freak
Posts: 59
Joined: Thu Jul 13, 2017 12:14 pm
Location: Germany / Denmark

Re: RTC board

Post by gagadagatika »

I connected via SSH (Wiki) to the MiSTer Board and stored/read the RTC values with both commands from sorgeligs previous post:
Sorgelig wrote: store datetime to RTC:

Code: Select all

hwclock -wu
read RTC:

Code: Select all

hwclock -u

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

Re: RTC board

Post by Sorgelig »

JimDrew wrote:Is there some way to easily test the RTC boards? Something simple like the memtest program?
1) store the current time into RTC (linux hwclock command)
2) Disconnect network cable from MiSTer and press reboot button.

If you will be able to see the time in Menu core after reboot, then RTC chip is working. If you can see the clock in Menu core after cycle the power then battery backup function works as well.

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

Re: RTC board

Post by JimDrew »

OK, thanks. So, there seems that there is no way to test the RTC without a network connection (ethernet - which I never use). I guess I will make a test fixture with an Arduino or something.
I am the flux ninja

bernouilli
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Fri Jan 06, 2017 5:02 pm
Location: Paris/France

Re: RTC board

Post by bernouilli »

JimDrew wrote:OK, thanks. So, there seems that there is no way to test the RTC without a network connection (ethernet - which I never use). I guess I will make a test fixture with an Arduino or something.
You can set the clock manually without having an internet connexion :

hwclock --set --date="11/24/17 16:45:05"

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

Re: RTC board

Post by JimDrew »

Thanks for the info. OK, so the hwclock command is done under Linux (the original SD card that comes with the DE-10)? Is there a CLI (shell) that can be launched from somewhere? I am not a Linux guy.
I am the flux ninja

bernouilli
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Fri Jan 06, 2017 5:02 pm
Location: Paris/France

Re: RTC board

Post by bernouilli »

JimDrew wrote:Thanks for the info. OK, so the hwclock command is done under Linux (the original SD card that comes with the DE-10)? Is there a CLI (shell) that can be launched from somewhere? I am not a Linux guy.
Once MiSTer is launched, you can ssh to the board and issue the command.
I think you can even log on it using a serial terminal (speed=115200) with the board connected to the computer using the uart usb connector (the mini usb connecteor next to the micro usb port) but I didn't try it on MiSter.
you can connect by ssh to the board with :
ssh root@192.168.1.20

replace 192.168.1.20 with the ip address of the board, you can find this information on the router that provides the dhcp service, look for the connected device that have 02:03:04:05:06:07 as mac address.

The password is : 1

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

Re: RTC board

Post by JimDrew »

Thanks. I have never used ssh before, so I will have to look into what it is.
I am the flux ninja

zamp
Atarian
Atarian
Posts: 5
Joined: Sat Nov 18, 2017 8:46 pm

Re: RTC board

Post by zamp »

JimDrew wrote:Thanks. I have never used ssh before, so I will have to look into what it is.
From Linux or Mac OS X, use a command-line/Terminal shell and do what bernouilli said:

ssh root@192.168.1.20

On Windows, download and run PuTTY and use it to open an ssh connection to 192.168.1.20 and login as user root. PuTTY is available from http://www.putty.org/ .
Ron

User avatar
gagadagatika
Atari freak
Atari freak
Posts: 59
Joined: Thu Jul 13, 2017 12:14 pm
Location: Germany / Denmark

Re: RTC board

Post by gagadagatika »

hmm, I guess I will add some more details about console and ssh connection to the wiki and add a test section to the assembly guides. :D

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

Re: RTC board

Post by JimDrew »

So, I plugged the DE-10 into my Windows 10 PC today and it found the board and came up with "Unkown device successfully installed". When I go to the device manager, it shows "Unknown device" under "Other devices". The properties show the USB device info as USB\VID_09FB&PID_6810\6&3520CC6B&0&6.

What device driver software is required for the DE-10 board so that you can connect to the UART (Mini-B port) under Windows?
I am the flux ninja

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

Re: RTC board

Post by Sorgelig »

JimDrew wrote:So, I plugged the DE-10 into my Windows 10 PC today and it found the board and came up with "Unkown device successfully installed". When I go to the device manager, it shows "Unknown device" under "Other devices". The properties show the USB device info as USB\VID_09FB&PID_6810\6&3520CC6B&0&6.

What device driver software is required for the DE-10 board so that you can connect to the UART (Mini-B port) under Windows?
you've connected wrong MiniUSB port.
Serial console MiniUSB port is next to MicroUSB. And it doesn't require 3rd party drivers. Windows will install default one.
What you've connected is USB Blaster II port.
DE10-nano has very comprehensive documentation. And even color leaflet where all ports are described.

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

Re: RTC board

Post by JimDrew »

Indeed! Wrong Mini-B port!

Ok, for those that really want to test the RTC board, here is what you need to do:
  • Plug in your RTC board.
  • Power up your DE-10. Plug in a USB cable from your DE-10's UART port (Mini-B port next to the Micro-B port) to your PC. Let Windows find the port and install the UART driver.
  • Now, load a terminal program. You can use Putty, Realterm, X-CTU, etc. You just need a terminal program for serial communications. If your terminal has an option for "type", set it to ANSI. Set the baud rate to 115200 baud (8/N/1).
  • Press the ENTER key and you should get the message "Welcome to SoCFPGA de10-nano login:"
  • At the prompt type: root <press ENTER>
  • Now you will see "Password:"
  • Now type: 1 <press ENTER> (note: passwords are not echo'd, so the 1 won't show).
  • You should now see "Last login: xxxxx xxx xxx xxxx"
  • At this point you are in the Linux system and can issue Linux commands.
  • The first thing you want to do is to set the date for the Linux system. To do that type the current date and time (my example uses the date and time of this post) :

    date --set="12/01/17 16:09:00" <press ENTER>
  • The system time is now set. At this point we can simply copy the system time to the hardware clock (RTC) using this command:

    hwclock --systohc <press ENTER>
That's it! If you have a battery on your RTC board you can carefully pull the board out of the DE-10 and then put it back, and check to see if the board is working by reading the hardware clock:

hwclock <press ENTER>

You should now see the correct date and time.
I am the flux ninja

User avatar
Newsdee
Atari God
Atari God
Posts: 1554
Joined: Fri Sep 19, 2014 8:40 am

Re: RTC board

Post by Newsdee »

You should change the timezone info as well, otherwise the time will reset when you connect to the internet.

Code: Select all

mv /etc/localtime /etc/localtime.bak
cd /etc
ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
If it worked, when you type "date" you should see the correct time zone.

Then you need to set timezone info for the RTC hardware as well:

Code: Select all

hwclock -t
And that's about it.. if you reboot with the ethernet cable unplugged, you should now see the correct time

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

Re: RTC board

Post by Sorgelig »

Newsdee wrote:You should change the timezone info as well, otherwise the time will reset when you connect to the internet.
it's better to follow an official way to change the timezone:
https://github.com/MiSTer-devel/Main_Mi ... sage-notes

Locked

Return to “MiSTer”