PDA

View Full Version : spi rate



Ken267
01-10-2008, 10:01 AM
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?

OzStamp
01-10-2008, 10:23 AM
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

Ken267
01-10-2008, 10:28 AM
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 Moraco
01-10-2008, 12:40 PM
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



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



deSilva
01-10-2008, 03:12 PM
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 http://forums.parallax.com/images/smilies/smile.gif "

Post Edited (deSilva) : 1/10/2008 10:25:49 PM GMT

Ken267
01-11-2008, 03:31 AM
thx , i'll look into that