January 1999 USB100 Programmable Low-Cost USB Machine (PLUM) Single Chip Controller for Mouse, Trackball, Joystick and Gamepad Applications General Description Features The USB100 is a Low cost, fully customizable controller for USB HID-class pointing devices. It is in full compliance with REV 1.0 of the USB standard and implements the HID class specification for mice, trackballs, joysticks and gamepads. This device interprets the commands specified in the HID class document and provides appropriate responses from an On-Chip EEPROM. It also provides ability to customize the device according to individual needs of the designers. Programming utilities supplied with this device allow HID manufacturers to easily create the necessary data to be programmed into the device. USB 1.0 standard compliant Has the necessary on-chip transceivers Support for 2D and 3D mice with 2, 3 or more buttons Supports 3 potentiometer mechanisms for joysticks Up to 16 buttons for digital gamepads Choice of 18-pin and 24-pin packages Choice of 2Kbit and 4Kbit EEPROM densities The device includes the necessary transceiver for USB operation and meets all of the active and standby current specifications for a bus-powered device. Block Diagram POWER USB COMMAND PROCESSOR (HID) TX-FIFO SERIAL INTERFACE ENGINE X C V R USB CABLE (D+, D-, POWER & GROUND) RX-FIFO STATE MACHINE EEPROM UP TO 3 ROLLER/ POTENTIOMETER MECHANISMS UP TO 16 BUTTONS Use "A Diagram Number" Style Sheet" USB100 rev.D (c) 1999 Fairchild Semiconductor Corporation 1 www.fairchildsemi.com USB100 Programmable Low-Cost USB Machine (PLUM) PRELIMINARY 24 Pin Package OSC1 OSC2 H4 B8/F RESET H3 H1 H2 V1 V2 O2 GND 18 Pin 3D Package OSC2 H4 F RESET H3 H1 H2 V1 V2 VDD B6 USBD+ USBDGND B7 B5 B1 B2 B3 B4 O1 OSC1 VDD USBD+ USBDGND B1 B2 B3 O1 Pin Description Pin Type Description H4 I Roller/Button/Joystick input. H3 I Roller/Button/Joystick input. O2 I/O OSC1 I Crystal input number 1. Register output pin / Button input. OSC2 I Crystal input number 2 B4 I Button input Reset I Active high reset pin H1 I Roller/Button/Joystick input. H2 I Roller/Button/Joystick input. V1 I Roller/Button/Joystick input. V2 I Roller/Button/Joystick input. GND I Ground B7 I Button input B6 I Button input B5 I Button input VDD I Positive power supply USBD+ O USB D + line USBD- O USB D - line GND I Ground B8/F I/O B1/CS I Button input / LED driver Button input and chip select to internal EEPROM.* B2/SK I Button input and system clock to internal EEPROM.* B3/DI I Button input and data in to internal EEPROM.* O1/DO O Button input and data out to read from internal EEPROM.* * See Programming internal EEPROM section USB100 rev.D 2 www.fairchildsemi.com USB100 Programmable Low-Cost USB Machine (PLUM) Pinout Operating Conditions Ambient Storage Temperatures -65C to + 150C Ambient Operating Temperature All Input or Output Voltages with respect to ground VCC + 1 to - 0.3V Power Supply (VCC) Range Lead Temperature (Soldering, 10 seconds) +300% ESD Rating 2000V 0C to +70C 4.4V to 5.5V DC and AC Electrical Characteristics 4.4V VCC 5.5V Symbol Parameter Conditions Min Max Units ICCA Operating Current USB interface in active mode 40 mA ICCS Standby Current USB interface in suspend 500 A VIL Input Low Voltage VIH Input High Voltage VOL Output Low Voltage VOH Output High Voltage 0.8 2 V V 0.4 2.4 V V IIL Input Leakage Current 2.5 A IOL Output Leakage Current 2.5 A 1 MHz FSK SK Clock Frequency TSKH SK High Time Note 3 250 0 ns TSKL SK Low Time 250 ns TCS Minimum CS Low Time 250 ns TCSS CS Setup Time 50 ns TDH DO Hold Time 70 ns Note 4 TDIS DI Setup Time 100 ns TCSH CS Hold Time 0 ns TDIH DI Hold Time 20 ns TPD1 Output Delay to "1" 500 ns TPD0 Output Delay to "0" 500 ns TSY CS to Status Valid 500 ns TDF CS to DO in TRI-STATE 100 ns TWP Write Cycle Time 10 ms AC Test Conditions Output Load Input Pulse Levels Timing Measurements Reference Level 1 TTL Gate Input 0.4V and 2.4V Output 1V and 2V 0.8V and 2.0V Note 1: Stress ratings above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and operation of the device at these or any other conditions above those indicated in the operational sections of the specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Note 2: The shortest allowable S clock period = 1/fSK (as shown under the fSK parameter). Maximum SK clock speed (minimum SK period) is determined by the interaction of several AC parameters stated in the datasheet. Within this SK period, both tSKH and tSKL limits must be observed. Therefore, it is not allowable to set 1/fSK = tSKH(minimum) + tSKL(minimum) for shorter SK cycle time operation. Note 3: CS (Chip Select) must be brought low (to VIL) for an interval of tCS in order to reset all internal device registers (device reset) prior to beginning another opcode cycle. (This is shown in the opcode diagrams in the following pages.) USB100 rev.D 3 www.fairchildsemi.com USB100 Programmable Low-Cost USB Machine (PLUM) Absolute Maximum Ratings O1, O2 Functionality. ICB register 1[3:2] H1, H2, H3, H4, V1, V2 (Roller/Joystick inputs) IOM[1:0] Function When configured as roller inputs these pins function in pairs, H1 and H2, H3 and H4, V1 and V2 to allow photo diodes to be attached in a mouse or trackball application. See the section "Roller Movement Reporting" for a more detailed description. When configured for a joystick only one of the inputs pairs is used. A potentiometer is attached to track the movements of a joystick lever. When these inputs are configured as buttons they all act independently as active low button inputs. All of them have internal pull-ups and debounce circuitry which can be programmed using the ICB registers. These inputs also contain current sink features so no external resistor is needed to sink current from the photo diode. 00 Both O1 and O2 function as programmable outputs. 01 O1 is a programmable output but O2 is a standard button input. 11 Both O1 and O2 are standard inputs. In case these are selected as outputs, their state (1 or 0) can be set using the USB set_report command. These outputs are opencollector. A typical use of these outputs is using them to drive LEDs (for example, a drag-lock function in a trackball). These pins have a programmable current sink capability. B1, B2, B3, B4, B5, B6, B7, B8/F (Button inputs) B8/F The button inputs to the USB100 have internal pull up resistors, with active low inputs to the chip. These inputs also contain debounce circuitry which can be programmed by the ICB registers. When this pin is configured as an input it will behave as a standard button input. But if the pin is disabled in the ICB registers then this pin can be used to control the roller LEDS in powersave mode. Using the B8/F pin to control the LEDs Key Debounce Select Table (ICB register3[3:2]) VDD KD[1:0] 00 15 ms 01 30 ms 10 45 ms 11 60 ms USB100 F USBD -, USBD + This allows the LEDs to be shut off during powersave mode which allows the USB100 to draw very little current. The official name for powersave mode on a USB device is known as suspend mode which is discussed in the section labeled Suspend Mode Operation. These inputs are the serial bus lines which USB data is communicated. These bi - directional lines connect to the host, through a USB type A or type B connector, and are used to communicate all USB information to and from the host. The two lines must both be wired through a 27 ohm resistor before being attached to the USB connector. See Recommended Configuration for a detailed diagram. OSC1, OSC2 These two pins are the clock inputs into the USB100. The speed at which the chip runs at is 6MHz. The clock sign can be generated two ways. The first is to use a parallel resonant, fundamental mode crystal circuit or a ceramic resonator circuit connected to the OSC1 and OSC2 inputs. The other method is to use a crystal oscillator connected to the OSC2 input and leaving the OSC1 input unconnected Reset This pin is used to reset the entire chip. It must be held high for more than 10ns, to reset the chip and then brought low for the reset of normal chip operation. O1, O2 USB modes of operation These two pins are wired to internal registers which can be programmed with either a "1" or a "0" by a USB request. If this command is sent to the USB100. INSERT COMMAND FROM INSPECTOR. Then the O1 and O2 pins will be programmed with the values that are in the second data package. These two pins can also be configured as standard button inputs by one of the ICB registers. USB100 rev.D The USB100 loads up its configuration from the EEPROM on power-on reset, or when a USB reset command is issued. Upon completion of reset, the device is in a operational mode, and responds correctly to the various commands described in the USB spec rev 1.0. The USB100 supports two endpoints - the default endpoint (endpoint 0) and the interrupt endpoint (endpoint 1). The supported packet size on both endpoints is 8 bytes. The endpoint 1 is an "IN" endpoint. 4 www.fairchildsemi.com USB100 Programmable Low-Cost USB Machine (PLUM) Interface Pin Descriptions IS[3:0] Current The USB100 supports all of the required standard requests. These requests are sent to the device using control transfers to endpoint 0. 0000 0.1 mA 0001 0.2 mA In USB terminology, the data transmitted by the mouse when movement is detected is called a report. The reports are generated by the USB100 device in accordance to the USB HID spec 1.0 Final. 0010 0.3 mA 0011 0.4 mA 0100 0.5 mA Programming the EEPROM 0101 0.6 mA 0110 0.7 mA 0111 0.8 mA 1000 0.9mA 1001 1.0mA The on-chip EEPROM can be programmed in a special mode which defines some of the button inputs/output as a microwire port.. In this mode, these inputs behave as a conventional Microwire serial port. Data can be easily programmed and verified, by executing simple EEPROM programming commands. Initial Configuration Bytes (ICB) register description Input Pin Configuration Byte 0 (ICB0) (Address 1) The first five bytes in the EEPROM are used to configure the physical characteristics of the USB100 device, and are called the Initial configuration Byte registers. Some of the bits in these registers are reserved, and are referred to as RFU (reserved for future use) in the following section. D6 D5 D4 IS3 IS2 IS1 IS0 D3 D2 IOM1 IOM0 D6 D5 D4 D3 D2 D1 D0 B8 B7 B6 B5 B4 B3 B2 B1 B[7:0]: Input Pin Report Generator. A `1' causes this bit to be reported in the corresponding report generated when the device is polled for the status. The device accepts only the following bit patterns as valid. B[7:0] control the functionality for pin inputs B[8:1] respectively. Roller Configuration Byte (Address 0) D7 D7 D1 D0 00000000 R1 R0 00000001 R[1:0]: No of roller pairs. This pair of bits configure the functionality of the three roller pair inputs -