This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSC2046: Problems with conversion and X/Y measurement

Part Number: TSC2046
Other Parts Discussed in Thread: MSP430G2955,

Good morning everybody!

I'm using TSC2046 with 128x64 Xiamen E-SHINE LCD display on a board whre there is MSP430G2955.

After many tests I noticed that 12bit conversion doesn't work (I always read 0) and 8 bit conversion has a strange set of values for X-Position and Y-Position.

#define               Y_POSITION     10010100b          // 12 bit 
#define               Z1_POSITION   10110100b          // 12 bit 
#define               Z2_POSITION   11000100b          // 12 bit
#define               X_POSITION     11010100b          // 12 bit
                  
                  
#define               Y_POSITION     10011000b          // 8 bit  
#define               Z1_POSITION   10111000b          // 8 bit  
#define               Z2_POSITION   11001000b          // 8 bit  
#define               X_POSITION     11011000b          // 8 bit  

Here there is a set of values read with a pen touching the screen:

  • No touch detect values

Y= 0

Z1=800

Z2=448

X=0

 

  • Higher Left Corner's touch values 

Y= 625

Z1=752

Z2=848

X=625

  •  Higher right corner's touch values

Y= 80

Z1=1008

Z2=848

X=80

 

  • Touch values in the lower right corner

Y= 65

Z1=1008

Z2=128

X=65

  • Touch values in the lower left corner

Y= 513

Z1=1008

Z2=112

X=513

 

  • In the center of the screen

Y= 434

Z1=1008

Z2=496

X=434

Is there someone who can explain me (better than the device datasheet) what I have to do in order to have the possibility to read X and Y coordinates of, for example, a point on the display?

Any help and advice would be really appreciated.

Best regards, 

Luigi

  • Hi Luigi,

    To your first point, if you're not getting valid readings you may be violating the required acquisition/settling time requirements between the ADC, touch screen, and any filtering/protection between the screen and the TSC device.

    We don't understand your second question about reading points on the display.

  • Hi Collin

    Regarding my first question, I don’t have any filter between the toutch screen  and TSC2046

    During the conversion I chech the bit Busy and when i slow I send a new data for convertion

    The system is the same for 8 and 12 Bit with 8 bit I have the reading but with 12bit didn’t.

    What I'm  wrong with 12 bit convertion? Is the same mechanism of the 8 bit 

     

     

    The second question is below there are the decoder command that I send for convertion

     

    This are 4 decoder command  for 12 bit convertion

    #define               Y_POSITION     10010100b          // 12 bit y position

    #define               Z1_POSITION   10110100b          // 12 bit z1 position

    #define               Z2_POSITION   11000100b          // 12 bit z2 position

    #define               X_POSITION     11010100b          // 12 bit x position

                     

    This are 4 decoder command  for 8 bit convertion

                   

    #define               Y_POSITION     10011000b          // 8 bit  y position

    #define               Z1_POSITION   10111000b          // 8 bit  z1 position

    #define               Z2_POSITION   11001000b          // 8 bit  z2 position

    #define               X_POSITION     11011000b          // 8 bit x position

     

    When i use the 12 bit convertion no dava value result into the register

    When I send the 8 bit data convertion I see the followings data value

    If aI dont’t  touch the screen I see this value

     Y= 0

    Z1=800

    Z2=448

    X=0

     

    Display toutch point  FIG1

    //            _______________________________

    //            |t1                                                                  t2|  

    //            |                                                                             |

    //            |                                                                            |

    //            |                                  t5                                         |

    //            |                                                                            |            

    //            |                                                                            |            

    //            |                                                                            |

    //            |t4__________________________           _t3|

     

     

    If I toutch the point t1 I see this value into the register

    Y= 625

    Z1=752

    Z2=848

    X=625

     

    If I toutch the point t2 I see this value into the register

    Y= 80

    Z1=1008

    Z2=848

    X=80

     

    If I toutch the point t3 I see this value into the register

    Y= 65

    Z1=1008

    Z2=128

    X=65

    If I toutch the point t4 I see this value into the register

     

    Y= 513

    Z1=1008

    Z2=112

    X=513

     

    If I toutch the point t5 I see this value into the register

    Y= 434

    Z1=1008

    Z2=496

    X=434

    Is there someone who can explain me (better than the device datasheet) what I have to do in order to have the possibility to read X and Y coordinates of, for example, a point on the display?

    Any help and advice would be really appreciated.

     

    I see that the value Xand Y have always the value equal from both

     

    Where I can find the right coordinate ?

  • Hi Luigi,

    It's looking like you may not be sending the correct commands to select the X and Y channels as they should not produce the same values at the different locations you've applied.  

    Could you try to set some breakpoints and then try individually reading the X and Y channels only?  The goal would be to see if there are possibly any issues with the commands you're sending to activate the X and Y drivers when you're trying to read from those respective channels. 

  • HI Colin

    thnak you for your suggestion, but I'm ready do it, if I set the TSC for 8 bit convertion have some effect but the reading are not repetitive and stable,

    my reference voltage is  3.3V of Vdd and maximum speed on the SPI is 120Khz  Don't have any noise and make sample of the reading.

    If I set 12Bit differential my system read Always 4095 and if I toutch the di display don't changing nothing.

    I checked the hardware and is correct. this component is very easy to use so I don't understand what happen. 

    now I try to send the first byte 2 time example 

    1) I send first command byte 10010001b for Y reading 

    2) after checking UCA0TXIFG,IFG2 and UCBUSY,UCA0STAT

    3) send again command byte 10010001b for Y 

    4) send 0 for reading 

    5) send 0 for reading last byte 

    in this case I reading somthing but X and Y have Always the same value 

    in all cases  8 bit or 12 bit X and Y have Always the same value, Z1 is different value

    when i toutch the screen example

    witouth toutch 

    y=0

    z1=2288

    z2=2175

    x=0

    after toutching 

    y=415

    z1=2416

    z2=2175

    x=415

    Best Rgards 

    Luigi 

     

      

  • Hi Colin 

    after new test, I think the TSc 2046 ework properly 

    I fix the problem us the followig.

    1) send first byte with comand byte 10010001b for Y

    2) second byte is Always comand byte 10010001b for Y or 0xFF or with bit msn to 1 example 0x80 

    only if I send 3 byte like on the top the TSC2046 give output the result and need to be test the following bit 

    BIT.B  UCA0TXIFG,IFG2,WAIT 
    BIT.B UCA0RXIFG,IFG2,WAIT 

    BIT.B UCBUSY,UCA0STAT,WAIT

    without toutch 

    Y=1926

    z1=0

    z2=2045

    x=441

    is correct ?

    the maximum frequency is 125Khz or is possible to go faster

    Best Regards

    Luigi  

  • Great, glad it's working now.

    Yes, 125kHz is the maximum frequency we will guarantee the datasheet specifications over.