July 09, 2020, 04:39:32 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


How to connect touch screen to Cuieboard

Started by Watinka, April 13, 2013, 11:44:09 am

Previous topic - Next topic

Watinka

Hi there,

even though I'm pretty fit in Linux and Scripting(Shell, PHP, Python) I'm an absolutely newbie when it comes to Cubieboard and other single-board computers.  :o

I just obtained my Cubieboard and wondered how easy/difficult it would be to connect an 7" LCD-touchscreen. I've got an old screen from an old and cheap tablet PC. See pics below.

My questions:

  • How to connect it to my Cubieborad?

  • What additional hardware would I need?

  • What are the correct names for the two cables that come out of my touchscreen (see pic), so that I can do further research by myself?



Thanks a lot and if this topic has already been covered (I couldn't find):  Please excuse and kindly provide link(s).

The touchscreen:


Uploaded with ImageShack.us

The two cables:


Uploaded with ImageShack.us

GeorgeIoak


  • You're going to need to know the specifics of the LCD panel so you can configure the FEX file for the proper timings.

  • You're also going to require additional power supply rails since there's a good chance you'll need 3.3V for the LCD and 12V for the backlight.

  • Looks like that panel is using a 4-wire resistive touch screen which could be directly connected to the A10 touch screen controller

  • The harder part is going to convert the FFC cable to something that you can attach to the Cubie. There are some FFC-to-Pin Header adapter boards available on the internet but they can be expensive.



Most of what you need to connect LCD panels to the Cubie can be made using my Baseboard if that's of any interest to you.

Watinka

Hi George,

thanks for your answer and sorry for my late reply. The baseboard sounds interesting. I just placed an order.
Hope, shipping to Germany works alright.

Regards
W.

sergej1955

Good afternoon!

Device:
cubieboard1 and LVDC SK-OTM0700D4 with resistive touchscreen
(х1, х2, у1, у2 - cubieboard1 pins 34,36,33,35) and
Debian 7 (image for cubieboard1 - Cubian-desktop-r1-a10.img.7z).
For work with touchscreen the san4i-ts hardware is used.
The screen works correctly.
The ts_calibrate from a package tslib_1.0-11 doesn't work with touchscreen with the calibration program.
All recommended installations on work with touchscreen are executed,
the file script.bin is corrected under the screen 800 x 480 and
touchscreen 7 inches.
The errors aren't present.

Device of sun4i-ts /dev/input/event1.

Program log ts_test :
Reaction of the program to a touch - "Unknown event type 0".

Program log ts_calibrate :
Program log:
xres = 800, yres = 480
signal 2 caugth
The program doesn't react to a touch to the screen.

Program log mtdev-test :
Program log:

   ABS_MT_TOUCH_MAJOR
   ABS_MT_POSITION_X
   ABS_MT_POSITION_Y
0146fba02168 00 3 0030 800
0146fba02168 00 3 0035 479
0146fba02168 00 3 0036 283
0146fba02168 00 3 0039 0
0146fba02168 00 0 0000 0
0146fba02172 00 3 0035 489
0146fba02172 00 3 0036 486
0146fba02172 00 0 0000 0
.
.
.
0146fba022b0 00 0 0000 0
0146fba02307 00 3 0039 -1
0146fba02307 00 0 0000 0


Program log evtest:
Program log:

Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "sun4i-ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max     1000
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     4095
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     4095
Properties:
Testing ... (interrupt to exit)
Event: time 1404366930.410875, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 800
Event: time 1404366930.410881, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 480
Event: time 1404366930.410884, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 239
Event: time 1404366930.410887, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 1404366930.410889, -------------- SYN_REPORT ------------
Event: time 1404366930.421107, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 800
Event: time 1404366930.421111, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 464
Event: time 1404366930.421114, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 239
Event: time 1404366930.421117, ++++++++++++++ SYN_MT_REPORT ++++++++++++


Log of cat /dev/input/event1 :

Program log:

0000000 cd7b 53b3 b41d 0008 0003 0030 0320 0000
0000010 cd7b 53b3 b423 0008 0003 0035 020e 0000
0000020 cd7b 53b3 b426 0008 0003 0036 018d 0000
0000030 cd7b 53b3 b429 0008 0000 0002 0000 0000
0000040 cd7b 53b3 b42b 0008 0000 0000 0000 0000



- what recommendations you can make a question on the given log files for a solution of the problem
of work with touchscreen?

sergej1955

ts_calibrate - well if  - http://www.dimrobotics.com/2013/06/olinuxino-a13-touchscreen-support-in.html

from OLinuXino A13: touchscreen support in Linux
to xf86-input-tslib

X11 - do not work
Xorg.0.log
...
[    34.831] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep  2 05:32:33 2014
[    34.871] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
...
[    36.358] (II) config/udev: Adding input device sun4i-ts (/dev/input/event1)
[    36.358] (II) No input driver specified, ignoring this device.
[    36.358] (II) This device may have been added with another device file.
[