Detailed touch screen Correction Method for a csdn cool man

Source: Internet
Author: User

Original: http://blog.csdn.net/gooogleman/archive/2008/11/05/3219498.aspx

 

Experience in modifying the display and touchp drivers under multiple LCD screens

First of all, what I do is the wince Platform Based on S3C2410.
After changing the LCD, you generally need to modify the display and touchp drivers. We recommend that you extract some common macros and use them to write head files independently. In addition to the C/CPP file corresponding to the two drivers, the file to be referenced also has s2410.h. The CFW. C contains LCD problems. If you have modified him, you need to pay attention to it. My own package is.

 

Some information I extracted:
.........
# Define LCD _type tft640_large
# If (LCD _type = tft640_480)
# Define src_width (640)
# Define src_height (480)
# Define memsize (0xa0000)
# Define LCD _xsize_tft (src_width)
# Define LCD _ysize_tft (src_height)
// Modify the following values in the touch Area
# Define touch_max_x 1080
# Define touch_min_x 10
# Define touch_max_y 980
# Define touch_min_y 30

# Define touch_x src_width
# Define touch_y src_height

// For information on time slot settings displayed on the screen, refer to the information provided by the LCD manufacturer.
# Define vbpd (20) & 0xff)
# Define vfpd (2) & 0xff)
# Define vspw (1) & 0x3f)

# Define hbpd (121) & 0x7f)
# Define hfpd (15) & 0xff)
# Define hspw (13) & 0xff)

/// # Define adc_delay_time 5000 depends on your specific situation. I can separate it because there are several types of liquid crystals.
# Elif (...)
.........
# Endif
.........
In the future, no matter what LCD needs to be processed, you can directly modify the LCD _type. If you have the same size as me, and there are several different manufacturers providing LCD, You need to define a macro to differentiate the manufacturers, after writing it, you need to change the value of one or two macros. At the same time, you can comment out the extracted Macros in the original file to avoid redefinition. Do not cover several places. Of course, this may not be perfect, and there is still a problem of touch correction. Let's talk about my practices.

1. First, get the LCD and run it.
2. Use the calibration program that comes with Wince for correction. Then, use PB or EVC tools to connect to the wince registry. Find the following values.
[HKEY_LOCAL_MACHINE \ hardware \ devicemap \ touch]
"Calibrationdata" = "the values of each person here are different"
Find "[HKEY_LOCAL_MACHINE \ hardware \ devicemap \ touch]" in platform. Reg under the $ (_ flatreleasedir) directory.
Modify the value of "calibrationdata" to "found. Then make it. Re-write to test.
In this case, we need to test the touch effect of the shielded edge. If it is normal, congratulations, you can. If the edge is faulty, proceed to step 3.
3. Modify the touch area.
# Define touch_max_x
# Define touch_min_x
# Define touch_max_y
# Define touch_min_y
Adjust this area (I usually see that the edge is not reflected or the effect is centered after the click, so place the area on the right ). Then go to 1 and test again.

Usually a few steps are OK.
Remember to save the value of calibrationdata to platform. in Reg, if you change the LCD later, you can directly modify platform. reg file, put the corresponding values out, and compile other annotations. No correction is required.

 

Gooogleman summary touch screen positioning calibration:
Method 1:
Modify the platform. reg file.
[HKEY_LOCAL_MACHINE \ hardware \ devicemap \ touch]
"Maxcalerror" = DWORD: 7
; Portrait
"Calibrationdata" = "644,471 104,831 1172,843"
The Touch parameter may vary in different environments. You can control
Panel-pen-one re-calibrate the touch screen value, then connect the PC with USB cable, and then use the registration under Pb-Tool
Table tool. View the touch screen parameters of the hardware, copy them, and paste them into platform. Reg. Add
Copy the platform. reg file to the release directory. Make image to re-compile a wince. This
Touch screen is more accurate.
Method 2:
If the four touch_max_x touch_min_x touch_max_y touch_min_y values can be adjusted, no more
You can disable the Registry by adjusting the registry value. If the registry value is adjusted, use the registry as the standard.

 

 

 

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.