Linux driver touch screen (1)

Source: Internet
Author: User

1. Hardware principles

1.1 Overview

We often use two types of touch screens: resistive touch screen and capacitive touch screen. They differ greatly in hardware and are relatively less in driver implementation. The capacitive touch screen supports multi-point touch screen, which provides a better user experience. The following describes the hardware principles used by the touch screen.

 

1.2adc Conversion

The ad ing function is to convert time-continuous and amplitude-continuous analog data into time-discrete and amplitude-discrete digital signals.

 

1.3 resistive touch screen

L in simple terms, the resistive touch screen is a sensor that converts the physical location of the touch point (x, y) in the rectangular area to the voltage representing the X and Y coordinates.

L the touch screen contains two transparent layer Blocking Materials stacked up and down, separated by an elastic material in the middle. When the touch screen surface is under pressure, the top and bottom layers are touched. The resistive touch screen used uses a voltage divider to generate a voltage that represents the X and Y coordinates. As shown in, the divider is achieved by concatenating two resistors. The above resistance R1 is connected with the reference voltage vref, and the following resistance R2 is grounded. The voltage value at the connection point of a resistor is proportional to the resistance value of the resistor below.

 

L four-wire Touch Screen

The four-wire touch screen contains two resistance layers. One layer has a vertical bus on the left and right sides of the screen, and the other layer has a horizontal bus on the bottom and top of the screen. See. For Measurement on the X axis, bias the left bus to 0 V and the right bus to vref. Connect the top or bottom bus to the ADC and perform a measurement when the top and bottom layers are in contact.

To make a measurement in the Y axis, bias the top bus to vref and the bottom bus to 0 V. Connect the ADC input to the left or right bus. When the top layer is in contact with the bottom layer, the voltage can be measured. The simplified model of the 4-wire touch screen in Two-layer contact mode is displayed.

The principles of the five, seven, and eight lines are roughly the same.

 

1.4 capacitive touch screen


L generally, the self-contained capacitive touch screen mainly includes a glass layer, an ITO layer with two layers in the middle (no transient connection between the row and column layers), and a Gnd underlying layer. Each row and column are directly connected to the MCU's acquisition input channel. When the finger is touched to the glass layer on the surface of the capacitive screen, the local capacitive value of the ito block in one row or column increases, the capacitive sampling and specific algorithms are used to determine the position (x, y) of the point (touch point) where the capacitive value changes ), finally, upload the location of the touch point to the main processor for system operation.

 

1.5 touch screen Workflow

L S3C2440 touch screen function module

L Workflow

1. Select XY Coordinate Conversion Mode (Independent/Continuous Conversion)

2. Set the touch screen to the waiting status

3. If an interruption occurs, start the ADC conversion (the obtained coordinate values are stored in the corresponding registers)

4. Obtain the XY coordinate and return to step 2.

It is worth noting that there are two interruptions. int_tc occurs when you click the touch screen and int_adc occurs when the analog-to-analog conversion is complete.

 

References:

Capacitive touch: http://hi.baidu.com/qingliu8885/blog/item/f2d5156055fbff4ceaf8f8a6.html

Http://www.dpj365.com/article/mcu/20110426-488.html

Resistive touch screen: http://blog.21ic.com/user1/349/archives/2007/36713.html

Conversion Mode: http://blog.csdn.net/gzliu_hit/article/details/6680935

S3C2440 Datasheet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.