Re: Commodore joystick ports

From: Daniel O'Shea (
Date: 2007-04-10 15:49:30

Hársfalvi Levente wrote:
> Still, it should be easier to take the digital approach, especially if 
> the original form of your "0...5v signal" is digital. Todays cheap 
> microcontrollers (Atmel AVRs especially) are fast and flexible enough to 
> create a precise converter (linear response, no jitter), provided that 
> you're goot at their assembly language.


Yes, I'm starting to think that a microcontroller might be the best 
solution after all... what I'm trying to come up with is a multi-purpose 
9-pin controller that I can use to interface with an XScale PXA270 
processor, but also maintain C64 compatibility as an alternate function. 
What's complicating things is that the C64 joystick port has all its 
switches on the GND (0V) line, but the PXA270 direct-keypad interface 
wants its switches on a 3.3V line... Which at first doesn't seem like 
such a problem, until you want to start adding in variable voltage 
sources that want a connection to ground and power, if the ground and 
power lines are moving around! So now what I'm thinking is if I input 
seven switches and two variable voltages to a microcontroller, and then 
have seven outputs from the microcontroller, with a jumper or toggle 
switch connected to select between 0V and 3.3V mode, so then in 3.3V 
mode the seven outputs would be:

Up, Down, Left, Right, 3 buttons @ 3.3V (and X/Y variable voltage 
sources which can bypass the microcontroller and be separately fed 
directly to the PXA270, as it has its own ADC)

...and in 0V mode, the seven outputs would be:

Up, Down, Left, Right, 1 button @ 0V and X/Y PWM outputs (here the 
variable voltage sources are translated through the microcontroller's 
ADC into PWM outputs for the C64)

After a quick search I'm thinking a PIC16F87xA variant as it has 10-bit 
ADC inputs, and two 10-bit PWM outputs - does this seem achievable? (is 
the microcontroller's TTL I/O 3.3V?) thanks!

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.