Reading & write to RTC 12887 ?

General discussions or ideas about hardware.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

I think someone else will have to write the GUI for this stuff.. its been like 3 years since I wrote GB6 and worked out how to use resource files etc. I started ripping code out of GB6 to speed things up, but I basically had to write a whole framework of stuff to do it, and would likely take me weeks to figure it all out again :roll:
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

I've started a crappy RTC tool.

So far it clears the RTC and sets up some registers to make the clock work...

I assume this would actually work on the Falcon as well..

00001.png
00001.png (31.88 KiB) Viewed 3598 times
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

Bit more progress...

IMG_4417.JPG
IMG_4417.JPG (396.09 KiB) Viewed 3591 times
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

Most functions are working now, other than actually setting time and date :lol:

This ended up far more annoying than I thought.. mostly as I wanted to use binary figures in my code, but there is no way to change a bit in a array, but there is in STOS, but not hisoft basic :roll: So I had to program some crappy routines to do it.

Also seems no easy way to input a HEX number into a string , can't be a number as its got letters in it, and strings.. I had to do a "look up table" to convert all the hex input codes to a number.. Also no way to convert a binary number to a decimal number.. the chaos goes on and on..

Even more crappy is BIN$ to convert a number to binary isn't even listed in the manual!! but it actually works as a command..

So overall, really starting to hate hisoft basic. I was trying to keep the file sizes low in not doing this all in STOS, but it would have been way quicker and easier to actually do this all in STOS :roll:

I've not looked, but a bit of ASM might be a option.. though it would only really be for neatness of it all. I think there was a 68000 bit set and clear instruction, not looked...

IMG_4418.JPG
IMG_4418.JPG (381.81 KiB) Viewed 3567 times
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
PhilC
Moderator
Moderator
Posts: 6016
Joined: Fri Mar 23, 2018 8:22 pm

Re: Reading & write to RTC 12887 ?

Post by PhilC »

Yep, some things just don't work well in basic.

Now if I'd got off my bum a couple of weeks ago with this assembler stuff....... he says in hindsight. Maybe the next project?
If it ain't broke, test it to Destruction.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

PhilC wrote: Tue Jun 25, 2019 10:09 pm Yep, some things just don't work well in basic.

Now if I'd got off my bum a couple of weeks ago with this assembler stuff....... he says in hindsight. Maybe the next project?
I will post the source code for the tool, anyone can do a better one.. just I am in a hurry to get it all up and running, so hacking up anything which works to get the project moving... but in terms of a proper RTC tool, it really needs a better one coding up. My tool is more hacking registers about than actually setting the time and date.

I mean my tool will do the job, and works, its just crap :lol: I mean it be cool to just click a bit on the screen to edit it.. that be sweet.. but my programming is crap, and hisoft is crap.. so... :lol:

Hopefully I can move onto the flash stuff next week :)
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

If anyone has a Falcon to hand, I can send the test program to see if it will read the registers on a Falcon (it should do).
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
JezC
Posts: 2081
Joined: Mon Aug 28, 2017 11:44 pm

Re: Reading & write to RTC 12887 ?

Post by JezC »

I might be able to try it on my Falcon tomorrow if that is any help?
It'd have to work on VGA (as I still haven't found the Falcon monitor port ->13 pin Atari adaptor yet) :roll:
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

JezC wrote: Wed Jun 26, 2019 11:09 pm I might be able to try it on my Falcon tomorrow if that is any help?
It'd have to work on VGA (as I still haven't found the Falcon monitor port ->13 pin Atari adaptor yet) :roll:
Yeah, will pm you it tomorrow. Its a gem app, so it shouldn't care of resolutions as long as its medium res minimum.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Reading & write to RTC 12887 ?

Post by exxos »

Why is it always me who runs into issues when the datasheets wrong :lol: :roll:

Dear Maxim,

Is there a error on page 14 Table 2B.. register 06H shows "DAY" as only BIT1 & BIT2, but thats only a count of 3... I'm assuming its a error in the table and the line is supposed to be further to the left ? The table on the previous page looks correct...

Thanks,
Chris

Hello Chris,

Thanks for pointing out that issue with Table 2B. This is likely a copy/paste error made by our technical publication team the last time they updated the datasheet. I will let them know of the issue.

Regards,
Zack Cox
Applications Engineering
Maxim Integrated
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
Post Reply

Return to “HARDWARE DISCUSSIONS”