4 Wire resistive touch screen, Need help


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: 4 Wire resistive touch screen, Need help

    Hi,

    I got the theory for this program from a technical paper that I downloaded from the internet and that I can't find right now. I will keep looking for it and posted when I find it. In response to your questions,

    1) The "start reading average pressure value" is a procedure to check if the screen has been touched. You monitor the two values for X and Y pressure and if they go outside a given range then that means that the screen has been touched. If you constantly output these two values to a LCD display you'll see what I mean.

    2) No, that I know of. The method I used in my program to detect if the screen has been touched is the only method I could find in the internet.

    3) I am not in front of my PC right now, and I can't answer that question from the top of my head. I'll get back to you later with this question.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,182


    Did you find this post helpful? Yes | No

    Default Re: 4 Wire resistive touch screen, Need help

    Interesting thread.

    About point 2).
    Since it is an analog signal, I cannot see a way of diect interrupt. Only regular interrupts to start analog conversion and check.

    Ioannis

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default Re: 4 Wire resistive touch screen, Need help

    Megahertz,

    That code I posted above I wrote it some time ago. It was part of a program that sent the touchscreen coordinates to my PC through the USB port to move the mouse cursor. I modified the USBMouse program that came with PBP to send the 4-wire resistive touchscreen coordinates to the PC.

    The sub routine "CALIBRATE_TOUCHSCREEN" was actually a way of "converting" the 10-bit ADC reading comming out of the PIC ADC port to the proper pixel coordinates I needed to make the mouse cursor move accross the PC screen. These values were found experimentally, pretty much trial and error. Now, for my 320x240 LCD display with touchscreen I wrote a calibration routine which is a lot more involved than the code that you have above. If you need the code, let me know.

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts