Page 1 of 4

RTC Query

Posted: Sat Mar 09, 2024 8:52 pm
by t0nyt
I know pretty much nothing about electronics (as has been proven in various threads) but I was wondering if it would be feasible to connect one of those cheap battery backed RTC i2c (designed for Arduino, Pi etc) to an i2c to rs232 converter and then connect that into SER2 and be able to query the date/time to set the QL clock at boot

Any thoughts please?

Many thanks

Re: RTC Query

Posted: Tue Mar 12, 2024 8:19 am
by t0nyt
Maybe it would be better to build a rs232 to WiFi modem bridge as the 2 parts needed are dirt cheap and widely available

But i’m going to use a laptop as a temporary bridge initially, to test setting the QL clock via an internet timeserver over rs232/wifi

Re: RTC Query

Posted: Tue Mar 12, 2024 8:32 am
by tofro
There seem to be simple I2C-to-RS232 adapters that allow you to connect I2C devices to RS232 serial interfaces.

Here's a link to such an adapter kit: https://www.horter-shop.de/de/i2c-pc-ad ... 60547.html

(Note I haven't tried wether that works with the QL, but don' see much reason why it shouldn't. These things seem to be doing the level shifting and clock generation, there's still some software to write)

Re: RTC Query

Posted: Tue Mar 12, 2024 8:51 am
by Pr0f
The Minerva MKII has I2C interface and does have an on board I2C RTC and RAM chip.

There is a project ongoing on here to recreate the PCB for that - the code is already in the Minerva ROM

Re: RTC Query

Posted: Tue Mar 12, 2024 9:07 am
by t0nyt
tofro wrote: Tue Mar 12, 2024 8:32 am There seem to be simple I2C-to-RS232 adapters that allow you to connect I2C devices to RS232 serial interfaces.

Here's a link to such an adapter kit: https://www.horter-shop.de/de/i2c-pc-ad ... 60547.html

(Note I haven't tried wether that works with the QL, but don' see much reason why it shouldn't. These things seem to be doing the level shifting and clock generation, there's still some software to write)
Thanks, have ordered one to have a play

Re: RTC Query

Posted: Tue Mar 12, 2024 9:09 am
by t0nyt
Pr0f wrote: Tue Mar 12, 2024 8:51 am The Minerva MKII has I2C interface and does have an on board I2C RTC and RAM chip.

There is a project ongoing on here to recreate the PCB for that - the code is already in the Minerva ROM
Minerva 2 would interest me for the RTC element, though I prefer to run JS rom (I have a Minerva 1 for memory diagnostics, but it lives in an anti-static bag)

Many thanks

Re: RTC Query

Posted: Tue Mar 12, 2024 9:53 am
by Pr0f
The other approach would be to use an RTC chip that actually does have a "seconds counter" and just disable the ZX8302 whenever a read access to those RTC addresses is made - and provide the data from the seconds counter RTC chip instead. No I2C needed - as the code in the QL is already setup to read the RTC and process the format.

What you would need to do is provide some function to set the RTC - but I am guessing that doesn't need to be done that often, and a BASIC program offering that may suffice.

Re: RTC Query

Posted: Tue Mar 12, 2024 10:14 am
by t0nyt
Pr0f wrote: Tue Mar 12, 2024 9:53 am The other approach would be to use an RTC chip that actually does have a "seconds counter" and just disable the ZX8302 whenever a read access to those RTC addresses is made - and provide the data from the seconds counter RTC chip instead. No I2C needed - as the code in the QL is already setup to read the RTC and process the format.

What you would need to do is provide some function to set the RTC - but I am guessing that doesn't need to be done that often, and a BASIC program offering that may suffice.
That sounds way above my pay grade! :shock:

Also, I don’t really want to modify the mobo (other than necessary repairs)

Adding RAM, changing ROM to JS and attaching plug-in storage/other solutions are as far as I want to go really.

Many thanks

Re: RTC Query

Posted: Wed Mar 13, 2024 7:17 pm
by t0nyt
I have the I2C/RS232 adapter, an I2C RTC and some QL serial leads all ordered.

May need some other odd bits I haven’t thought of yet though too

Whether I’ll be able to achieve what I want is a different matter!

Re: RTC Query

Posted: Wed Mar 13, 2024 11:00 pm
by Peter
tofro wrote: Tue Mar 12, 2024 8:32 am Here's a link to such an adapter kit: https://www.horter-shop.de/de/i2c-pc-ad ... 60547.html

(Note I haven't tried wether that works with the QL, but don' see much reason why it shouldn't. These things seem to be doing the level shifting and clock generation, there's still some software to write)
Won't work directly, since it uses the DSR line which the QL does not provide.