1. DEFINITION 1.1 GENERAL DESCRIPTION The 5717 is a custom CMOS mouse controller for the Commodore 64. It will be housed in the body of a two button mouse, enabling it to be plugged into the 64 joystick port and provide mouse control of GEOS software,etc. It achieves the mouse function by grounding the SID chip's POTX and POTY lines at various times in the SID 512uS cycle to provide the 64 with positional information. 1.2 PIN CONFIGURATION 1. X_QUAD0 INPUT FROM FIRST X DIRECTION PHOTOTRANSISTOR 2. X_QUAD1 INPUT FROM SECOND X DIRECTION PHOTOTRANSISTOR 3. Y_QUAD0 INPUT FROM FIRST Y DIRECTION PHOTOTRANSISTOR 4. Y_QUAD1 INPUT FROM SECOND Y DIRECTION PHOTOTRANSISTOR 5. MBUT INPUT FROM RIGHTMOST MOUSE BUTTON 6. SYNC SYNCCHRONIZATION INPUT FROM SID POTY LINE 7. OSCI INPUT FROM 4MHZ CRYSTAL 8. OSC OUTPUT TO 4MHZ CRYSTAL 9. GND GROUND PIN 10. RESET RESET INPUT, ACTIVE LOW 11. TEST TEST INPUT, DISABLES OSCILLATOR DIVIDER 12. POT_Y OUTPUT TO SID, DECODES Y DIRECTION MOVEMENT 13. POT_X OUTPUT TO SID, DECODES X DIRECTION MOVEMENT 14. J_LEFT OUTPUT TO SID, LEFT JOYSTICK INPUT 15. J_RIGHT OUTPUT TO SID, RIGHT JOYSTICK INPUT 16. J_DOWN OUTPUT TO SID, DOWN JOYSTICK INPUT 17. J_UP OUTPUT TO SID, UP JOYSTICK INPUT 18. VDD +5V POWER PIN 2. FUNCTIONAL DESCRIPTION 2.1 OPERATING MODES AND MODE INITIALIZATION The 5717 supports two different modes of operation:mouse mode and joystick mode. In mouse mode the 4 quadrant inputs are decoded causing the six bit x and y up/down counters to be updated. When the contents of these counters coincide with the SID cycle counter the POTX and POTY outputs are pulled high and remain high until the SID cycle has ended (falling edge of SYNC). The state of the MBUT input will be reflected in the J_UP output(MBUT low -> J_UP low,MBUT high -> J_UP floating). In joystick mode the 5717 enables the mouse to act like a joystick. As in mouse mode the 4 quadrant inputs are decoded to determine movement and direction. The overflow of the SID cycle counter is used to increment the x and y counters until a count of 40 is reached at which time they stop. If during the 40 SID cycles movement is detected the corresponding x or y counter is reset and the corresponding joystick output is held low. If on the other hand no movement is detected during the 40 cycles then a count of 40 is reached and all 4 joystick outputs are disabled(floating). The operating mode of the 5717 is determined during power up. If the MBUT input is held low when reset goes away(rising edge of RESET) then joystick mode is selected, otherwise mouse mode is selected. For test purposes this function is implemented with a transparent latch so that when reset is held low MBUT selects the mode directly. 2.2 TEST FEATURES In normal operation the crystal oscillator runs at 4mhz which is divided down to 1mhz inside the chip. For test purposes this divider can be bypassed by taking the test input high and the OSCI input drives the 5717 logic directly, thereby saving test cycles. 3. ELECTRICAL REQUIREMENTS 3.1 ABSOLUTE MAXIMUM RATINGS Stresses above those listed may cause permanent damage to the circuit. Functional operation of the device at these or any conditions other than those indicated in the operating conditions of this specification is not implied. Exposure to the maximum ratings for extended periods may adversely affect device reliability. characteristic min max units -------------- ----- ----- ------- 3.1.1 ambient temperature under bias -40 +85 deg. C 3.1.2 storage temperature -50 +150 deg. C 3.1.3 applied supply voltage -0.3 +7.0 volts 3.1.4 applied output voltage -0.3 VDD+0.3 volts 3.1.5 applied input voltage -0.3 VDD+0.3 volts 3.1.6 power dissipation - 0.3 watts 3.2 OPERATING CONDITIONS All electrical characteristics are specified over the entire range of the operating conditions unless specifically noted. All voltages are referenced to VSS = 0.0V. characteristic min max units -------------- ----- ----- ------- 3.2.1 supply voltage (VDD) 4.5 5.5 volts 3.2.2 free air temperature 0 +85 deg. C 3.3 DC CHARACTERISTICS characteristic min max units conditions -------------- ----- ----- ----- ---------- 3.3.1 input high level(TEST) 2.0 VDD+0.3 volts - 3.3.2 input low level(TEST) -0.3 0.8 volts - 3.3.3 input high level(OSCI) .7*VDD VDD+0.3 volts - 3.3.4 input low level(OSCI) -0.3 .3*VDD volts - 3.3.5 input high level(X_QUAD0, .8*VDD VDD+0.3 volts - X_QUAD1,Y_QUAD0,Y_QUAD1, MBUT,SYNC,RESET) 3.3.6 input low level(X_QUAD0, -0.3 .2*VDD volts - X_QUAD1,Y_QUAD0,Y_QUAD1, MBUT,SYNC,RESET) 3.3.7 input hysteresis(X_QUAD0, 1.0 - volts - X_QUAD1,Y_QUAD0,Y_QUAD1, MBUT,SYNC,RESET) 3.3.8 input leakage(all inputs -1.0 +1.0 uA 0V