Pages: [1]   Go Down
Author Topic: Can Arduino Due enable two SPI interface at the same time (different in all pin)  (Read 837 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I am try to check the possibility to enable two SPI interfaces at the time, no just two different CS pin, and sharing the MOSI, MISO and SCK.

The reason that I want to do these, is required by the following conditions.
 Both of those two device need at least 12 MHz clock (One for 12 MHz and one for 16 MHz), the data rate is over 2Mbps, I doubt the possibility to share 1 SPI interface with little delay;

From the datasheet, AT91SAM3X8E should be able to support more than 1 SPI interface.
I hope some one would give me some information about SPI interface with details, links to example is appreciated.

Thanks a lot
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, SPI will support multiple chips.  You need to define a chip select for each chip.  Select the chip, run the SPI, deselect the chip, repeat for next chip.  See: http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus



David

Logged

Dr. David Harris
OpenLCB Dev Team

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The reason that I want to do these, is required by the following conditions.
 Both of those two device need at least 12 MHz clock (One for 12 MHz and one for 16 MHz), the data rate is over 2Mbps, I doubt the possibility to share 1 SPI interface with little delay;

Are you sure those clock speed specification are not up to that maximum speed, not a minimum speed requirement? I think a link to the actual SPI devices might be useful to give you the best possible answers.

Lefty

Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2479
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thought I have not tested it the Due can configure different clock divider values to CS pins so you can still use a single MISO, MOSI & CLK but the CS pin defines the clock for that chip http://arduino.cc/en/Reference/DueExtendedSPI
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Pages: [1]   Go Up
Jump to: