Writing drivers for common touch screen interface hardware

Not rated 13,730

Circuit Image

Touch screens are increasingly popular, yet many developers have never designed one. This guide provides a step-by-step approach to the necessary hardware and software for successful touch screen implementation. Touch screens are ubiquitous in industrial control systems, consumer electronics, and medical devices. They are used daily for various tasks, such as withdrawing cash from ATMs, signing for packages, checking in for flights, or searching for phone numbers. This article highlights two new CPU options that offer built-in support for touch screen input. It will also demonstrate how to create a software driver that configures, calibrates, and continuously responds to touch screen input using these microprocessors. The provided code can serve as a foundation for further development. While touch screens offer unique advantages, they may not be suitable for every application. The pros include their appealing nature and intuitive use; users simply touch what they want. However, touch screens may not be ideal for safety-critical devices due to potential issues like parallax, which is the discrepancy between the perceived and actual position of an object on the screen. This phenomenon is particularly evident in drive-up ATMs, where viewing angles can lead to misalignment between touch input and displayed options. Designing for touch screens requires consideration of such factors to ensure user safety and functionality.

Touch screens have become an integral component in various electronic devices, necessitating a comprehensive understanding of both hardware and software design principles. The construction of a touch screen system typically involves several key components, including the touch sensor, display interface, microprocessor, and the software driver that enables communication between the hardware and the user interface.

The touch sensor can be resistive, capacitive, or based on other technologies, each offering distinct advantages and limitations. Resistive touch screens operate by detecting pressure applied to the screen, while capacitive screens rely on the electrical properties of the human body to detect touch. The choice of sensor technology should align with the intended application and user interaction requirements.

The display interface must be compatible with the chosen microprocessor, which is often a dedicated CPU or microcontroller with integrated support for touch input. The microprocessor must have sufficient processing power and memory to handle real-time touch data and execute the software driver efficiently.

The software driver is crucial for configuring the touch screen and ensuring accurate touch detection. It involves calibrating the touch input to account for factors like parallax and user-specific adjustments. The driver must continuously process touch events, translating them into actionable commands for the application, thus providing a seamless user experience.

In addition to the core functionality, safety considerations are paramount, especially in applications involving critical operations. The design must incorporate safety features, such as oversized touch targets and visual feedback, to minimize the risk of user error. Moreover, thorough testing is essential to identify any potential issues related to touch accuracy and responsiveness.

When implementing a touch screen in a device, it is also important to consider environmental factors, such as lighting conditions and the physical placement of the device. These variables can significantly impact the usability and effectiveness of the touch interface.

In summary, designing a touch screen system requires a multifaceted approach that encompasses hardware selection, microprocessor integration, software development, and rigorous safety protocols. By adhering to these principles, developers can create effective touch screen solutions that enhance user interaction across a wide range of applications.Although touch screens are rapidly becoming more popular most developers have never created one before. Here is a step by step design guide that leads you through the hardware and software required to make touch screens work the first time.

Touch screens are everywhere. Industrial control systems, consumer electronics, and even medical devices are commonly equipped with touch-screen input. We use touch screens every day without even thinking about it. You might get cash at your ATM, sign for a package, check in for your flight, or look up a telephone number all by using a touch screen. This article describes two relatively new CPU offerings that provide built-in support for touch-screen input.

I`ll show you how to write a software driver that will configure, calibrate, and continuously respond to touch-screen input using either of these microprocessors. The result will be working code that you`re free to download and use as a baseline for your own efforts.

No input method is ideal for all situations, and touch screens are not a good fit in certain applications and product types. I`d be remiss if I didn`t at least summarize the good and not-so-good factors associated with using a touch screen as a user-input method.

First, the good: touch screens have an undeniable coolness factor and can instantly make a product more enjoyable to use. Touch screens are also intuitive. When your user wants Option A, he reaches out and touches Option A. What could be more intuitive than that A two-year-old knows how to reach out and touch what he or she wants.

Finally, touch screens are attached to the system for which they provide input. The user can`t misplace the remote or the mouse. If he has the device in front of him, he has the touch screen ready to start providing input. The bad Touch screens can also be misused and applied to products where they really don`t belong. I`m referring here to safety-critical devices, where a touch screen can be dangerous if used without appropriate precautions. I`ll summarize a couple of the most obvious potential problems and leave you to the references to learn more.

The first problem is parallax, which is the difference between the apparent position of an object on the screen and its actual active position on the touch panel. This problem is illustrated in Figure 1. The best example I can think of is the typical drive-up ATM. The machine doesn`t raise and lower itself based on the height of your car, so if you pull up in a tall SUV or truck you`ll likely be looking down at the display from an elevated position.

ATMs are designed to protect the expensive parts (the display) from hostile users by placing layers of strengthened glass between the user and the display. The touch screen cannot be so protected. If it were, you would not be able to touch it, would you So the touch screen sits right on the surface, and the display some layers of glass behind the surface.

This creates a physical separation between the touch layer and the display layer. If you`re looking at the screen at any angle, this means that where you press the touch screen to make a selection may be physically quite a distance from the input location expected by the user interface software. Humans adapt to this offset fairly quickly. You learn to mentally project the displayed information to the surface of the touch screen and touch the correct location after a little trial and error.

ATM designers also account for this by using large buttons and separating them liberally to help prevent accidental activation of the wrong button. Of course, mistakenly pressing the wrong ATM button won`t give you cancer or cause you to go blind. A mistake like this on a medical control device could certainly do either if the system designer doesn`t build in extensive safety precautions.

Parallax is minimized by reducing the physical distance between the display and the touch layers. There will alw 🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713