element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs TI Hercules LaunchPad Type 2: Touch Screen
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: martinvalencia
  • Date Created: 7 Apr 2015 1:31 AM Date Created
  • Views 1090 views
  • Likes 2 likes
  • Comments 4 comments
  • hercules_launchpad
  • touch-screen
  • tactil
  • glcd
Related
Recommended

TI Hercules LaunchPad Type 2: Touch Screen

martinvalencia
martinvalencia
7 Apr 2015

Source: TouchScreen Article - mikroElektronika

 

What is a touch panel?

A touchpad is a fine panel adhesive placed on the screen a graphic LCD. It is very sensitive to pressure so that a soft touch causes some changes in the output signal.

There are different types touch panels. The simplest of them is the resistive touch panel which will discuss here.


Working principle

A resistive touch panel is composed of two transparent rigid foils, forming a structure "sandwich" having a layer Resistive on their inner faces. Resistance these layers usually does not exceed 1Kohm.
Opposite sides of the sheets have contacts to access a ribbon cable. The procedure to determine the coordinates the position of the panel has been pressed can be divided into two steps. The first is the determining the X coordinate and the second the Y coordinate of the point. To determine the X coordinate, it is necessary to connect Pin superfi left surface of the X contact to ground and right to the power supply. This allows obtaining a voltage divider pressing the touch panel. The voltage value obtained in divider can be read on the bottom contact of the superfi Y. surface tension will vary in the range of 0  V to the voltage supplied by the power supply and X coordinate depends If the point is near the left contact superfi surface X, the voltage will be close to 0 V.

For determining the Y coordinate, it is necessary connecting the lower contact surface Y superfi to ground, while the upper contact will connect to the power supply. In this case, the voltage reading will be in contact superfi left the surface X.

touch1.png

Connecting to a microcontroller

To connect a touch panel to the microcontroller, it is necessary to create a circuit for touch panel control. Through this circuit, the microcontroller connects the right contacts the touch panel to ground and the supply voltage (as described above) to determine the X and Y coordinates (see Scheme). The lower contact surface superfi Y and left contact the surface superfi X are connected to A / D converter of the microcontroller. the Ones X and Y coordinates are determined by measuring the voltage at the respective contacts.

In software is to display a menu in a graphical LCD, switch on and off the touch panel (touch control panel) and reading the values of A / D converter which actually represent the X and Y coordinates of the position. After determining the coordinates, it is possible to decide what we want to do to the microcontroller.

 

 

touch2.png

 

dim x_coord, y_coord, x_coord128, y_coord64 as longint ‘ scaled x-y position


sub function GetX() as word
‘reading X
DRIVE_A = 1 ‘ DRIVEA = 1 (LEFT drive on, RIGHT drive on, TOP drive off )
DRIVE_B = 0 ‘ DRIVEB = 0 (BOTTOM drive off )
Delay_ms(5)
result = ADC_Read(0) ‘ READ-X (BOTTOM)
end sub
sub function GetY() as word
‘reading Y
DRIVE_A = 0 ‘ DRIVEA = 0 (LEFT drive off , RIGHT drive off , TOP drive on)
DRIVE_B = 1 ‘ DRIVEB = 1 (BOTTOM drive on)
Delay_ms(5)
result = ADC_Read(1) ‘ READ-X (LEFT)
end sub

 

Image Gallery

IMG_5F00_20150406_5F00_193506157.jpg

IMG_5F00_20150406_5F00_193515747.jpg

 

 

Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • DAB
    DAB over 10 years ago +2
    Nice tutorial Martin. DAB
  • martinvalencia
    martinvalencia over 10 years ago in reply to DAB +1
    think it's time to reuse faulty cell in our projects I'm working with a friend to adapted a capacitive screen of iphone!
  • Jan Cumps
    Jan Cumps over 10 years ago +1
    Nice name on Video #2
  • martinvalencia
    martinvalencia over 10 years ago in reply to Jan Cumps

    I need to improve my handwriting image hahahaha

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    Nice name on Video #2 image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • martinvalencia
    martinvalencia over 10 years ago in reply to DAB

    think it's time to reuse faulty cell in our projects image I'm working with a friend to adapted a capacitive screen of iphone!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Nice tutorial Martin.

     

    DAB

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube