Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!daemon From: XBR1D97B%DDATHD21.BITNET@WISCVM.WISC.EDU Newsgroups: net.micro.amiga Subject: Amiga clock again Message-ID: <1900@caip.RUTGERS.EDU> Date: Wed, 16-Apr-86 14:54:11 EST Article-I.D.: caip.1900 Posted: Wed Apr 16 14:54:11 1986 Date-Received: Fri, 18-Apr-86 05:24:26 EST Sender: daemon@caip.RUTGERS.EDU Organization: Rutgers Univ., New Brunswick, N.J. Lines: 87 From: XBR1D97B%DDATHD21.BITNET@WISCVM.WISC.EDU (D97B@BR1.THDNET) REPLY-TO: <#D2S%DDATHD21.BITNET@WISCVM.WISC.EDU> Hello amigas and amigos, about three weeks ago I posted two mails to the net. One was about CLI (ideas for improvement) and the other was about a clock-timing-problem. While someone was able to help me in the first place (ZLI, right?), the clock-timing-problem is still unanswered. Looking at the replies I received (3!), I think you people outside in netland did not understand me (due to my english?). So I try again... My problem was (and is!) the following: The realtime-clock inside the Amiga is realized using the TOD-clock, contained in one of the 8520 CIA's. *** Appendix_F Page 6: ====================== > TIME OF DAY CLOCK > > TOD consists of a 24-bit binary-counter. Positive edge transistions on > this pin cause the binary-counter to increment. The TOD pin has a > passive pull-up on it. *** Appendix_F Page 10: ======================= > BIT MAP OF REGISTER CRA: > REG # NAME TOD . . . . > IN . . . . > E CRA 0=60Hz . . . . > 1=50Hz . . . . In the USA the AC-supply (the *JUICE*) is 110 V / 60 Hz, while e.g. W.Germany has 220 V / 50 Hz instead. As the TODIN pin is clocked by the *JUICE*, Amiga with US-software wants 60 Hz and gets 50 Hz. This makes the TOD-clock 10 Hz too slow. I tried to fix this problem by setting the CRA TODIN-bit to logical 1 (=50Hz) in 68000, but it failed. Failed the way, that the WORKBENCH-clock was still too slow. Probably my program is OK, but the clock-program forces the TODIN-bit back to logical 0 (=60Hz)? If this is true, Amiga should offer an EURO-PATCH for the Amiga (do YOU LISTEN Amiga-people?). Maybe my program is not right. So I post it here. Please don't tell me, that it is right, just answer, if it is wrong! <68000-routine to set TODIN-clock to 50 Hz following:> > RORG 0 ; everything's relative > CIAACRA EQU $BFEE01 ; 8520-A CRA > CIABCRA EQU $BFDE00 ; 8520-B CRA > TODIN EQU $80 ; Bit 7 of CRA (TODIN) > * > * This routine sets bit 7 of the CRA's of both CIAs inside the Amiga > * to 50 Hz-mode. I set both of them to 50 Hz, just because I don't > * know which one is really used for the realtime-clock... > * > BEGIN: ORI.B #TODIN,CIAACRA ; which one might it be ? This one, > ORI.B #TODIN,CIABCRA ; or this one ? > RTS ; old Beatle-song: GET BACK! > * > * This is what I tried, and if you believe it or not, it failed! > * > END ; Yes, I like PASCAL-notation! Ok, amiga-gurus, where's your wise advise (please don't let me long too long...). awaiting your help Kosta Kostis --------------------------------------------------------------------------- P l e a s e dont't reply to my F R O M -address!!! If you want to MAIL anything to m e send it to: === BITNET: #D2S@DDATHD21 APRA : #D2S%DDATHD21.BITNET@WISCVM.WISC.EDU UUCP : SAM:'guess a number between one and thirty!','42','That's correct!' HOME : Kosta Kostis, Talstr. 25, 6074 Roedermark 3, W. Germany Disclaimer: Tell me what time it is, and I tell you what I disclaim! ---------------------------------------------------------------------------