Re: Commodore joystick ports

From: Jim Brain (
Date: 2004-10-21 23:06:58

> more, it appears that it bangs the 6 bit position data digitally (why it
> would do this on the POT port, I don't understand...) Is this what you
> getting from this?:

Yes.  It does that to "feed" 1uS chunks of 5V to the capacitor used by SID
to determine the pot position (using the idea that you can detect voltage
by charging a cap to that voltage and measuring how long it takes to
discharge.)  The more 1uS chunks of 5V I feed, the more charge the cap
has, the higher voltage is recorded.  Primitive, but I was amazed that it
works pretty well.

> I would think it would make more sense to simply emulate a paddle. In
> which
> case, you could use a transistor to create a current source on each pot
> port
> which would emulate a paddle. It is a little early for me this morning to
> think clearly, but I will look at this later tonight and try to help more
> if
> someone doesn't already answer you.

Because I loathed this bit-bang the POT line approach, I tried a bunch of
other ideas first.

My initial idea was to use PWM through a low pass RC filter to create the
correct voltage, but that did not work at all.  I'm still not sure why
this simplistic approach did not work.

I then thought of using a digital pot, but it looks like the POT lines
need a 500k pot swing to go from 0 to 255, and I couldn't find a part that
swung that far.

I then looked at serial DACs, as Maxim has some low cost dual SPI DAC
parts, but Could not determine if that would work, so abandoned the idea.

I did not try a current approach (Analog is my weak subject), but wouldn't
I need some sort of analog input to the transistor in order to bias it to
a certain level?


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.