SPI question

Technical questions regarding the XTC tools and programming with XMOS.
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

SPI question

Post by narutoxela »

hi everyone, i was wondering if it was possible to have an spi interface with a 30MHz SCLK? I will be using thist to controll TLC5940's by texas instruments @ 30MHz


User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

30MHz should be possible.. I've been there i believe.
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

Bianco wrote:30MHz should be possible.. I've been there i believe.
great to know! thanks! But how can you acheive this?...
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Using buffered ports would be recommended.
You problably also want to take a look at the XMOS SPI module
http://www.xmos.com/applications/module/spi?ver=all
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

Bianco wrote:Using buffered ports would be recommended.
You problably also want to take a look at the XMOS SPI module
http://www.xmos.com/applications/module/spi?ver=all
thank you but i am already using the SPI module but i cant figure out the divider value to make it 30MHz...
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

Well i finaly got it... it was all in the .xn file...


ReferenceFrequency 120MHz

and a divider of 2 (120MHz (ref clock) / (2 x 2 (divider))) = 30MHz