RE: Commodore joystick ports

From: Scott McDonnell (netsamurai_at_comcast.net)
Date: 2007-04-07 18:48:22

Pasi, 

You make a good argument and one I had thought of as well when I
second-guessed myself this time.

So, now I am confused again, thanks! :)

Perhaps the simplest way to know for sure would be to just try it. Just
keep in mind two things and no damage should result: First, make sure
your grounds are very well connected together. Second, make sure your
voltage will not exceed 5.1V. This should prevent any damage, but it
either will or will not work. Make sure the resolution is correct, since
you will get "something" regardless. If it works flawlessly, you should
have a resolution of about 20mV per count (5V/256 discrete values.) I
still have some strong reasons to believe it will not, but I have been
working solely on digital & microprocessor circuitry for so long now, my
analog is getting a bit fuzzy and I don't fully recall my tests at the
time.

At the time I wrote that original post, I was working on recreating the
SID in discrete circuitry at college. I got pretty far into it, but
never finished it. I was using a 555 timer for the paddle input. Maybe
my logic was skewed at the time for that reason.

Obviously, it would be desirable if the voltage can be inserted
directly. If it does not work, I will continue to flesh out the circuit
needed. I don't have a set up to test it either way at the moment (my
commodores and my college notes are packed away right now) so someone
else will have to physically try it.

Scott McDonnell

-----Original Message-----
From: owner-cbm-hackers@ling.gu.se [mailto:owner-cbm-hackers@ling.gu.se]
On Behalf Of Pasi Ojala
Sent: Saturday, April 07, 2007 4:57 AM
To: cbm-hackers@ling.gu.se
Subject: Re: Commodore joystick ports


> I have a variable voltage of 0 to 5V, and I want to
> translate this in to a current to simulate the variable resistance of
a 
> potentiometer connected to the SID's ADC

I'm almost certain the SID input isn't a current-input, and
the AD would work just fine by simply connecting the varible voltage
directly. (My hazy recollection is that I once tried to use the SID
ADC's for audio sampling, but obviously they are just too slow.)

To make the actual conversion, SID samples the input by charging a
capacitor, and then discharges it through a resistor. The amount of time
it took gives the conversion result. At least that's what I remember
reading (from Programmer's Ref.Guide,
probably) 20 years ago.

Because the input impedance limits the draw current, and sampling really
takes place (the sample capacitor is not charged continuously), you
really should not be forced to emulate a variable-current drive.

To think about it in another way, the input impedance provides the
voltage division even if the potentiometer does not have the center pin
connected.

Or am I mistaken?

-Pasi
-- 
"Khrm."
"It's .. animal magnetism, what can I say?"
	-- Londo and G'Kar in Babylon 5:"A Tragedy of Telepaths"

       Message was sent through the cbm-hackers mailing list

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.