
Using USB Connectivity to Integrate Touch Screens in Computing Applications
by
Chris Bartik
The recent launch of Apple s iPad spawned a new product category: the tablet. Touch screen support has become the default human interface as tablets focus on ease of use and keyboardless design. Meanwhile, Microsoft has added touch screen support at the foundation of its Windows 7 architecture. Credit Suisse estimates more than 33 million units of large touch screen products will be sold in 2011, mainly due to these two driving forces: the growing popularity of tablets and Windows 7 support for touch screen technology.
Most touch screen systems will connect with the host CPU or application processor through a universal serial bus (USB) interface. However, none of today s major touch screen controllers support USB natively. As a result, touch screen system integrators must bridge a USB microcontroller (MCU) between the host and the touch controller(s). Once an MCU is selected, developers must write the firmware code to establish the communication between the host and
the MCU to support the touch screen application. Adopting a USB MCU that includes preprogrammed touch screen support can greatly simplify this firmware development task and shorten time to market.
Fortunately, touch screen system integrators have yet another alternative to developing USB expertise or acquiring third party USB software: integrate a ready made USB bridge silicon/software solution that requires no USB expertise on the part of the developer.
Human Interface Device (HID) Overview
According to the USB Implementers Forum, the USB communications architecture is designed to enable computing devices such as desktop PCs and laptops to interconnect with many other peripheral devices. A USB uses a two wire serial communications link running at one of three different speeds: 1.5 megabits per second (low speed), 12 Mbps (full speed) and 480 Mbps
(high speed). USB devices are categorized into various device classes such as display, communication, audio, mass storage and human interface.
The Human Interface Device (HID) Class defines common behaviors and functions for touch screen interfaces. The HID class includes peripherals such as keyboards, mice, trackballs, joysticks, touch pads and touch screens that enable end users to control and interact with the computing system. HID also includes provisions for output directed to the end user.
The control pipe typically handles enumeration and device configuration while the interrupt pipe is used for data transfer. Descriptors define a USB device to the host regarding the type of device, the device manufacturer, USB1.x or 2.0 or 3.0 support, device configuration, endpoints quantities and types, etc.
A HID report is used to transmit HID control data to and from an HID Class device. A report descriptor defines the report format. Input and output reports specify control data and feature reports specifying configuration data. When more than one report of the same type is required for a particular device, each report receives a unique report ID. Input and output reports specify
HID control data. Input controls include data relevant to an application such as the coordinates of a finger. Output controls are a sink for application data such as lighting up a display or activating a touch sensor. A feature report specifies configuration information for a particular device. A user mode application can obtain feature information by using this report designation.
The HID enumeration requires the device to send an HID descriptor, which contains information about all of the data and its formats. Report descriptors sent to the host determine the report format. All reports are preceded by a report ID, which describes how the host and the device identify the particular report and how data is parsed between multiple reports. Each bit in the
report is specified by report size and report count identifiers. For example, a report size of one and a report count of two identify two bits. This example could be the definition of a set of finger touches. To send a complete byte, the report size would be set to eight bits. Formatting the data into reports helps to organize the data in terms of data widths so that the host and end devices know how to parse the data.
USB Touch Screen Bridge Solution
The CP2501 device is a touch screen USB bridge that can be used to connect the touch screen controller with the host CPU. The CP2501 incorporates a high performance MCU with a 48 MIPS 8051 compatible core, 53 kB of user programmable flash memory and 3.5 kB of RAM. Unlike other USB MCU devices in the market, the CP2501 features pre programmed USB touch
interface firmware, which greatly simplifies USB touch screen product development. The Windows 7 touch interface compliant CP2501 device works seamlessly with the Windows digitizer class driver for touch screens and is supported by Silicon Labs GUI based configuration
wizard. This deployment tool enables developers to easily and quickly connect their touch controller to a USB system without having to develop customized USB firmware, thus reducing time to market as well as the level of expertise required for USB interface development.
The CP2501 device features a USB 2.0 compliant, full speed USB controller with an integrated full speed transceiver and on chip matching and pull up resistors. The integrated USB controller manages all data transfers on the USB bus, as well as command requests generated by the USB
host controller. The user firmware uses the interface provided by the system firmware to initialize and communicate using the USB protocol. The CP2501 device also includes a USB bootloader to easily update user firmware. User code is required to enable the interface API to initialize the USB interface and send touch data to the host PC.
The CP2501 device supports three different serial interfaces for communicating with various touch screen controllers. The interface choice can be selected through the CP250x configuration wizard. The CP2501 device s UART interface consists of the UART_TX (transmit) and UART_RX (receive) data signals and is programmable to support a wide range of data formats and baud rates. The SPI protocol provides access to a flexible, full duplex synchronous serial bus. SPI operates as a master device in 4 wire mode. The optional slave select signal can be left floating when connecting to a 3 wire SPI device. Additional GPIO pins can be used to select multiple slave devices in master mode. The CP2501 device s SPI interface consists of the SPI_SCLK (clock), SPI_MOSI (master out), SPI_MISO (master in) and SPI_NSS (slave select) signals
and is programmable to support a wide range of clock speeds and configurations.
The CP2501 features a two wire, bi directional serial system management bus (SMBus) that complies with the System Management Bus Specification, version 1.1, and is compatible with the I2C serial bus. Reads and writes to the interface are byte oriented, with the SMBus interface autonomously controlling the serial data transfer. Clock low duration can be extended to accommodate devices with different speed capabilities on the same bus. The SMBus interface
consists of the SMBus_SCL (serial clock) and SMBus_SDA (serial data out) signals and is programmable to support a wide range of clock speeds.
The configuration wizard output represents a complete project that allows the developer to add the code needed to communicate with the touch screen. All initializations for the chosen serial interface as well as the USB descriptor generation and initialization are complete. The developer simply makes calls to the system firmware API to bridge data. Having all of the low level USB functionality complete and working drastically reduces the time and effort of USB development. Without any additional modifications, the project generated by the configuration wizard will enumerate properly on a Windows machine. The device appears in the device manager as an HID device. In Windows Vista and Windows 7, the computer properties will show that a single touch or multi touch device is connected.
Summary
The CP2501 controller provides touch screen system integrators with a simple and easy to use USB bridge solution. This highly integrated, HID Class compliant solution reduces development time and cost and eases the frustration of implementing a USB interface from scratch. The addition of the developer accessible MCU core, on chip memory and other resources enables
the touch screen developer to offload performance enhancing or operating system compliance algorithms from the touch controllers and/or the host system itself. Ultimately, the CP2501 controller helps liberate touch screen system integrators from mundane but necessary communication software development, enabling them to focus their time and resources on
what they do best: developing intuitive, user friendly touch screen interfaces.
To know more about
Automotive Microcontroller
and
8051 microcontroller
check out SiliconLabs websitewww.silabs.com
Article Source:
ArticleRich.com