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
  • Advertise
You are here: Home / Replies / Hi Abiram,Good question. You

Hi Abiram,Good question. You

|

Projects › Projects › how to interface a resistive touch screen to lpc2148 (arm7) microcontroller › Hi Abiram,Good question. You

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.

RSS Recent Posts

  • Supply vs performance query February 7, 2026
  • wall transformer polarity February 7, 2026
  • Do i need a buffer? February 7, 2026
  • BPF February 7, 2026
  • Figgie International intercom 1998 era February 7, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 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
  • Advertise