Specifications

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

Summary of content (25 pages)