Hi,
While making my own controller, I decided to measure the current levels on the joystick port.
For joy0, joy1, joy2 and the fire button, I measure between 0.8mA to 0.9mA when connected to ground. But for joy3, I measure 3.1mA, which is significantly more.
Does anyone know what reasonable values should be? Could this be a sign that something is failing?
Current levels on joystick port
Moderator: Moderators
- Mike
- Herr VC
- Posts: 4841
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Current levels on joystick port
Joy3 has a dedicated connection to the other 6522 VIA, on port B. Port B is capable of sourcing more current, and normally, this pin also is set to output. Joystick routines temporarily do a POKE37154,127 to make this an input pin and then a POKE37154,255 to restore to default, otherwise the keyboard scan does not work correctly.
You could try POKE37154,127 in direct mode to see if this reduces the current. With STOP/RESTORE you can reinit the register.
You could try POKE37154,127 in direct mode to see if this reduces the current. With STOP/RESTORE you can reinit the register.
Re: Current levels on joystick port
Thanks. The poke did the trick.
The measured current is now much closer to the others at 0.95mA.
The measured current is now much closer to the others at 0.95mA.
- Mike
- Herr VC
- Posts: 4841
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Current levels on joystick port
Nice!
BTW, we discussed the current sourcing/sinking capability of VIA port B some time ago here in Denial when it was used to operate a 4 bit D/A-converter, see here: User port sound.
Here's the relevant schematic in the data sheet:
Note the switching FET to the left of the pull-up FET.
BTW, we discussed the current sourcing/sinking capability of VIA port B some time ago here in Denial when it was used to operate a 4 bit D/A-converter, see here: User port sound.
Here's the relevant schematic in the data sheet:
Note the switching FET to the left of the pull-up FET.