Capacitive Screen Drive Technology

Source: Internet
Author: User

Directory

Introduction of an electric capacitive-touchscreen

Two input subsystem

Three MTK CTP software control process

Four MTK platform debugging CTP need to modify the place

I. Introduction of electric capacitive-touchscreen

1, the type of capacitive touch screen mainly have two types: (1) surface capacitance: Surface capacitive use of sensors located in four corners and evenly distribute the entire surface of the film, there is a common ito layer and a metal frame, when a finger touch the screen, from the plate surface of the charge, sensing in the corner of the touch screen is completed, No complex ito pattern required; (2) projected capacitance: Ito with one or more carefully designed, eroded candlesticks, these ito layers form a plurality of horizontal and vertical electrodes through the decay, using a separate chip with row/column interleaving with sensing function. Now the tablet, mobile phone, car and other multi-use projected capacitance, so we analyze the composition of the surface projection capacitor. The axis-coordinate sensing unit matrix of the projected capacitance: the row and column separated by the axis-coordinate sensing unit, and the x-axis slider y-axis slider is implemented with two crossed sliders to detect the capacitance change of each sensing cell. (medium capacitance, actually transparent)

Projected type capacitance:

As shown, the accuracy and resolution of the X, Y axis of the transparent electrode capacitive screen is related to the number of channels on the × and y axes, the more channels, the higher the resolution.

Channel-to-Ito connection condition:

II. Input Subsystem

is input subsystem framework, input subsystem consists of input subsystem core layer (input core), drive layer and event Handler three parts. An input event, such as mouse movement, touch screen press, joystick movement, and so on through input driver, input core, Event handler, userspace arrives at the user space to the application.

The functions of each layer are briefly described: the drive layer is responsible for interacting with the specific hardware devices, and the data collected by the hardware (IIC bus) is obtained. Input core acts as an intermediary to escalate the data, while the event-driven layer provides the escalated data to the upper layer using the file node.

Input device layer Writing essentials:

1. Assigning input device struct Input_dev *input_allocate_device (void)

The Linux multi-Touch protocol defines a series of ABS_MT events that are divided into several categories, allowing only one of them to be applied, and the smallest multi-touch event set should include Abs_mt_touch_major, abs_mt_position_x, and Abs_mt_ Position_y to achieve multi-touch. If the device supports Abs_mt_width_major this event, then this event can provide finger touch contact area size. Information such as the touch direction can be provided by Abs_mt_touch_minor, Abs_mt_width_minor and Abs_mt_orientation. Abs_mt_tool_type provides categories of touch devices, such as hand or pen or other. Finally, some devices may support abs_mt_tracking_id to support hardware tracking of multipoint information, which line the point belongs to.

Below is the INPUT_DEV structure portion of the MTK Code platform capacitance TP fill

1 tpd->dev->name = Tpd_device;

2 Set_bit (Ev_abs, tpd->dev->evbit);

3 Set_bit (Ev_key, tpd->dev->evbit);

4 Set_bit (abs_x, tpd->dev->absbit);

5 Set_bit (abs_y, tpd->dev->absbit);

6 Set_bit (Abs_pressure, tpd->dev->absbit);

7 Set_bit (Btn_touch, tpd->dev->keybit);

8 Set_bit (abs_mt_position_x, tpd->dev->absbit);

9 Set_bit (abs_mt_position_y, tpd->dev->absbit);

Ten Set_bit (Abs_mt_touch_major, tpd->dev->absbit);

Set_bit (Abs_mt_touch_minor, tpd->dev->absbit);

Tpd->dev->absmax[abs_mt_position_x] = tpd_res_x;

Tpd->dev->absmin[abs_mt_position_x] = 0;

Tpd->dev->absmax[abs_mt_position_y] = tpd_res_y;

Tpd->dev->absmin[abs_mt_position_y] = 0;

Register input device int input_register_device (struct Input_dev *dev)

Third, MTK platform CTP software control process

Code Analysis:

Mediatek\custom\common\kernel\mtk_tpd.c

Mediatek\custom\common\kernel\touchpanel\ft5206_driver.c

Mediatek\custom\common\kernel\touchpanel\ft5206_driver.c

Mediatek\custom\common\kernel\touchpanel\ft5206_driver.c

Tpd_probe (struct i2c_client *client, const struct I2C_DEVICE_ID *id) main completion of touch device power-up process, configuration interrupt and interrupt handling function, turn on line Cheng Listen input event (Touch mode event)

Registered TP Interrupt handler function:

To listen for thread registration handler functions:

Virtual Key escalation Process:

1. Under normal mode, the TP button is also reported as a input_event in coordinates, as in other touch events. The tpd_button_setting () function is initialized to write the coordinate information of the virtual key in/sys/board_properties/by the configuration information in the file defined in Tpd_custom_xxx.h. The VIRTUALKEYS.MTK-TPD. At work, TP driver will press the coordinates of the point to escalate, the Android upper layer will read the key configuration information sys, and then determine whether the escalated coordinates belong to a key coordinate range, in order to convert the coordinate information into a specific key key value.

2. Under Factory mode and recovery mode, since Android has not yet started, key events cannot take the escalation mechanism in 1, but instead use the Tpd_button () function to directly escalate the keys.

Four, the MTK platform debugging CTP needs to modify the place

Hardware part: First look at a general figure

Capacitive screen power-on/wake-up sequence diagram

First, in the PROJECTCONFIG.MK configuration of the project touch screen related models:

CTP module related DWS configuration. According to the hardware schematic diagram, check the reset signal, the interrupt number, and the corresponding PIN PIN IO port configuration is correct.

CTP Power Supply Section configuration:/mediatek/custom/{project}/kernel/tpd_custom_ft5206.h

IIC Configuration and Registration

Mediatek/custom/common/kernel/touchpanel/ft5206_driver.c

Note: Do not hang the wrong i²c. Default code may be hanging in a group of IIC

General capacitive screen reserved firmware debugging interface to achieve the calibration function this step can be directly commented out Tpd_have_calibrtion, remove the platform effect function.

Mediatek\custom\common\kernel\src\tpd_calibrate.c

CTP Firmware Upgrade Interface:

At present, the capacitive screen manufacturers will reserve the firmware interface, you can modify the firmware to configure the corresponding register of touch chip, adjust: touch screen sensitivity, anti-interference, output coordinates and physical coordinates matching.

Therefore, after the driver engineer completes the touch screen drive function debugging, also needs to cooperate with the TP supplier to complete the TP firmware program debugging and the upgrade.

Touchpanel does not respond to positioning:

First, use this device read Touchpanel escalated event: adb shell get event/dev/input/event3, if the hand touch mode screen, no relevant information out, then the problem is in the drive configuration, hardware circuit, CTP module phase.

Second, if TP has lost data to the upper layer, but there is no corresponding action on the upper layer, you need to find out where TP lost data to go to, mainly related to the file: Inputreader.cpp and InputDispatcher.cpp analysis Data flow: In the Inputreader.cpp #define DEBUG_XXX 0 All modified to #define DEBUG_XXX 1 in InputDispatcher.cpp #define DEBUG_XXX 0 All modified to #define DE Bug_xxx 1 Gets the relevant log and searches for key words as "Inputdispatcher:focus entered window:" and "Inputdispatcher:focus left window:" To locate the input letter The whereabouts of the interest

Capacitive Screen Drive Technology

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.