Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI Multislave question

Status
Not open for further replies.

cbsirio

Member level 3
Member level 3
Joined
Jan 5, 2003
Messages
64
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
721
spi multislave

Hi all,
I am working on a DSP56F805 wich have a SPI port.
I am trying to connect 2 external DACs and an external EEprom with SPI protocol, wich is embedded on the DSP.

I am not very familiar with SPI protocol, and in the datasheets of DSP/DAC/EEPROM there insn't so much information on about connect it and use it.

Someone can help me, please?

Is it possible to connect 3 peripheral with only 3 wire? (MISO MOSI CLOCK) ? I have read about daisy-chaining the peripherals: is it possible with etherogeneous peripherals?

How can I set/read the correct thing from the correct slave?

Thank you!

Sirio
 

Normally you have to use the Chip Select (CS) pin to distinguish which slave to select. If you have enough pins to spare, you can use one pin per device. Otherwise you can use a decoder to do that.
 

cbsirio,

I don't think you can do what you are trying.

SPI uses 3 bus lines shared between all devices, and an enable for each (slave)chip on the bus. Multiplexing the devices is done by enabling one chip at a time.
So to have 3 slaves you would need the three default lines plus three enable lines, making 6 pins in total.
The only time you don't need the enable line is when you only have one (slave)device so you can tie it low (allways enabled).

Hope that helps.

Maui
 

cbsirio

Actually I was wrong.
Apparantly you can configure the SPI devices in a daisy-chain, as long as the devices have a (SO) line.

**broken link removed**

Maui
 

Hi techie,
my problem is just to not use more than 3 wires.

Hi maui,
Yes, this is exactly what I was seaching for. :)

Do you have already used on your projects, or it's all to try?

Thank you all, and best regards.

Sirio.
 

As SPI is basically four wire system
1. MISO(master in slave out) 2. MOSI (Master out slave in) 3. CLK 4. Chip Select

for interfacing multiple devices on a single master multiple slave u need to select devices using chip select as per ur requirement.

u can also do using changing baud rate only if there baud rate are fixed and differeent from each other.
Baljeet
 

Hi Baljeet,

The article on circuitcellar shows how to daisy-chaining multiple devices with 3 wires.
Have you tried this mode?
I am pretty novice in SPI, but this solution looks like a good trick... Do you agree?

Best regards.

Sirio
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top