Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Touch screen panel + USB controller - send generic (x,y) data to PC

Status
Not open for further replies.

vEjEsE

Newbie level 2
Joined
Jun 25, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
29
I'm wondering how impossible it can be to connect a touch panel (with USB controller) to a PC for it to send X,Y coordinates when an event happens (the panel is touched).

After searching the web I couldn't find more then pieces of information that don't tell the whole story. Most of what I understood so far is that I can buy some touch panel development kit (ebay), create some basic C code that acts like a driver and then use those C functions to handle input on the device in other applications.

Question is, is the touch panel + USB controller + C code enough in order to use the input on the touch panel in other applications that I'll build myself (in C++ or other languages)? And what exactly would the C code be? (I don't want to use the touch panel as a mouse, but independent. It only should provide coords when a touch event happend thru a function call - which would probably be part of the C code mentioned earlier)

An answer like "Buy this [touch panel] and [microcontroller], write this C code [ code ], compile it with g++, run the build and use the [getCoord()] function whenever the [touchHappened()] function returns true" would be too nice to be true?

A multi touch panel would be better (if not too expensive).

Also, I'm working on Linux.

Thank you.
 

What type of touch you are looking at?

Cheap and easy to interface -- Resistive touch ( but single point touch only )
a bit expensive (depends on quality) and needs interface IC -- Capacitive touch ( supports multi point touch )

there are 2 parts in case of touch,
a. Touch panel
b. Touch interface

for Resistive touch, touch panel will give 4 wires, which needs simple ADC to interface and calculate the coordinates
for Capacitive touch, touch panel will have multiple wires (based on size and quality, assume a 12x7 interface having 19 wires) those needs to be interface with touch IC, this IC will provide you the coordinates on I2C or any other medium.

now it depends on your project requirement on what you need.

I have worked in big mobile company as a touch driver engineer, and the above explaination is based on my experience.
feel free to clarify your query
 

I want to use a touch panel as a basic input device, like a keyboard or mouse, but a touch panel.
Basic idea is, when a person touches the panel, any application listening to the panel's input should get the x, y coords of the event (touch).

Example application code that would use the input:

Code:
#include <PANEL_HEADER_FILE> // this would hold the C functions of the panel microcontroller.
#include <iostream>

int main() {

     while ( true ) {
          
          if ( panel_touch_happened() ) {
               std::cout << "Touch happened at " << panel_get_x() << " - " << panel_get_y() << std::endl;
          }

     }
 
}
Executing the above example, whenever a person touches the touch panel, there will be console output like "Touch happened at 825 - 358".
And the above panel_* functions should be usable in any other C/C++ application, the same way.

That's all there is to it. It doesn't replace the mouse, it needs no display. It's just another independent way of providing input to the PC, like a mouse, keyboard, joystick and other periferical input devices.


Cheap and easy sounds best for now. Althought I presume those 3 panel_* functions from the above example would still exist on different touch panels and microcontrollers.


The ebay link I provided in the original post with the touch panel dev kit - couldn't I use that in order to build those 3 functions? I'm no good with electronics or microcontroller programming (but willing to learn, although I want to keep it at a minimum for now). I figured there'd be an easy way to do this.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top