Hi all,
Documentation dump on the Real Time Clock stuff I had at the Dragon meet.
The attached zip file contains:
* An overview RTC.pdf document
* KiCad schematic pdf and a board gerbers zipfile
* The DS1315 data sheet
* Assembly language source for the RTC.BIN get/set routines (callable from Dragon BASIC).
* Assembly language source for the getrtc OS9 command
* A DragonDOS 40 track single sided headerless DSK image with the Basic and machine code access routines
* An OS9 40 track single sided headerless .os9 image with the getrtc command, source, plus the nulldr and null device driver and descriptor
I still have one complete board, and a few PCBS but am out of DS1315s, and they are getting more difficult to find at sane prices. If anyone wants the last assembled board, let me know, or if there are a few people who are interested, I'll try and get the parts to make more. A saner option may be to redesign with the SOP version of the part which seems to still be relatively low cost.
Kind regards,
Mike
Dragon 64 internal DS1315 RTC board
Re: Dragon 64 internal DS1315 RTC board
That's some pretty tenacious coding you've pulled off there to access the rtc ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
Stew
Re: Dragon 64 internal DS1315 RTC board
Cheers Stew, it was brute force (and ignorance) mostly ![Laughing :lol:](./images/smilies/icon_lol.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: Dragon 64 internal DS1315 RTC board
Just some proof of concept code to access the rtc without switching roms.
Should help with getting one of these working in a Dragon 32.
Should help with getting one of these working in a Dragon 32.
- Attachments
-
- test.zip
- (1.53 KiB) Downloaded 289 times
Stew
Re: Dragon 64 internal DS1315 RTC board
Nice work Stew! I had thought about the compiling approach, but disregarded it because it would mean throwing code into the process storage space under os9 which seemed a bit dirty. Fast work to get an implementation out ![Wink ;-)](./images/smilies/icon_e_wink.gif)
I'm now thinking throwing code into that space is the only sane way to get your banked 256k board fully working as a ram disk under os9 though!
This leaves just the "third way" for the DS1315 RTC (a fully safe routine using conditional branching with jmp ,reg) but that's going to be so messy only a madman would try it![Laughing :lol:](./images/smilies/icon_lol.gif)
I'm away from my Dragons at the moment but will check Phil's D32(64) ROM board in my original D32(64) for which enable line it uses... 50/50 chance. Fingers crossed I'll be able to try this out!
![Wink ;-)](./images/smilies/icon_e_wink.gif)
I'm now thinking throwing code into that space is the only sane way to get your banked 256k board fully working as a ram disk under os9 though!
![Cool 8-)](./images/smilies/icon_cool.gif)
This leaves just the "third way" for the DS1315 RTC (a fully safe routine using conditional branching with jmp ,reg) but that's going to be so messy only a madman would try it
![Laughing :lol:](./images/smilies/icon_lol.gif)
I'm away from my Dragons at the moment but will check Phil's D32(64) ROM board in my original D32(64) for which enable line it uses... 50/50 chance. Fingers crossed I'll be able to try this out!
Re: Dragon 64 internal DS1315 RTC board
Not quite sure where this lies on the filthometer, but one code trick I'm fond of is using rts with a preloaded stack as a fast loop counter or sequencer. A similar thing can be done with puls regs,pc to quickly make a series of function calls with parameters. This approach is nicer because it respects the distinction between code and data regions.
Of course, rts and puls won't work with the rtc but RTI might be nice (V) (°,,,,°) (V)
Of course, rts and puls won't work with the rtc but RTI might be nice (V) (°,,,,°) (V)
- Attachments
-
- test_rti.zip
- (1.99 KiB) Downloaded 284 times
Stew
Re: Dragon 64 internal DS1315 RTC board
Doesn't RTI spit a dead cycle at the end though?!
Re: Dragon 64 internal DS1315 RTC board
It does, but the beautiful thing is that it emits the stack pointer during that cycle rather than FFFF
![Uber Geek :ugeek:](./images/smilies/icon_e_ugeek.gif)
Something similar happens to allow say LDA ,X to work. It runs for four cycles: First two cycles are opcode and postbyte, then there is a dead cycle but the 6809 is speculatively fetching another index postbyte, while the fourth cycle is of course the effective address.
Stew
Re: Dragon 64 internal DS1315 RTC board
Ah... That's different from the cycle reference info on Arto Salmi's page which suggests FFFF! Interesting.
http://atjs.mbnet.fi/mc6809/Information/6809cyc.txt
http://atjs.mbnet.fi/mc6809/Information/6809cyc.txt
Re: Dragon 64 internal DS1315 RTC board
Thanks for posting this Mike.
I've attempted to build this board, but the attached D64RTC.dsk seems empty (or at least I can't read it). Can you share the DragonDos files again?
thanks
I've attempted to build this board, but the attached D64RTC.dsk seems empty (or at least I can't read it). Can you share the DragonDos files again?
thanks