WinCE6 & OMAP3530: touchscreen calibrates, no errors but coordinates are wrong RRS feed

  • Question

  • Greetings.

    I am using an unmodified WinCE 6 image built using PB based on the CompuLab Wiki instructions for the T-3530 SOM from CompuLab.  I believe this is all derived from a BSQUARE BSP for the OMAP cpu. 

    I can calibrate the touchscreen via Control Panel -> Stylus without errors.  But the touchscreen (TS) coordinates are still wrong after the calibration is complete.  The error in position is smaller near the center of the TS and grows as you move away in any direction.  The error is always such that the coordinates that WinCE picks up from a touch event are closer to the center of the screen than the actual location of the stylus.  This phenomenon is present BEFORE I attempt any sort of calibration as well, just using the default cal data in the registry.

    The X and Y axis and direction are correct; thus I think the touch screen's four output wires are connected to the proper connectors.  In other words, if I use a stylus to draw a selection rectangle around several items on the WinCE desktop, as I drag the stylus, I get the correct X and Y movement (up/down, left/right are correct) but the *location* of the selection rectangle on screen does not match the stylus location.  Similarly, if I press and hold the stylus to mimic a right-click event, the pop up menu appears, but the location is closer to the center of the screen than where I pressed the stylus.

    The touchscreen in use is a 3M-Dynapro 6.4 inch resistive touchscreen which we have successfully used in several other projects.  Per the 3M datasheet, we have pin 1, called "bottom", connected to Y- on the CompuLab board.  Also, pin 2, "Top", is connected to Y-, pin 3 (Left) to X- and pin 4 (Right) to X+.

    Three different TS have been tried on this setup with the same results.  Each TS has been confirmed as working with a different WinCE single-board computer (GC-Plus from Eurotech with WinCE 3)

    Registry settings for TS:
    "Driver Name"="touch.dll"
    "CalibrationData"="2064,2047 652,3551 652,623 3551,617 3456,3519"
    "MaxCalError"=12         ; note that default is six, unable to complete calibration without raising this value
    "PenUpDebounceMS"=20    ;note, default is 40 but response was much better at 20

    When I recalibrate successfully, I can see in the WinCE registry that "CalibrationData" has changed, as it should.  After recalibrating via Control Panel, the registry shows:
    "2035,2164 1139,2751 1429,1478 2623,1046 3007,3177"

    I can post a video of a selection rectangle in progress if you like, please advise.

    Thanks, David Hart

    email me: D HART (remove the space after the D) AT OICO dot COM
    Thursday, March 10, 2011 10:04 PM

All replies

  • Hello ,


    I suspect the issue with low level driver that is ts pdd, as every touch screen may have difft physical properties.

    main issue in my openion might be due to the linearity of raw coordinates. 

    try to print raw coordinates. it might give you some clue.



    Friday, March 11, 2011 7:22 AM
  • The raw coordinates pulled in and the logic for calculations all come from the "TouchCalibrate" routine which is part of GWES and not available as source code.  It's just a black box from my current perspective.
    email me: D HART (remove the space after the D) AT OICO dot COM
    Friday, March 11, 2011 2:14 PM
  • More info for everyone.  The vendor suggested that I add a registry entry under HKLM/DEVICEMAP/TOUCH as "SPIBaudRate"=dword:0x0A.  This is a clock divider that determines the SPI_CLK rate.   The default value was 5.  I found that 0x0A was too high, but 0x08 works okay; it makes the positional error much much less.  However, I cannot calibrate 9 times out of 10, and single-clicks are not recognized by hardware.  It is rare (maybe 15 or 20% of the time) that any selection rectangle at all is drawn in response to a drag of the stylus.

    So, does anyone have suggestions on changes to the "PenDebounceMS" or "SamplesDropped" settings that would make the TS more responsive to single clicks or to dragging the stylus?

    email me: D HART (remove the space after the D) AT OICO dot COM
    Tuesday, March 15, 2011 4:37 PM
  • Actually, you do have most of the source code.  The calibration code is in PUBLIC\COMMON\OAK\DRIVERS\CALIBRUI which calls into your touch driver to determine the number of points to use and read the data.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Tuesday, March 15, 2011 7:41 PM