Cypress Semiconductor CY7C63413C Especificações Página 1

Consulte online ou descarregue Especificações para Teclados Cypress Semiconductor CY7C63413C. Cypress Semiconductor CY7C63413C Specifications Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 25
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Designing a Dual-Interface Keyboard with the Cypress
Semiconductor CY7C63413 USB Microcontroller
Revision 1.3 02/13/99
Added 3D mouse documentation and endpoint 2 boot protocol description
Revision 1.2 11/09/98
Added power management documentation
Revision 1.1 10/29/98
Added slave mouse documentation
Introduction
The PS/2 auxiliary device interface is an established standard in the personal computer industry. It is used for the
attachment of peripherals to the computer such as a keyboard, mouse, joystick, etc. In recent years, the Universal Serial
Bus (USB) standard has been developed in an attempt to address the shortcomings of PS/2 and other common desktop
computer electrical interfaces, including limited bandwidth, data integrity and the limitation of a single slave device per port.
USB addresses bandwidth limitations by offering 1.5Mbit (low speed) and 12Mbit (full speed) serial data transfer rates. USB
provides several levels of data integrity validation, including cyclic redundancy code (CRC) checking, and defines procedures
for failed-transfer recovery. In addition, the USB architecture provides for the connection of up to 127 devices on a single
root hub. While the USB standard has been embraced by the computer industry, and is now included by default on most
desktop motherboards produced for sale, there remains a large installed base of computers and operating system software
which do not yet support USB. This application note address the design of a keyboard that supports both the USB and PS/2
interfaces using the Cypress Semiconductor single-chip CY7C63413 USB microcontroller.
This application note starts by addressing the basic requirements for key-scan and other interface-independent keyboard
functionality, followed by an introduction to the CY7C63413 USB controller. A schematic of the Dual-Interface keyboard and
its connection details can be found in the Hardware Implementation Section.
The software section describes the architecture of the firmware required to implement the keyboard function. The source
code of the demonstration keyboard firmware is available with the Cypress CY3651 Development Kit. Please contact your
local Cypress Sales Office for details.
This application note assumes that the reader is reasonably familiar with the CY7C63413 USB controller, the Universal
Serial Bus and the PS/2 device interface. The CY7C63413 data sheet is available from the Cypress web site at
http://www.cypress.com. USB documentation can be found at the USB Implementers Forum web site at http://www.usb.org/.
Information regarding the PS/2 keyboard interface can be found in IBM publication 84F9735, IBM Personal System/2
Hardware Technical Reference – Common Interfaces, which may be purchased directly from IBM.
Keyboard Basics
Key Switches and Scan Matrix
A computer keyboard typically has between 101 and 104 keys that are uniquely positioned in a scan matrix. The scan matrix
consists of M rows and N columns, all of which are electrically isolated from each other. The number of rows (M) is typically
no greater than 8, and the number of columns (N) is no greater than 20. Each key sits over two isolated contacts of its
corresponding row and column in the scan matrix. When a key is pressed, the two contacts are shorted together, and the
row and column of the key are electrically connected (Figure 1).
1 Key Switch
Vista de página 0
1 2 3 4 5 6 ... 24 25

Resumo do Conteúdo

Página 1

Designing a Dual-Interface Keyboard with the CypressSemiconductor CY7C63413 USB MicrocontrollerRevision 1.3 02/13/99Added 3D mouse documentation and e

Página 2 - Ω), open drain outputs (high

Bit 7 Bit 0RightGUIRightAltRightShiftRightCtrlLeftGUILeft AltLeftShiftLeftCtrlByte 0-ModifierFigure 2. IN Data Organization for USB KeyboardBit 7 Bit

Página 3 - Port 3, Bit 7

Configuration DescriptorThe configuration descriptor is 9 bytes in length and gives the configuration information for the device. It is possible to ha

Página 4 - Hardware Implementation

Endpoint DescriptorThe endpoint descriptor describes each endpoint, including the attributes and the address of each endpoint. It is possible tohave m

Página 5 - Column j

found in the example called a Usage Page. The reason for the Usage Page is that it is necessary to allow for more than 256possible Usage tags. Usage P

Página 6

N-Key RolloverIn the case where multiple keys are pressed and held down, only the last key pressed should be repeated. To accomplishthis, the last key

Página 7 - Firmware Implementation

usage page (generic desktop)usage (mouse) collection (application) report id (1) usage (pointer) collection (linked) usage page (buttons)

Página 8 - • Enable device address 0

Finally, to support boot protocol, the firmware will not transmit power key status on endpoint 2 when the boot protocol isselected via the host comma

Página 9 - SETUP packet

the clock line (corresponding to D+) low while floating the data line (corresponding to D-), for instance, would beaccomplished with a setting of ‘110

Página 10

FunctionalityMain LoopAfter power-up housekeeping is performed, the main loop of the PS/2 firmware is entered. This loop invokes the keyboardscannin

Página 11

released, is considered to be caused by switch bounces, and is disregarded. Different keyboards will have varying key switchsensitivity, and so these

Página 12

Intelligent ControllerThe typical computer keyboard keyboard contains an embedded controller that performs the necessary functions to scan thekey matr

Página 13

USB Main LoopSUSPEND_FLAG = 1?SCAN_FLAG= 1?Call usb_scan_keysError inscan?New keyfound inscan?Fill EP1 FIFOwith 1’s(RolloverError);Enable EP1transmiss

Página 14

Call idle_loopTransmit “Resend”CommandnyyynnnnnnyyTransmit contents ofTransmit BufferByteReceived?ScanIntervalExpired?ScanningEnabled?Call ps2_scan_ke

Página 15

ps2-receiveReceivedBit = 1?Parity +=1Done 8databits?n get_bitD+ = 0; D- = HI-ZDelay 35 usecD+ = HI-Z; D- = HI-Z1Delay 5 usecGet State of D-Dela

Página 16

ps2_sendD+,D- bothhigh?Wait 50 usec;Call Send_0(Start bit);Parity = 1NextData Bit= 1?CallSend_0CallSend_1;Parity += 1Done 8databits?Parity =Odd?C

Página 17

Set D+,D- to Hi-Z;Disconnect USBPullup ResistorWait 10 ms Wait 2 UsecD+ andD- Low? Wait 2 UsecD+ andD- Low? Wait 2 UsecD+ andD- Low?

Página 18

ConclusionThis Application Note, together with the hardware reference design and reference firmware (available from Cypress) providesa superset of the

Página 19

ConfigurationBitsInterrupt Bit Polarity11 X Resistive -10 0 CMOSOutputdisabled10 1 CMOS Input disabled01 X Open Drain -00 X Open Drain +Ports 0 to 2 o

Página 20

Hardware ImplementationFigure 8 is the schematic for a dual-interface keyboard application. This design may be used to implement a USB-onlykeyboard, a

Página 21

the nominal 5VDC rail. Cypress recommends this termination method as an alternative to the method described in the USBspecification, as it yields comp

Página 23

Firmware ImplementationThe reference firmware supports both the USB and PS/2 interfaces. For each interface, the firmware can be conceptuallydivided i

Página 24

high. A host computer will not typically attempt to transmit data to the keyboard until it has received a power up statusindication from the keyboard.

Página 25 - Conclusion

• Responds toSETUP packetaccording to the parsing structureFigure 2. USB Standard Request Parsing StructureFigure 2. USB HID Class Request Parsin

Comentários a estes Manuais

Sem comentários