Capacitive touch integration with android

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Capacitive touch integration with Android - Flow & Trap

Introduction

Today more and more different fields are adopting touch screen or touch panels for application with human/machinery or human/computer interfaces. There are two types of touch panels are popular now a days.

Resistive touch is simple, cheaper and easy to integrate. However with this touch level of calibration is required to be in place. There are various calibration algorithms available which can be use for this purpose.

Capacitive touch on other side has multi touch support and less prone to dust particle. Most capacitive touch controller has capability to support multiple configuration (x & y axis). According to configuration set for the touch one has to scale the inputs received from touch to the area of LCD. Kindly refer below figure.

Capacitive-scaling.png

As mentioned in above figure if touch screen having the same resolution as LCD on which it is mounted on then there is no question of scaling, but calibration might require to remove mechanical alignment error if introduce while mounting.

But as seen in second figure, where touch resolution is different than that of LCD’s. In such case every inputs coming from touch panel/screen has to be scaled or mapped to LCD’s visible resolution.

During integration phase, came across the problem - even after getting scaled input from touch driver, android screen does not show correct behavior. Very first thing of suspect is calibration issue, but after debugging and looking at the co-ordinate’s values from touch driver, found that values are getting re-scaled again at somewhere. To understand the cause; this document will briefly highlight on - input flow with respect to kernel and android interface and give solution for problem statement.

Touch Event Flow in brief

Below diagram explains top to bottom flow of touch event. Diagram has taken from the link {http://cjix.info/blog/misc/internal-input-event-handling-in-the-linux-kernel-and-the-android-userspace}.

Android-input-flow.png

Where does android do scaling?

Linux driver reports x and y axis’s information to input subsystem

Linux-driver-input.png

Android’s input layer read axis’s information

Android-reads-input.png

Android’s input layer scale co-ordinates before dispatch to window manager

Android-pass-input-to-windowmanager.png

Problem Statement

At time it happens that

In both case mentioned above, android layer has to be aware of this or else it will proceed with scaling based on axis information.

Solution:

To avoid mentioned problem, driver has to report axis’s information based on behavior. Ex. If driver configures touch screen to get 800x480 inputs for LCD 800x480 ( on which it is mounted on), then in probe function it has to be changed to 800x480 instead of maximum value. Or else put the value that has been defined in board file.

Capacitive-touch-androidintegrartion-flow.png

References

Technical Support and Product Updates

For further information or to report any problems, contact http://e2e.ti.com/android or http://support.ti.com.
For community support join http://groups.google.com/group/rowboat
For IRC #rowboat on irc.freenode.net

E2e.jpg For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Capacitive touch integration with android here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox