Shop OBEX P1 Docs P2 Docs Learn Events
spi rate — Parallax Forums

spi rate

Ken267Ken267 Posts: 4
edited 2008-01-10 20:31 in Propeller 1
Im currently using one cog to perform spi transfer but the speed is too slow (this is written in assemble). Is it possible to use more then one cog to increase the speed?

Comments

  • OzStampOzStamp Posts: 377
    edited 2008-01-10 03:23
    Hi ken.

    Post the code and let us see what makes it slow..
    What rate are you after...

    Have you got the clk speed set to 80MZ xtal 1 + pll 16 xin freq 5MHZ that sort of stuff.
    Maybe your setup defaults to 12 MHZ ...? you can go possible 7 times quicker... (80MHZ)

    cheers ron mel oz
  • Ken267Ken267 Posts: 4
    edited 2008-01-10 03:28
    yes i got the clk speed set to 80mhz and pll at 16 xin. I want a speed between 10Mbps to 20Mbps but i dont think one cog has the power to do that
  • Stephen MoracoStephen Moraco Posts: 303
    edited 2008-01-10 05:40
    Hi Ken,

    If you have the time, my next couple of posts (my blog) are explaining what SPI performance I'm seeing in a project I'm working on and what I'm having to do to address these performance issues.· This "may" be of some help to you.

    See: http://propcandev.blogspot.com/

    Regards,
    Stephen, KZ0Q



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    ·
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-10 08:12
    Stphen
    I also shall eagerly wait for that!
    The standard way to fast output serial data is
    :loop
     MOVE  datacnt, #8
     RDBYTE  PHSA, dataptr
     SHL     PHSA, #32-8
     SHL     PHSA, #1
     SHL     PHSA, #1
     SHL     PHSA, #1
     SHL     PHSA, #1
     SHL     PHSA, #1
     SHL     PHSA, #1
     ADD     dataptr, #1
    DJNZ     datacnt, #:loop
    


    which gives you a througput of 8 bit/650 ns = 12 MBit/sec at n0minally 20 MBPS
    Input is the bottleneck and somewhat slower with one COG only

    Edit: As I typed this in a hurry... it had obviously to be #32 in the first shift, not #33. Still thinking in terms of "shifting out the carry smile.gif "

    Post Edited (deSilva) : 1/10/2008 10:25:49 PM GMT
  • Ken267Ken267 Posts: 4
    edited 2008-01-10 20:31
    thx , i'll look into that
Sign In or Register to comment.