[Coco] MC-10 Questions...
KnudsenMJ at aol.com
KnudsenMJ at aol.com
Mon Aug 9 23:24:36 EDT 2004
In a message dated 8/8/04 1:40:23 PM Eastern Daylight Time, jdaggett at gate.net
writes:
> Since the joystick port measures voltage across a resister,you need to know
> the resistance or the current through the resister.
Actually, the joystick port measures voltage. Period. The joysticks
themselves contain pots (variable resistor taps) that convert a fixed +5V into a
lesser voltage.
> To setup the joystick port to read a resistance value you need to measure
> the
> voltage drop across an unknown resister that has as its current source a
> known constant current.
True. What I think the Apple did was to include half of the voltage divider
internally, and the joystick port (wired as a rheostat, or single-ended
variable resistor) formed the other half. The Coco's scheme is more elegant and
universal.
> The real problem is that the Coco3 does not really measure the voltage. It
> programs a middle value, between 0 and 63, into a DAC and the joystick
port
> and the output of the DAC are fed into a comparator. To determine the
exact
> position, the DAC values are adjusted until the comparator output changes
> state. Kind of an indirect method.
Actually this successive-approximation A/D method is used in just about every
digital measuring instrument. Nothing indirect about it.
ISTR that RSBASIC's JOYSTK function does this several times in a row until it
gets the same reading twice. Sort of like how I add up my income tax or golf
score -- as soon as one sum repeats itself, I write that down and quit :-)
> Besides the six bits in the DAC are woefully very inaccurate.
I think you mean "Imprecise", limited to about 20 mV steps.
Where you get inaccuracy is if the voltage changes while the A/D process is
homing in on the value. If the voltage is rapidly changing, or full of
superimposed noise, the Coco will give you wildly fluctuating readings, just like a
digital volt-ohm-meter.
That digital dashboard app may need to interpose sample-and-hold circuits to
hold the voltages steady for the conversion.
--Mike K.
More information about the Coco
mailing list