The format of the data is as follows: SXXYY Where S is the status XX is the X coordinate and YY is the Y coordinate. Bits are as follows: Byte 1: Status Bits 0 to 5 Not used (Reserved:- No information) Bit 6: 1 for screen being touched. 0 for lift off. Bit 7 Always 1 Byte 2: X coordinate least significant Byte. Bit 0 to 6 Least significant 7 bits of touch coordinate Bit 7: always 0 Byte 3: X coordinate most significant Byte. Bit 0 to 6 Most significant 7 bits of touch coordinate Bit 7: always 0 Byte 4: Y coordinate least significant Byte. Bit 0 to 6 Least significant 7 bits of touch coordinate Bit 7: always 0 Byte 5: Y coordinate most significant Byte. Bit 0 to 6 Most significant 7 bits of touch coordinate Bit 7: always 0 This obvioulsy makes it easier for touch driver writers to latch onto the beginning of a packet as the most significant bit of a byte is only ever a 1 for the status byte of the packet. It does mean that the driver has to do some bit shuffling to get the full 14 bit coordinate but thats not too difficult to do. So if you ignore the first two bytes in your file (they might be down to the touch controller starting up) the first packet of data is as follows. D8 Touch present (bit 6 high) 02 02 X Coordinate = 0102Hex (258 decimal) 23 7E Y Cordinate = 3F23Hex (16163 decimal) The status value D8 changes to 98 when you lift your finger off of the screen. After many years of using touchscreens I've always found it easier to look at the lift off coordinates than the coordinates when the finger is touching the screen. So for your calibration values I suggest you touch down close to each position, slide your finger to the required place and then remove your finger. That way you get a 'lift off packet with the coordinates when you removed your finger. You can then scan the HEX file for the 98 to mark the beginning of the packet and work out the coordinates from there. Note that occasionally (and I don't know why) your file has an extra byte in a packet. If a packet is badly formed (i.e has 6 bytes instead of 5) its wise to ignore it. If you download the EX11-1000SC controller technical reference from the 3M website at http://www.3m.com/3MTouchSystems/downloads/PDFs/19252V21.pdf this information is on page 24. Hope this helps. Kevin -----Original Message----- From: Dalibor Malek [mailto:maillist@xxxxxxxxxx] Sent: 31 August 2004 19:03 To: xfree86@xxxxxxxxxxx Subject: Re: M inX, MaxX, MinY, MaxY Problem Hi Kevin, thank you for your answer. I tried as you said and connected my screen on the serial of my Laptop and then run HyperTerminal to connect to the screen. Baud rate and so on are right. Then I touched the screen as you described and this is what I get: www.zwickl.net/capture.TXT Viewed wit a Hex editor it makes even les sense. What should I look for in there? Thank you Dalibor Malek Benstead, Kevin wrote: >Those drivers won't work with your controller. > >We had exactly this problem with a Elographics touch screen (I think both >the drivers are written by the same person or based on one previously >written). > >The way that Elographics recommended was to boot into DOS, run their DOS >calibration utility, write down the numbers and then put them into the >XF86Config file. > >However as we were running on an embedded system this was not possible. > >So we piped the data from the serial port on which the touch screen was >connected into a file (once we got the baud rate correct). We touched the >screen in nine places. Top left, Middle left, Bottom left, Top Centre, >Mid Centre, Bottom centre, Top Right, Mid Right and bottom right. > >For each touch position there should be at least one and probably several >packets of data from the touch controller. Using a Hex editor we viewed the >data and worked out the values of MinX, MinY, MaxX, MaxY we fed those into >the XF86Config file. Provided you know the order that you touched each of >the points on the screen it's usually pretty easy to work it out. > >The results were pretty good. > >The manual for the microtouch controller SHOULD give you a run down on the >serial protocol so you can work out how to find the X and Y co-ordinates for >each touch. > >If only there were a calibration routine as part of X. Perhaps one day >someone will write one. I'm not volunteering I've got enough to do. > > >Kevin >email: kevin.benstead@xxxxxxxxxx >Tel: +44 (0)118 971 5032 > > >-----Original Message----- >From: Dalibor Malek [mailto:maillist@xxxxxxxxxx] >Sent: 31 August 2004 14:50 >To: xfree86@xxxxxxxxxxx >Subject: Re: M inX, MaxX, MinY, MaxY Problem > >Hi Kevin, > >thank you for your answer. >I know the site and I tried the drivers but they are not working for me. >I'm using a EX1000SC Controller(OK not me the screen). >There are Linux drivers for this screen but only for the 2.4.* Kernel >(not working with Fedora Core 2 and the 2.6.* Kernel). >That's way I'm trying to get the standard microtouch driver to work. >I think if I could give him the correct MinX, MaxX, MinY, MaxY settings >the screen would work. >Do you know how I can get the right settings? > >Thank you > >Dalibor Malek > > > > >Benstead, Kevin wrote: > > > >>If you are using a 3M SC3 or SC4 touch controller you don't really want to >>be using the microtouch driver. >> >>There is a much better driver at http://www.cdp1802.org/mmmtouch/ which has >>a calibration routine that does all the work for you. >> >>The version for Xfree4.3.0 works for 4.4.0 as well. >> >> >>Kevin >> >>-----Original Message----- >>From: Dalibor Malek [mailto:maillist@xxxxxxxxxx] >>Sent: 30 August 2004 13:22 >>To: xfree86@xxxxxxxxxxx >>Subject: M inX, MaxX, MinY, MaxY Problem >> >>Hi All, >> >> >> >> >> >>>I'm trying to configure a 3M Touch screen. >>>As I found out I have to use the Microtouch driver so a added the >>>following to my config File: >>> >>>Section "InputDevice" >>>Identifier "touchscreen0" >>>Driver "microtouch" >>>Option "Device" "/dev/ttyS0" >>>Option "MinX" "1412" >>>Option "MaxX" "15184" >>>Option "MinY" "15372" >>>Option "MaxY" "1230" >>>Option "ScreenNumber" "0" >>>Option "ReportingMode" "Scaled" >>>Option "ButtonNumber" "1" >>>Option "SendCoreEvents" >>>EndSection >>> >>>This got my Touch screen running but when I touch the screen the mouse >>>pointer is two or three centimetres right beside my finger. >>>I found out that the MinX, MaxX, MinY, MaxY settings don't fit for my >>>screen but how can I get the right settings? >>>When I set the MinX and MinY settings to 0 I get better result but I >>>think there is a way to calculate or find the right settings out >>>except guessing. >>> >>>Thank You >>> >>>Dalibor Malek >>> >>> >>> >>> >>> >>> >>_______________________________________________ >>XFree86 mailing list >>XFree86@xxxxxxxxxxx >>http://XFree86.Org/mailman/listinfo/xfree86 >>_______________________________________________ >>XFree86 mailing list >>XFree86@xxxxxxxxxxx >>http://XFree86.Org/mailman/listinfo/xfree86 >> >> >> >> >> > >_______________________________________________ >XFree86 mailing list >XFree86@xxxxxxxxxxx >http://XFree86.Org/mailman/listinfo/xfree86 >_______________________________________________ >XFree86 mailing list >XFree86@xxxxxxxxxxx >http://XFree86.Org/mailman/listinfo/xfree86 > > > _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86 _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86