home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / cbm / 5019 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.2 KB  |  62 lines

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