4 Replies Latest reply on Jul 17, 2015 6:17 AM by kbro

    resistive touchscreen

    toonamo

      So first off i originally thought i could use an ar1100 to act as a touchscreen for my 7" HDMI lcd screen. However after trying the Vendor_04d8_Product_0c03.ics file in /system/usr/idc folder and rebooting i still can't get it too work. A lot of people can't get it to work so I figured it can't be use with android 4.3 as it stands.

       

      When i plug it in the debug window shows

      usb 2-1.2: new full speed USB device number 5 using fsl-ehci

      input: Microchip Technology Inc. AR1100 HID-MOUSE as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.2/2-1.2:1.0/input/input3

      generic-usb 0003:04D8:0C02.0004: input,hidraw0: USB HID v1.11 Mouse [Microchip Technology Inc. AR1100 HID-MOUSE] on usb-fsl-ehci.1-1.2/input0

       

      but the touching the panel does nothing. Not in app, or out. The screen works fine on my windows machine.

       

      My question is how can i interface a 4 wire resistive touch screen? I don't mind if i have to use i2c or whatever it takes but i don't know where to start. i noticed some people are useing the lvds as a hdmi out to go to laptop screens but no one ever discusses getting the touchscreen to work. Or at least in any writeup/ tutorial i could find.

       

      Some background on my project is that i want to use this to have a 7" touchscreen in my vehicle that runs android software and also software i will create to control electronics in the car. I have everything i need except for a touchscreen.

       

      Linux won't work very well because it's not touchscreen friendly at the moment. (pop up keyboard, email apps, etc.) Maybe once ubuntu makes thier phone software it will be a better option but for now I need android to work.

       

      Any ideas how to get a 4-wire resistive touch screen to work with android? I can compile from source if i have to i just don't know what to edit.

        • Re: resistive touchscreen
          amgalbu

          Resistive touch screen just needs two ADCs that detect two resistance values (for X and Y). Resistance values are then converted to screen coordinates by means of calibration data (to get calibration data, user has to launch a procedure that shows crosses in the four corners of the screen).

          That said, the connection circuit is easy to implement

           

          microcontroller - Resistive Touch Screens - Electrical Engineering Stack Exchange

           

          On Linux (and hence android) you can find several touch drivers. The most widely used is tsc2004. You can have a llok and start from there

           

          Ambrogio

            • Re: resistive touchscreen
              toonamo

              Thank you Ambrogio. I understand the x and y aspects of a touch screen. I just don't understand how to get this data to android. A driver would mean there is a device to connect to convert the data to something the android understand by utilizing the driver. When i try to google touchscreens all it shows is a 10 inch and a 5 inch with a capacitive sensor. My problem is i can't fit a 10 inch in my dash and 5 is just too small.

               

              Does anyone know what i need to do in order to connect a 4 wire touch sensor to the riotboards gpio and what source to edit in order for it to work? Or perhaps a usb device that works with android since the ar1100 does not.

               

               

              edit: well i can't figure out how to communicate with the ar1100 when it's connected to the android but i did figure out that i can send commands to emulate touch/ tap events from the shell

              input tap 200 622
              

               

              so for now i am going to use a arduino to "read" touch events and then send them to the shell. Once i figure out how to edit the source to read the sensor over gpio then i will modify the source to read the events directly. For now i will use the debug port

            • Re: resistive touchscreen
              kbro

              I had exactly the same problem.  By default the AR1100 enumerates as a HID mouse with a vendor:product code of 04D8:0C02, as your debug output shows.  What you need to do is install the Microchip AR Configuration Utility on a Windows PC, plug in the AR1100 and your HDMI screen, and use the Manual Setup utility to change the mode to DIGITIZER.  Now when you plug it into your Android device it will enumerate as 04D8:0C03 and work as expected.  See here for more info.