Commodore 64 Keyboard Joystick & Paddle Interfaces

Posted on Feb 6, 2014

U1 is a Complex Interface Adapter (CIA). Both parallel ports are used to decode the keyswitches on the keyboard. Parallel port A signals (PA0 - PA7) are outputs. PArallel port B signals (PB0 - PB7) are inputs. A `0` bin is shifted through the parallel port A, when a key is depressed on the keyboard the `0` bit is returned on one of the parallel port B inputs.

Commodore 64 Keyboard Joystick & Paddle Interfaces
Click here to download the full size of the above Circuit.

A program in the KERNAL ROM generates the shifting "0" bit output on parallel port A, and decodes the signals returning on the parallel port B inputs. Depressing the restore key causes U20 to trigger. U9 pin 6 goes "low" generating a Non- Maskable Interrupt (NMI) at the processor. This causes the processor to execute a subroutine which initializes the I/O interfaces. If the STOP key is depressed at the same time, BASIC flags are initialized. U1 also controls the joystick. Parallel port A accepts inputs from the B joystick connected to control port 2. Parallel port B accepts inputs from the A joystick connected to control port 1. When the joystick is moved up, down, left, right, or the fire button is depressed, a ground potential is applied to the appropriate input of U1. A Variable resistor is connected to adjusting knob on the paddle. When the knob is rotated, the resistance varies controlling the time constant of an RC network. The Voltage developed across the capacitor is input to an A/D converter internal to the SID chip U18. The digital output is stored in one of the SID registers. The paddle position can be determined by the reading the contents of the appropriate register. U28 is a 4066 CMOS switch. The signals from the paddles are passed to the SID chip when the Enable inputs (E0 - E3) of U28 are "high".

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    AC current Detector schematic
    Low loss brightness control
    Pseudo-Random Bit Sequence Generator Circuit
    Handy Pen Torch circuit
    Timer circuit
    Power Supplies
    Quiz Circuit