home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.cbm
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!cc.helsinki.fi!msmakela
- From: msmakela@cc.helsinki.fi
- Subject: Re: RS-232 and POTS
- Message-ID: <1992Dec12.225926.1@cc.helsinki.fi>
- Lines: 50
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: University of Helsinki
- References: <1992Dec10.224713.7380@murdoch.acc.Virginia.EDU>
- Date: Sat, 12 Dec 1992 20:59:26 GMT
-
- dudley@cebaf4.cebaf.gov (John Dudley) writes:
-
- > First of all, does anyone know how I can install more than 4 pots and
- > read in the values on a C-64 or C-128?
-
- Yes, somebody must know that. :-)
-
- The SID chip (Sound Interface Device), 6581, has two A/D converters. The source
- of these converters are chosen by a 4066 chip controlled by the CIA (Complex
- Interface Adaptor) at $DC00. You could easily add even more potentiometer sources
- by adding 4066's outside either controller port.
-
- > Second, I need help in writing a ML file designed to take the readings
- > from the 4 joystick port pot pins and send them through at the highest
- > speed over the RS-232 port.
-
- Well, forget the RS-232! It is too slow without a real chip like 6551. However,
- I think that it could be possible to send the A/D converter readings @2.4kb/s.
-
- The 6581 A/D converters are slow. The optimal procedure is as follows:
-
- select port 1
- send potentiometer 2 x&y readings
- wait for the transfer to be complete
- (gives plenty of time for the A/D conversion to be done)
- read potentiometer (1) x&y values
- select port 2
- send potentiometer 1 x&y readings
- wait for the transfer to be complete
- ..
-
- The paddle port 1 is selected by setting the uppest bit of $DC00 and port 2 by
- setting the uppest but one (or vice-versa, I don't have any documents except
- the scematic diagram). According to either Programmer's Reference Guide or to
- German User's Guide, this bit-setting should be done in the end of each IRQ
- (after reading the keyboard, which alters $DC00), but the IRQ's are of no use
- in this application. If the RS232 NMI does not use $DC00, which is highly
- probable, you could do this bit-manipulation in the main program, if you just
- SEI before the loop.
-
- The potentiometers are read from the SID registers 25 and 26 ($D419 and $D41A).
-
- > Thanks!
-
- You are welcome!
-
- > John Dudley
-
- Marko M"akel"a
- msmakela@cc.helsinki.fi
-