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

    Regulator L200 schematics
    Pulse-position-modulator
    noise LM386 audio amplifier not amplifying
    A Smart Barn Door Drive for Astrophotography
    Monostable multivibrators
    lf365 A digital thermometer or talk I2C to your atmel microcontroller
    Piezoelectric Sound
    THE ZX97LITE SCHEMATIC
    Portable hypoxia monitoring circuit ICL7660 PC254A PC153A
    Length 1 minute delay relay pull transistor circuit diagram



    Top