Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » more detailed CIA prublems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
more detailed CIA prublems [message #13163] Sun, 19 August 2012 17:52 Go to next message
rusure is currently offline  rusure
Messages: 1030
Registered: March 2012
Karma: 0
Senior Member
;please discard my recent posts on my cia difficulties.
;
;for the cia, i use the convention that for am times, the hiorder
;bit of the hour register is clear and for pm times the hour
;hiorder bit is set. the cia represents times by the bcd numeral
;system. my program converts ordinary decimal numerals to bcd.
;when the cia is set to 11:59:45.0 am, the cia rolls over in 15
;seconds to 12 noon pm. when set to 11:59:45.0 pm, the time will
;roll over to 12 midnight am. this works well for most times the
;cia clock is set to. the cia clock gets flaky when setting the
;hour register to 12 midnight am or to 12 noon pm. when the hour
;register is set to 12 am, my progam stores a clear hiorder bit
;in the hour register. the cia then overides my clear hiorder
;bit by setting the hour register hiorder bit for me(?). the
;cia will then roll over to 1 pm. the cia clears the hiorder
;hour register bit when it is set to 12 pm. the cia then rolls
;over to 1 am. this flaw probably came about because it was
;assumed that the cia hour register would only roll over to
;12. the instant the hour register becomes 12, the hiorder bit
;is "exclusive ored". the operation is performed regardless of
;whether a roll over to 12 just occurred or the hour was set.
;two work arounds are available. one work around is to set the
;hour registernd here to 00. i haven't thought of what could go wrong,
;but the cia never rolls over to 00. another way is to set the
;hour to 12 am when 12 pm is needed or 12 pm when the hour should
;be 12 am. i uploaded a movie to google drive to show what
;happens when my c64 program is used to set the cia hour to 12.
;the movie can be found here :
; https://docs.google.com/open?id=0B80L9cEZ8YnvN2hyeVRUTTBCeDg
;a zipped file containing the program source and binary files
;plus a copy of the source as a standard ascii file can be found
;here : https://docs.google.com/open?id=0B80L9cEZ8YnvSEtPSU9vOEI0Unc
Re: more detailed CIA prublems [message #13240 is a reply to message #13163] Mon, 20 August 2012 13:28 Go to previous messageGo to next message
James @ cbm264 is currently offline  James @ cbm264
Messages: 419
Registered: March 2012
Karma: 0
Senior Member
On Aug 19, 4:52 pm, rusure <r_u_s...@mybluelight.com> wrote:
> ;for the cia, i use the convention that for am times, the hiorder

> ;bit of the hour register is clear and for pm times the hour

> ;hiorder bit is set.  the cia represents times by the bcd numeral

> ;system.  my program converts ordinary decimal numerals to bcd.

> ;when the cia is set to 11:59:45.0 am, the cia rolls over in 15

> ;seconds to 12 noon pm.  when set to 11:59:45.0 pm, the time will

> ;roll over to 12 midnight am.  this works well for most times the

> ;cia clock is set to.  the cia clock gets flaky when setting the

> ;hour register to 12 midnight am or to 12 noon pm.


I refer you to a previous discussion:
http://groups.google.com/group/comp.sys.cbm/browse_thread/th read/ef1b1574ab1548ec/

*wink and nudge*
-J
Re: more detailed CIA prublems [message #13956 is a reply to message #13240] Mon, 27 August 2012 00:08 Go to previous message
rusure is currently offline  rusure
Messages: 1030
Registered: March 2012
Karma: 0
Senior Member
On Monday, August 20, 2012 11:28:29 AM UTC-6, James @ cbm264 wrote:
> On Aug 19, 4:52 pm, rusure <r_u_s...@mybluelight.com> wrote:

>

> I refer you to a previous discussion:

>

> http://groups.google.com/group/comp.sys.cbm/browse_thread/th read/ef1b1574ab1548ec/


I had completely forgot about that thread. What's even more embarrassing is that I initiated the older thread. This thread is an inferior remake
+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Setting the clock in the afternoon
Next Topic: FD-4000 Jumper Settings???
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Feb 22 09:53:06 EST 2025

Total time taken to generate the page: 0.13276 seconds