no-software internal RTC

Current solutions and designs.
tzok
Posts: 79
Joined: Sat Dec 30, 2017 2:27 pm

no-software internal RTC

Post by tzok » Sat Jan 13, 2018 11:31 pm

This is just an idea in my mind. No actions have been taken to implement it yet.

I really don't like RTC mods for Atari ST presented over the Internet for requiring an additional software. ST does have an RTC, the only problem is that it is not backed-up. The RTC is in the keyboard. Keyboard communicates with the motherboard over an UART. So my idea is to design a pass-through device with DS1307 battery back-up RTC and uC, connected between motherboard and keyboard that could either:
- upon power-on (or reset) just send a command to the keyboard RTC to set date/time to the current values, otherwise stay transparent, and should also listen to the commands from motherboard to capture the sequence for setting the original RTC using Control Panel, and set its own RTC according to that command,
...or:
- intercept and filter out any RTC read and RTC set commands, translate and redirect them to own RTC chip totally replacing RTC functionality of the keyboard controller, and cutting it from any queries.

I think all this could be done using a cheap ATTiny or ATMega uC. Only challenge is to identify and describe the serial communication details and get/set date commands and format. I think this can be done by writing a simple program (even in Omikron.Basic using DATES$ and TIMES$ functions) that would get and set RTC in a specified intervals and with a known values without any keyboard/mouse events and observe serial communication using a logic analyser connected to RxD and TxD lines of keyboard connector (I've done similar thing with different devices)... or maybe someone already knows the UART parameters and these commands?

User avatar
exxos
Site Admin
Site Admin
Posts: 4669
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: no-software internal RTC

Post by exxos » Sun Jan 14, 2018 12:47 am

Sounds like a great idea. Would assume all the info would be in the data sheet for the keyboard ic ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Petari
Software Moderator
Software Moderator
Posts: 573
Joined: Tue Nov 28, 2017 1:32 pm

Re: no-software internal RTC

Post by Petari » Sun Jan 14, 2018 7:55 am

Well, talking about what would be simpler:
1: Modding TOS, so no need for additional SW - in case of using some dedicated RTC chip.
2: Adding battery + couple cheap parts to ensure power of IKBD chip when ST is not powered on. http://atari.8bitchip.info/ikbdbatt.html

And most important: none of 2 mentioned HW solutions is good for current years - what means that extra SW IS necessary. TOS functions for time handle can up to 1999 only.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
Maeke
Posts: 247
Joined: Thu Aug 17, 2017 3:09 pm

Re: no-software internal RTC

Post by Maeke » Sun Jan 14, 2018 10:22 am

Actually the tos supports directly at least one rtc ic, the ricoh rp5c15, it's hard to find and you have to develop a board, but all you need to use it is atari's control panel.
If i take too long to reply, sorry my cat is sleeping on my laps.

Petari
Software Moderator
Software Moderator
Posts: 573
Joined: Tue Nov 28, 2017 1:32 pm

Re: no-software internal RTC

Post by Petari » Sun Jan 14, 2018 11:22 am

Maeke wrote:
Sun Jan 14, 2018 10:22 am
Actually the tos supports directly at least one rtc ic, the ricoh rp5c15, it's hard to find and you have to develop a board, but all you need to use it is atari's control panel.
I made it in past. After project in ST Magazine - if I remember correct. No board developing, just on prototype board. It has only 1+ IC 74LS132 and couple resistors, diode, tranzistor and 32768 Hz crystal. Still, you need patch for correct year handling/displaying .
Actually, that is what is in Mega ST. Who wants to make it should check Mega ST schematic.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
exxos
Site Admin
Site Admin
Posts: 4669
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: no-software internal RTC

Post by exxos » Sun Jan 14, 2018 11:28 am

Does the rp5c15 itself support dates over 2000 ? The datasheet doesn't seem to say. Of course like you say, software is patched as work-around for this.

In my future projects I plan to use same RTC kit as I produce for Falcon RTC replacement. Of course need some basic software to use it on ST.. Falcon software is available, but depends on RTC addresses used. So think new software would be better. Can create more useful tools etc.
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Petari
Software Moderator
Software Moderator
Posts: 573
Joined: Tue Nov 28, 2017 1:32 pm

Re: no-software internal RTC

Post by Petari » Sun Jan 14, 2018 12:09 pm

RTC chips, at least those old ones store not exact year value, but some number of bits for year. Similar is with TOS date format. It has 7 bits for year, and starts at 1980 - so value 0 in year field means 1980 . Some may ask: how then it's not year 2000 compliant ? I guess there are some code parts not handling values over 19 properly. Should look in RP5C15 datasheet for it's concrete year bit field parameters.
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

User avatar
Maeke
Posts: 247
Joined: Thu Aug 17, 2017 3:09 pm

Re: no-software internal RTC

Post by Maeke » Sun Jan 14, 2018 12:10 pm

Petari wrote:
Sun Jan 14, 2018 11:22 am
Maeke wrote:
Sun Jan 14, 2018 10:22 am
Actually the tos supports directly at least one rtc ic, the ricoh rp5c15, it's hard to find and you have to develop a board, but all you need to use it is atari's control panel.
I made it in past. After project in ST Magazine - if I remember correct. No board developing, just on prototype board. It has only 1+ IC 74LS132 and couple resistors, diode, tranzistor and 32768 Hz crystal. Still, you need patch for correct year handling/displaying .
Actually, that is what is in Mega ST. Who wants to make it should check Mega ST schematic.
Yep, this said for a ste i think it's simpler (and we have to take example on the mega ste schematics this time).
This said it's exactly because the rp5c15 ic isn't y2k compatible and the stf and ste needs different schematics that i talked with exxos about the ds1315.
It could be developped for all st, stf and ste in one pcb. Of course you need a software but i think it's way better.
If i take too long to reply, sorry my cat is sleeping on my laps.

User avatar
rubber_jonnie
Moderator
Moderator
Posts: 631
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: no-software internal RTC

Post by rubber_jonnie » Sun Jan 14, 2018 12:37 pm

It's slightly annoying that I did have a picture of a battery back up mod for the ST keyboard, but I don't seem to be able to find it right now :(

I think the issue here is that the keyboard RTC is probably not Y2K compliant, so is it worth the effort of development?

Given the tiny size of the RTC software in the Auto folder, it seems like a lot of effort to do something else, when the RTC demand seems to be quite small.

Just my thoughts, jotted down on a lazy Sunday morning :)
Collector of old Atari things:
800XL + Ape Warp mod, 2x 1010 cassette, 1050 + Happy mod, 65XE (128k) & XC12, SIO2SD, 2600jr, 7800 and Lynx II
Atari 520ST (1Meg) + Gotek, 1040STFM + Vortex ATOnce + Gotek, 1040STF long button floppy, 4160 STE with Gotek and ROM switcher, 4160STE with 32Mhz booster, ROM switcher and CosmosEx, not to mention various bare ST boards for testing including a PAK 68/2 :)
Plus the rest..
Amiga stuff, Mac stuff, Sinclair stuff etc...
www.electronicnothingness.co.uk

User avatar
exxos
Site Admin
Site Admin
Posts: 4669
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: no-software internal RTC

Post by exxos » Sun Jan 14, 2018 12:53 pm

rubber_jonnie wrote:
Sun Jan 14, 2018 12:37 pm
It's slightly annoying that I did have a picture of a battery back up mod for the ST keyboard, but I don't seem to be able to find it right now :(
Peters site has the diagram of it. I have seen it done on keyboards I have had in the past, but mostly was just leaked batteries so got binned.
rubber_jonnie wrote:
Sun Jan 14, 2018 12:37 pm
I think the issue here is that the keyboard RTC is probably not Y2K compliant, so is it worth the effort of development?
Troed patched the RTC software as you know to work with 2K+ dates. So as the keyboard chip is old, assume similar needed to be developed, either software created, or TOS patched.
rubber_jonnie wrote:
Sun Jan 14, 2018 12:37 pm
Given the tiny size of the RTC software in the Auto folder, it seems like a lot of effort to do something else, when the RTC demand seems to be quite small.
I can see the point of the project, to create a "pass through" solution. That in itself isn't a bad idea, but would have to use a new RTC IC anyway. TOS patches might have to be done. Though I think thats a "long winded" way of just having a small auto folder program.

rubber_jonnie wrote:
Sun Jan 14, 2018 12:37 pm
Just my thoughts, jotted down on a lazy Sunday morning :)
:) For me, I need the NVRAM in the RTC like used on falcon for future boosters. So I need something more advanced anyway. I already have the RTC falcon modules, so for me it makes sense to also use those on ST projects. Again, need software creating...

For people who want a low cost "plug in" type RTC, then the OP's idea would be ideal if it can make use of more modern RTC chips.
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Post Reply