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

Home » Archive » net.micro.cbm » time inaccurate on VIC
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
time inaccurate on VIC [message #74065] Sun, 26 May 2013 20:53 Go to next message
km is currently offline  km
Messages: 63
Registered: May 2013
Karma: 0
Member
Message-ID: <1401@emory.UUCP>
Date: Sat, 22-Sep-84 21:46:29 EDT
Article-I.D.: emory.1401
Posted: Sat Sep 22 21:46:29 1984
Date-Received: Thu, 27-Sep-84 05:52:39 EDT
Organization: Math & Computer Science, Emory University, Atlanta
Lines: 23

I find that the clock on my VIC20 runs about 1.5 seconds
fast per hour. Since I use it as a dedicated controller 
for my VCR, the time drift is a real problem. 

First, I wonder if the inaccuracy is characteristic in VICS, and if 
so is it by the same amount in each.

My first reaction was to compensate for the drift in my
program. Unfortunately, the program eats up all of the 3800
bytes, and for time correction to get in something else has
to go out.

Does anyone have a simple fix for tuning the clock?


Ken Mandelberg
Emory University
Dept of Math and CS
Atlanta, Ga 30322

{akgua,sb1,gatech}!emory!km   USENET
km@emory                      CSNET
km.emory@csnet-relay          ARPANET
Re: time inaccurate on VIC [message #74069 is a reply to message #74065] Sun, 26 May 2013 20:53 Go to previous messageGo to next message
joels is currently offline  joels
Messages: 20
Registered: May 2013
Karma: 0
Junior Member
Message-ID: <3718@tektronix.UUCP>
Date: Thu, 27-Sep-84 12:12:30 EDT
Article-I.D.: tektroni.3718
Posted: Thu Sep 27 12:12:30 1984
Date-Received: Sat, 29-Sep-84 09:42:37 EDT
References: <1401@emory.UUCP>
Organization: Tektronix, Beaverton OR
Lines: 11

()
    I also have used VICs for dedicated control applications. I found that
they all have inaccurate clocks. Some run fast and some run slow. Each one
is different. I wrote some automatic corrrection code into my program. I 
found that even the ammount of error varied over time on the same machine.
I have to set the time at least once a week to maintain accuracy to within
a couple of minutes. I'm afraid that if you need extreme accuracy over
a long period of time, the only answer will be a hardware clock.

Joel Swank
Tektronix, Beaverton OR
Re: time inaccurate on VIC [message #74070 is a reply to message #74065] Sun, 26 May 2013 20:53 Go to previous messageGo to next message
joels is currently offline  joels
Messages: 20
Registered: May 2013
Karma: 0
Junior Member
Message-ID: <3718@tektroni.UUCP>
Date: Thu, 27-Sep-84 12:12:30 EDT
Article-I.D.: tektroni.3718
Posted: Thu Sep 27 12:12:30 1984
Date-Received: Sun, 30-Sep-84 04:22:46 EDT
Lines: 19

References: <1401@emory.UUCP>
Relay-Version:version B 2.10.1 6/24/83; site ncsu.UUCP
Posting-Version:version B 2.10.1 (Tek) 9/26/83; site tektronix.UUCP
Path:ncsu!mcnc!decvax!tektronix!joels

Message-ID:<3718@tektronix.UUCP>
Date:Thu, 27-Sep-84 12:12:30 EDT
Organization:Tektronix, Beaverton OR

()
    I also have used VICs for dedicated control applications. I found that
they all have inaccurate clocks. Some run fast and some run slow. Each one
is different. I wrote some automatic corrrection code into my program. I
found that even the ammount of error varied over time on the same machine.
I have to set the time at least once a week to maintain accuracy to within
a couple of minutes. I'm afraid that if you need extreme accuracy over
a long period of time, the only answer will be a hardware clock.

Joel Swank
Tektronix, Beaverton OR
Re: time inaccurate on VIC [message #74071 is a reply to message #74065] Sun, 26 May 2013 20:53 Go to previous messageGo to next message
blk is currently offline  blk
Messages: 36
Registered: February 2013
Karma: 0
Member
Message-ID: <486@syteka.UUCP>
Date: Fri, 28-Sep-84 15:08:58 EDT
Article-I.D.: syteka.486
Posted: Fri Sep 28 15:08:58 1984
Date-Received: Mon, 1-Oct-84 04:13:00 EDT
References: tektroni.3718
Lines: 10


I'm not sure how the VIC works, but if it is like the 64 (bet it is!)
the 'clock' accessible from basic is not really a clock at all, but
a counter that shows how many interrupts have elapsed.  This roughly
approximates a clock.  The 64 uses a Versatile Interface Adapter (VIA)
to read the keyboard, as did the old pet.  This chip has a hardware
clock hidden in it that can be reached with some peek/pokes.  The
VIC likely has one, too.

B<
Re: time inaccurate on VIC [message #74096 is a reply to message #74065] Sun, 26 May 2013 20:53 Go to previous message
doug is currently offline  doug
Messages: 117
Registered: May 2013
Karma: 0
Senior Member
Message-ID: <175@terak.UUCP>
Date: Mon, 15-Oct-84 13:47:40 EDT
Article-I.D.: terak.175
Posted: Mon Oct 15 13:47:40 1984
Date-Received: Thu, 18-Oct-84 06:44:11 EDT
References: <1401@emory.UUCP> <3718@tektroni.UUCP>
Organization: Terak Corporation, Scottsdale, AZ, USA
Lines: 21

[]

If you get ahold of one of the manuals which lists the page
zero memory usage in the VIC, I'm pretty sure you will find
a pair of locations which contains the clock speed used for
the 2622 VIA.  This value is such that:
                                system clock (about 1 million)
ticks_per_second (about 60) =  ---------------------------
                                (LOC+1)*256 + (LOC)

By adjusting the contents of those locations via POKEs, you
should be able to adjust the clock speed.  Use smaller values
for faster, larger values for slower.

I can't guarantee that these locations exist, but I'd give
you 10-to-1 odds on it.  They could be in ROM, where you can't
change them even if you find them -- you might try changing
the VIA directly in that case.

Good Luck!
    Doug Pardee -- Terak Corp. -- ...!noao!terak!doug
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wanted: Terminal emulator for the C64
Next Topic: 80 column card for C64
Goto Forum:
  

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

Current Time: Thu Mar 28 08:41:19 EDT 2024

Total time taken to generate the page: 0.18256 seconds