Interfacing AR1020 over SPI

Author
baskaranindia
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2009/08/05 22:46:59
  • Location: 0
  • Status: offline
2009/08/05 22:51:16 (permalink)
0

Interfacing AR1020 over SPI

I am eveluating AR1020 for my project. I am not able to find the rate at which it has to be interfaced over SPI. Can you give this info.?
#1

5 Replies Related Threads

    rotava
    Starting Member
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2009/05/29 07:34:50
    • Location: 0
    • Status: offline
    RE: Interfacing AR1020 over SPI 2009/08/14 11:00:31 (permalink)
    0
    From wikipedia about SPI communication:
    "To begin a communication, the master first configures the clock, using a frequency less than or equal to the maximum frequency the slave device supports. Such frequencies are commonly in the range of 1-70 MHz."

    You don't have to specify a data rate in SPI, because it's synchronous.

    If I'm wrong please forgive me.


    Lucas
    #2
    DarioG
    leaving this planet
    • Total Posts : 53071
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    RE: Interfacing AR1020 over SPI 2009/08/17 05:08:23 (permalink)
    0
    No, that's correct Smile

    Maximum speed is usually in the datasheet, and usually there's no minimum speed.

    Dario Greggio
    --
    how does it feel, never having been loved? as life fades away, day after day, on this planet made of s h i t...

    #3
    etillol
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2006/11/30 08:46:58
    • Location: France
    • Status: offline
    RE: Interfacing AR1020 over SPI 2011/01/04 02:31:07 (permalink)
    0
    Hello,
    Did you success in communicating with the AR1020 in SPI mode?
    I cannot have a SPI response to any command I send from my microcontroller (enable or disable touch panel).
    Is there some documentation with initialization sequence and/or data flow and chronogram?
    My main problem is that I cannot see the SIQ pin toggling when I send a command (this pin doesn't toggle neither when I press the screen) as if the ar1020 controller doesn't enable SPI communication.
    I'm looking at the winCE spi demo and I'm having difficulties to understand what I'm missing.
    So if anybody have logic analyzer printscreen I would really appreciate!
    Thanks.
    #4
    etillol
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2006/11/30 08:46:58
    • Location: France
    • Status: offline
    RE: Interfacing AR1020 over SPI 2011/01/12 10:03:17 (permalink)
    0
    Hello,
    I finally successed to interface this AR1020 in spi mode.
    There is an important thing to note: there must be a inter-byte delay of 50µs (at least) to communicate with spi bus (DS93063A-page 4).
    A great document for that is the pdf: TB3063 SPI Communication with the AR1020 Controller.
    My spi clock is set to 625kHz (cf. attached chronogram).
    Enjoy!

    Attached Image(s)

    #5
    triaxcaribdis
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2006/12/03 06:36:35
    • Location: 0
    • Status: offline
    RE: Interfacing AR1020 over SPI 2015/07/06 04:30:53 (permalink)
    0 (1)
    I've been having some issues interfacing with the AR1020/21 via the SPI bus which both the net and the datasheet haven't been useful in providing an answer. I know this is an old thread but it kept coming up in searches and I thought I'd leave my solution here just in case anyone else is frustrated.
     
    I found the 50us interbyte delay should only be implemented on writes, not on the SIQ triggered pen/x/y payload reads. Also the AR1020 needs a slow bus operating in SPI mode 0,1 rather than the standard 0,0 or 1,1 modes you'd expect:
     
                SPI1CON1bits.CKE = 0;              //Mode 0,1 for AR1021
                SPI1CON1bits.CKP = 0;
                SPI1CON1bits.SPRE = 0b010;     //16MHz FCY, ~42KHz SPI baud
                SPI1CON1bits.PPRE = 0b00;
     
    Hope that helps someone!
    post edited by triaxcaribdis - 2015/07/06 04:36:21
    #6
    Jump to:
    © 2017 APG vNext Commercial Version 4.5