EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
You are here: Home / Topics / how to interface a resistive touch screen to lpc2148 (arm7) microcontroller

how to interface a resistive touch screen to lpc2148 (arm7) microcontroller

|

Projects › Projects › how to interface a resistive touch screen to lpc2148 (arm7) microcontroller

  • This topic has 7 replies, 4 voices, and was last updated 8 years, 2 months ago by SHAH DISHANT H..
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • February 1, 2013 at 8:02 am #2097
    ANJUSHA
    Participant

    hai,

        i want to know how to interface a touch screen to arm7, in which inbuilt ADC is present.

    February 28, 2013 at 4:29 pm #9201
    AJISH ALFRED
    Participant

    Hi Abiram,

    Your touch screen should have two analog output pins, X-cordinate & Y-cordinate. Read the value of both using two seperate ADCs, and the result is the location (X,Y) of a touch.

    March 2, 2013 at 4:33 am #9215
    ANJUSHA
    Participant

     thank you sir…….

    sir can you give an idea of the logic involved in writing code for interfacing a touch screen to lpc2148.

     

    example.like for a motor ,logic is presented as on and off…two cases.similarly for touch screen 

    can you tell me sir.

    March 2, 2013 at 5:16 pm #9220
    AJISH ALFRED
    Participant

    Hi Abiram,

    Good question. You asked for the logic only, while most people ask for a working code staraight away. I’m impressed. If you have the perfect logic, you can make your controller to do any task. Code is nothing but a representation of your logic, right?

    Regarding your question,

    The aim is to sense a touch and find its co-rdinates (X,Y) on the touch screen.

    You have to connect the X and Y probs to seperate ADCs.

    You must initialize the ADC in such a way that it should perform continuous digital conversion.

    Now your code should do the following continuously

     – read the ADC1

     – read the ADC2

     

    If there is no touch the values will be the maximum. If they are 10-bit ADC, 1023 will be the maximum value. This value will drop suddenly whenever you touch the screen. That’s how you sense a touch.

    Now the location of the touch is the reading from both the ADC at that moment.

     

    I can represent the logic as follows

     

    step1: initialize the adc

    step2: read adc1

    step3: if adc1 value less than a threshold value, say 550 then go to step6, otherwise go to next step

    step4: read adc2

    step5: if adc2 value less than a threshold value, then go to next step, ortherwise go to step2

    step6: read and store the value of adc1 as X cordinate and ADC2 as Y cordinate of the touch

     

    Any further doubts, please ask.

    March 3, 2013 at 2:45 pm #9226
    ANJUSHA
    Participant

     

    hello sir,

     

     Thank you sir.your explaination is perfect sir.i am trying according to the steps given sir.now i want to define 6 functions to control 6 operations in a system.so sir could you tell me depending on factor of touch screen ,we should divide (x,y) values .so that 6 functions are to be controlled through touch screen……….likewise ex: if we take keypad we had 0 to 9 digits.so 9 functions can be controlled on selecting the digits.the same logic has to be implemented using touch screen.how sir?can you tell me.

    March 4, 2013 at 8:12 am #9234
    AJISH ALFRED
    Participant

    K. Assume your touchscreen is divided into 6 areas, like 6 switches. You select them and find in which range the X and Y varies in that particular area.

    Use these values to check in which area the touch has been sensed.

    April 13, 2014 at 6:02 am #11541
    karthik
    Participant

    Hi,
    I have written a code such that the o/p values of touch screen are converted to digital values and transmitted through UART so that I can easily note down the touch screen digital values of x-y coordinates . When monitoring the digital values of ADC keeps varying a lot!!! Please help.. Any suggestions?
    I have connected the pins of touchscreen directly to my controller. Is there any necessity of any external circuit?
    Thanks in advance.

    May 27, 2014 at 3:03 am #11772
    SHAH DISHANT H.
    Participant

    Hi,

     

    What is the variation you are getting ?

     

    Tell the range. actually the step size for LPC2148 is very small so you can expect a variation.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Basic questions about MOSFETS, Gate Drivers and Diodes August 9, 2022
  • LTSpice DC-AC August 9, 2022
  • Circuit Problem August 8, 2022
  • Google translate suggest "device sheet" or "apparatus sheet" but that cannot be ? August 8, 2022
  • Right channel distortion on vintage fisher rs-2010 August 8, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools