Connect with us

AR1021 Touch Controller, I2C problem?

Discussion in 'Microcontrollers, Programming and IoT' started by Divedeep, Nov 4, 2014.

Scroll to continue with content
  1. Divedeep

    Divedeep

    57
    0
    Feb 2, 2014
    Hi,

    I was wondering if i might be able to get some help, advice??

    I am working with an AR1021 chip, connected to a 4 wire resistive touch panel.
    Communication via I2C.

    I am able to read the data from the chip when a touch event occours and the data appears to be valid. The coordinates are pretty much exactly what i would expect from touching the screen.
    Based on this i would say that its fair to assume that the I2C bus is working exactly as it should and sending and receiving the data that it should.

    Now, when i send the enable touch command it gets a bit wierd.

    The response that the controller gives is not exactly how the datasheet specifies. From an Enable command we would expect to see a response of <0x55><0x02><Response><0x12> as per the datasheet. <Response> in my case should be 0x00. Instead i receive 0x55,0x19,0x05,0x12.
    As you can see the first and last byte are returned correctly, the second and third are however incorrect. We get this reply when executing the disable command also with the exception of the last byte being 0x13 as expected.

    As the first and last byte are being received correctly im wondering if the controller is faulty. Or if i am missing something, If i am i cant seem to find what it is.

    After all this this command issued is correctly received as i am able to actually enable and disable the touchscreen as intended. this makes this particular problem al the more puzzling to me.

    My circuit is currently set up as per the schematic on page 11 of the datasheet. It is set up on a breadboard and the ic itself is soldered to a breakout board. I cant see this making much difference but i though i would put it out there.

    The only exception to to the main schematic would be the 20K resistor, i didnt have a 20K handy so i used a 22K. Would this cause any issues?? Again i can see how it would affect return data from the I2C bus.

    Here is a link to the datasheet:

    http://ww1.microchip.com/downloads/en/DeviceDoc/41393B.pdf



    Thanks in advance
     
    Last edited: Nov 4, 2014
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,521
    2,654
    Nov 17, 2011
    I don't think so. A 10% higher pull-up resistance should be within the normal tolerances.

    You do have the pull-up (2k...10K) necessayr for I²C operation on SDA in place, do you?

    Can you check the timing (clock versus data) on the I²C bus e.g. using an oscilloscope?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-