REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

Reading & write to RTC 12887 ?

General discussions or ideas about hardware.
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

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:
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

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
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

Re: Reading & write to RTC 12887 ?

Post by exxos »

Bit more progress...

IMG_4417.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

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
You do not have the required permissions to view the files attached to this post.
User avatar
PhilC
Moderator
Moderator
Posts: 7494
Joined: 23 Mar 2018 20:22

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: 28599
Joined: 16 Aug 2017 23:19
Location: UK

Re: Reading & write to RTC 12887 ?

Post by exxos »

PhilC wrote: 25 Jun 2019 22:09 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 :)
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

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).
User avatar
JezC
Posts: 2815
Joined: 28 Aug 2017 23:44

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: 28599
Joined: 16 Aug 2017 23:19
Location: UK

Re: Reading & write to RTC 12887 ?

Post by exxos »

JezC wrote: 26 Jun 2019 23:09 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.
User avatar
exxos
Site Admin
Site Admin
Posts: 28599
Joined: 16 Aug 2017 23:19
Location: UK

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

Return to “HARDWARE DISCUSSIONS”

Who is online

Users browsing this forum: asteroid76, ClaudeBot and 11 guests