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.

TSC2046E: Can't get data out from touch controller

Part Number: TSC2046E
Other Parts Discussed in Thread: TSC2046

I'm using this touch controller in a 3.5" lcd design.  I'm able to write to the controller but I'm not getting any data out.  My signal analyzer shows the BUSY signal responding but it does not appear to be lined up to where it should be, right after the PD1 and PD0 bits.

Please see the attached jpeg of my communication signal.  The SPI_MISO line is always high.

Thanks

  • Hello Robert,

    It looks as though your DCLK needs to be inverted. BUSY signal should be latched to the falling edge of DCLK on the last bit of DIN

    In the capture you sent, you can see that after the last bit of DIN, the DCLK goes high instead of low. This causes BUSY signal to be latched when the DCLK starts clocking data again.

    Regards,

    Aaron

  • Thanks Aaron!

    That aligned the busy signal but I'm still not getting data out.  See the waveform.  I'm writing 0x98 to the controller in the hopes to measure the y+ value on a touch.

  • Hi Aaron,

    This partially resolved my issue in that the communications are inline with specs but I'm not getting any data back.  If I want to measure Y+ am I interrogating the TSC2046E properly when I write 0x98 to the controller?

    Thanks

  • Hello Robert,

    I would expect some data at the output by writing 0x98. Can you send a picture of your schematic so I can take a look?

    Regards,

    Aaron

  • Page 2 is the micro

    Page 4 is the TSC2046A

  • Here's some new information:

    With my code running and my display showing what I programmed it to do I measured the voltage on the Y+:

    Without touching the display:

    Y+ = 0.000V

    X+ = 3.27V

    No matter where I touch the display:

    Y+ = 0.009-0.015V AND when I stop touching the display Y+ = 1.27V AND I have to pause my code for Y+ to go back to 0.000V

    X+ = 0.015V-0.050V AND when I stop touching the display X+ = 2.27V AND I have to pause my code for Y+ to go back to 3.27V

    I'll include my code if the answer isn't glaring and you wish.

    Thanks

  • Is there a way to attach my formatted code?

  • Hello Robert, 

    Unfortunately, we do not support any code debug/modification. I would suggest looking online for code references for these devices. 

    Another thing I want to suggest is that the device requires 24 DCLK cycles (3 sets of 8). You can see in the timing diagram above that data is still being sent out during the third set. Looking at your timing, I see that you are also writing during this time. I would take a look at this. 

    Regards,

    Aaron

  • Hello Robert,

    I was misinformed in my previous post.

    16 clock cycles can in fact be used and I would also expect to see some type of data on DOUT. Since you are not using an external reference. Can you try and used PD0 and PD1 = 1? This will insure that the ADC and internal reference are on. I would write 0x9B to the device. 

    Regards,

    Aaron

  • Hi Aaron,

    So I'm not so sure the problem is with the controller; I'm actually fairly certain it's not.  This is a new prototype circuit board.  I removed the TSC2046 and the MISO pin is still high.  I'm using a microchip 8 bit pic so I changed my code to make that  signal an output and drive that line low just to verify it isn't stuck high (although it is not shorted to anything on the board).

    Long story short when I try to drive that line low (with nothing connected to it) it's only going down to 1.57V.  It's either micro configuration or hardware (board) related.

    At this point you can take a collective breath and I'll update you when I nail this down.

    I appreciate your support and patience.

    Thanks,

    Rob

  • Hi Aaron,

    As I suspected it was NOT the TSC2046!  I looked at the layout and the schematic and realized the TSC2046 is not the only IC on the SPI_MISO line.  I have a line receiver on the same line because I'm communicating with another circuit board and that receiver drives the SPI_MISO high when there's no signal so the change is to put a tri-state buffer between the line receiver and the SPI_MISO signal.

    I will confirm this tomorrow when I remove the receiver.  I'll also be able to verify the TSC2046 sends location information.

    Thanks

  • Hi Rob,

    Good to hear you seem to be getting closer to a solution!

    Feel free to post your solution if found. For the time being, I am going to mark this as "TI Thinks Resolved" and close the thread. A reply will re-open the thread.

    Regards,

    Aaron

  • Hi Aaron,

    He's baaaaaaaaack.......

    So in the interim I have verified that my touch display works properly. 

    With the display not plugged in to anything I put 3.3V to Y+ and GND to Y- and measured between 3.0V - 0.3V on X+ depending on where I touch the display.

    Then, I put 3.3V to X+ and GND to X- and measured between 3.0V - 0.3V on Y+ depending on where I touch the display.

    See the logic analyzer below.  Though it says 0x3A 0x00 the first touch at the top of Y read 0x3A 0x80 (this plot shows touching the display at the bottom of the display).  If Y+ measures 3.0V I would have expected something around 0xE5 so I'm not sure what 0x3A is representing.

    My problem is that I do not get another PEN_IRQ after the first touch.  I don't believe it's my code.  I reset the interrupt flag and after reading the Y position I enable the interrupt.  From what I can tell writing 0x9B should measure Y in differential mode. 

     Does this plot make sense to you?

  • Hello Robert,

    Welcome back!

    It looks like you are setting bits PD1 and PD0 to 1 which is disabling PENIRQ. In your previous posts, you were writing 0x98 which was enabling PENIRQ. Why the change in these bits?

    Regards,

    Aaron

  • Hi Aaron,

    Did my issue of the TSC2046E get closed?  I added more information but I don't see it.

    Thank,

    Rob

  • I just saw this.  Let me get back to you.  I have to check the PD1 and PD0 table.

  • I made my code send 0x98 to measure Y.  When I touch the screen I get a pen_irq.  My problem is that after I read the Y value (see attached) I keep interrupting.  I'm pretty sure I clear the interrupt.  The pen_irq line measures high too so I suspect it is not clearing the interrupt but I figured I'd show you the problem anyway.