From: dpalmer@mcnc.org (W. Dev Palmer)
Subject: Re: Wanted: A to D hardware for a PC
Article-I.D.: mcnc.1993Apr6.220327.4042
Organization: MCNC Center for Microelectronics, RTP, NC
Lines: 34

In article <1993Apr6.053736.23113@doug.cae.wisc.edu> kolstad@cae.wisc.edu (Joel Kolstad) writes:
>>In <3889@ncr-mpd.FtCollinsCO.NCR.COM> Brad Wright writes:
>>
>>>	If you know much about PC's (IBM comp) you might try the joystick
>>>port.  Though I haven't tried this myself, I've been told that the port
>
>I believe that the "A-D converters" found on a joystick port are really
>timers that tick off how long it takes an R-C circuit (the R being your
>paddle) to charge up to something like 1/2 Vcc.  For games this works
>pretty well, but you certainly wouldn't want to try to take lab
>measurements off something as non-linear as that.

The best info I have seen so far is the article "Joystick Metrics:
Measuring physical properties through the PC's joystick port" by
Michael Covington in the May 1985 issue of PC Tech Journal.  It talks
about how to read all kinds of things (voltage, current, resistance) in
BASIC, and even includes code for a simple "oscilloscope" display.

It's possible to read the joystick port directly if you don't want to
use BASIC.  The detailed information for this is in the PC Technical
Reference under Options and Adapters.  You have to provide some
millisecond resolution timing functions, but that's a subject which has
appeared many times in articles from Dr. Dobb's, Circuit Cellar Ink,
etc.  Look for the public domain ztimer package on wuarchive.

Good Luck,

Dev Palmer
dpalmer@mcnc.org
MCNC Room 212
P.O. Box 12889
RTP, NC  27709-2889
(919) 248-1837
(919) 248-1455 FAX
