Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Distorted touch screen calibration 1024x768
PostPosted: Thu Jul 07, 2011 4:19 pm 
Offline

Joined: Sat Jan 22, 2011 3:25 pm
Posts: 3
Hi there!

I'm running the Angstrom distribution on top of Linux kernel 2.6.30 on a custom board equipped with a XGA (1024x768) display and touch screen.

Everything is working fine, but touch screen calibration via xtscal results in non-linear deviations in all directions. The cursor moves near the finger, but when moving from left to right, it switches from one side of the finger to the other.

Same thing happens using ts_calibrate, besides this program fails to return fully to the GPE desktop.

Does anyone have similar problems or a hint how to fix it?
It would help to know where the calibration parameters (from /etc/pointercal) are interpreted by the input handler. The Atmel driver doesn't care for it.

Following a few dumps for further information:

# cat /etc/profile.d/tslib.sh
export TSLIB_TSDEVICE=/dev/input/touchscreen0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/lib/ts


# xtscal -debug
Using XCALIBRATE
rotation conversion: (24,24) -> (24,24)
rotation conversion: (1000,24) -> (1000,24)
rotation conversion: (1000,744) -> (1000,744)
rotation conversion: (24,744) -> (24,744)
rotation conversion: (512,384) -> (512,384)
point 0: [379 341]
point 1: [301 697]
point 2: [730 744]
point 3: [677 293]
point 4: [520 523]
-699.914551 -0.052303 2.384885
-626.954590 1.916567 0.022434
constants are: -3427 156295 -45869600 125604 1470 -41088096 65536


# ts_calibrate
xres = 1024, yres = 768
Took 6 samples...
Top left : X = 379 Y = 358
Took 8 samples...
Top right : X = 318 Y = 689
Took 10 samples...
Bot right : X = 710 Y = 741
Took 13 samples...
Bot left : X = 667 Y = 305
Took 4 samples...
Center : X = 511 Y = 521
-697.012207 -0.052685 2.364675
-612.219971 1.917816 0.009009
Calibration constants: -45679392 -3452 154971 -40122448 125685 590 65536


# evtest /dev/input/event1
Input evdev.c(EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See http://userweb.kernel.org/~dtor/eviocgbit-bug.html
driver version is 1.0.0
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "atmel touch screen controller"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event code 3 (Absolute)
Event type 1 (Key)
Event code 330 (Touch)
Event type 3 (Absolute)
Event code 0 (X)
Value 508
Min 0
Max 1023
Event code 1 (Y)
Value 439
Min 0
Max 1023
Event code 24 (Pressure)
Value 0
Min 0
Max 15000
Testing ... (interrupt to exit)
Event: time 1275613628.771390, type 3 (Absolute), code 0 (X), value 485
Event: time 1275613628.771432, type 3 (Absolute), code 1 (Y), value 529
Event: time 1275613628.771444, type 1 (Key), code 330 (Touch), value 1
Event: time 1275613628.771454, type 3 (Absolute), code 24 (Pressure), value 7500
Event: time 1275613628.771464, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.776630, type 3 (Absolute), code 1 (Y), value 528
Event: time 1275613628.776675, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.781858, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.781919, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.787091, type 3 (Absolute), code 1 (Y), value 527
Event: time 1275613628.787141, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.802765, type 3 (Absolute), code 1 (Y), value 526
Event: time 1275613628.802818, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.808003, type 3 (Absolute), code 0 (X), value 483
Event: time 1275613628.808055, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.818450, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.818503, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.823686, type 3 (Absolute), code 0 (X), value 483
Event: time 1275613628.823744, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.828923, type 3 (Absolute), code 1 (Y), value 525
Event: time 1275613628.828980, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.839367, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.839421, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.844620, type 3 (Absolute), code 0 (X), value 485
Event: time 1275613628.844671, type 3 (Absolute), code 1 (Y), value 523
Event: time 1275613628.844688, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.849837, type 3 (Absolute), code 0 (X), value 895
Event: time 1275613628.849885, type 3 (Absolute), code 1 (Y), value 146
Event: time 1275613628.849903, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.851550, type 1 (Key), code 330 (Touch), value 0
Event: time 1275613628.851598, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 1275613628.851607, type 0 (Reset), code 0 (Reset), value 0


# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=30000 0 0 0 0 1680 0 0 10000000

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="atmel touch screen controller"
P: Phys=atmel_tsadcc/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003


Top
 Profile  
 
 Post subject: Re: Distorted touch screen calibration 1024x768
PostPosted: Fri Jul 08, 2011 10:21 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

From your descritption, I am not sure it is a calibration problem if the cursor move around your finger.
I think it can be a sensibility problem, I have already seen this because of pen detection sensibility. I had to add a resistor to reduce sensitivity. Without it, it was so worst than after touching the screen I had a lot of interruption once my finger was released.

It's only a clue, I hope it can help you.

Regards,

Ludovic


Top
 Profile  
 
 Post subject: Re: Distorted touch screen calibration 1024x768
PostPosted: Mon Jul 11, 2011 1:35 pm 
Offline

Joined: Sat Jan 22, 2011 3:25 pm
Posts: 3
Thanks for the fast response, appreciate it!

I'm afraid the sensitivity issue was already addressed by adding a variable resistor on the X_LEFT line (220k resistor on evalkit) and adjusting it for minimum jitter and offset when releasing. Now the cursor is steady and stays where it was.

To be clear: when I hold my finger steady, the cursor doesn't move, but when I move the finger from one side to another, the cursor moves along a tilted path (starts at one side of the finger, ends on the other, but seems straight after all).

Another information that could be interesting: I measured the touchscreen on the physical lines and found that the hardware is absolutely linear.


Top
 Profile  
 
 Post subject: Re: Distorted touch screen calibration 1024x768
PostPosted: Tue Jul 12, 2011 8:59 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

So if sensitivity issue is solved, maybe you can also have a look on the ts.conf file and play with settings such as variance, djitter, etc.

Regards,

Ludovic


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: