---
+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Junior Member level 1
    Points: 265, Level: 3

    Join Date
    Apr 2013
    Location
    BANGALORE
    Posts
    17
    Helped
    1 / 1
    Points
    265
    Level
    3

    Touch screen interface with 8051 microcontroller

    Hello experts..
    I want to interface resistive touchscreen with
    8051 microcontroller using embedded C (KIEL)
    Can anyone tell me how to match the pattern of
    X and y coordinate generated from touch screen
    Using EMBEDDED C. Basically I want to learn the
    Algorithm. PLEASE HELP

    •   Alt26th June 2013, 21:45

      advertising

        
       

  2. #2
    Full Member level 2
    Points: 1,216, Level: 7

    Join Date
    Oct 2010
    Location
    Near Boston. USA
    Posts
    132
    Helped
    39 / 39
    Points
    1,216
    Level
    7

    Re: Touch screen interface with 8051 microcontroller

    The design depends of several factors. The clear touch screen is going to lay over a display screen or possibly just a printed card. You simply display the buttons and then the area being touched that corresponds to the area being touched is used to branch in the code.

    If you have 4 to 6 touch buttons it is an easy problem and there are many touch screen controllers (TSC) that can interface with a 8051. As an example see the Ti TSC2100 ( ignore the codec functions) to see how a TSC with a SPI interface would be used. You might have a X =0 or 1 and Y = 0, 1, or 2. My guess is since you are using a 8051 this is what you are looking at. As an example the bottom right button might be "increase motor speed" as seen on the display. In a loop you test the TSC, so
    if X=1 and Y=2 (the area near the bottom right of the display)
    then increment the variables that increase motor speed.
    In summary you only need to know which of 4 to 6 areas of the screen was touched.

    If your problem is similar to the TSC in the Apple iPad I'm typing this on then it works a bit differently and it is a much more complex TSC device since there will be more rows and columns overlaying a HD screen. For this you will need to know the row and column the displayed image pixels occupy and align them with the row and column being touched. In addition you will need complex algorithms to decide if a touched row and column as seen by the TSC aligns with an object displayed on the screen or if a nearby screen object makes more sense given the context. This step is to improve the user's experience and reduce errors.


    1 members found this post helpful.

  3. #3
    Junior Member level 1
    Points: 265, Level: 3

    Join Date
    Apr 2013
    Location
    BANGALORE
    Posts
    17
    Helped
    1 / 1
    Points
    265
    Level
    3

    Re: Touch screen interface with 8051 microcontroller

    i want to design gesture based output control(output can be stepper motor, DC motor etc). like, i can make straight line or L shape or square on touch screen and depending upon the shape output will be controlled. NO GRAPHIC LCD, i am using simply touch screen.



    •   Alt27th June 2013, 07:05

      advertising

        
       

  4. #4
    Full Member level 2
    Points: 1,216, Level: 7

    Join Date
    Oct 2010
    Location
    Near Boston. USA
    Posts
    132
    Helped
    39 / 39
    Points
    1,216
    Level
    7

    Re: Touch screen interface with 8051 microcontroller

    Ok, how many bits of x and y? Asked another way how large is the screen and what resolution (.1mm? 1 mm? Other?) do you need?
    There are advantages to using a TSC. You should do a search and see what is available and their cost. Many will connect directly to the screen and have a SPI interface to the 8051 with very few additional components.
    For your application the ADC in the 8051 could be used but you will have to design the analog interface. It is not complex but it is more parts and will take back some of the cost saved by not using a TSC.


    1 members found this post helpful.

  5. #5
    Junior Member level 1
    Points: 265, Level: 3

    Join Date
    Apr 2013
    Location
    BANGALORE
    Posts
    17
    Helped
    1 / 1
    Points
    265
    Level
    3

    Re: Touch screen interface with 8051 microcontroller

    I am not using readymade TSC . Instead using a touch screen connected to ADC via multiplexer(yes, this is analog interface what i have to use for cost reduction and better understanding of the circuits). Suppose my hardware is ready and now i wanted to read the X,Y cordinate(in terms of voltage 0 to 5 volt which in tern can be scaled down if required) and match any predefined pattern. So how we will do that in EMBEDDED C CODE. I hope u got my point. waiting for your reply. THANK YOU in advance.



  6. #6
    Full Member level 2
    Points: 1,216, Level: 7

    Join Date
    Oct 2010
    Location
    Near Boston. USA
    Posts
    132
    Helped
    39 / 39
    Points
    1,216
    Level
    7

    Re: Touch screen interface with 8051 microcontroller

    I understand. Can you me the part number of the TS and 8051? Or you can post the data sheets.
    If not I can still post some suggestions.



  7. #7
    Junior Member level 1
    Points: 265, Level: 3

    Join Date
    Apr 2013
    Location
    BANGALORE
    Posts
    17
    Helped
    1 / 1
    Points
    265
    Level
    3

    Re: Touch screen interface with 8051 microcontroller

    P89LV51RD2: 8051 based CMOS controller with PCA, Dual DPTR, WDT,32 I/O lines, 3 Timers/Counters, 7 Interrupts/4 Priority Levels,64K Bytes ISP FLASH, 256 Bytes on-chip RAM, 768 Bytes XRAM
    TOUCHSCREEN: simple 4 Wire touchscreen of any mobile. you consider any standard size.. i just want to understand the logics.



+ Post New Thread
Please login