This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multiple slaves in SPI configuration

Hi all,

This is the first time I've ever played with any microcontroller, and I'm stuck. The goal is to take my processor (I have an ADuC7026 eval board) and expand it with two external chips. I want to interface both, a better set of DACs to it as well as a DDS chip. For these expansions, I made sure to choose chips that are SPI compatible. For now, the question is where do I go from here? Snooping around, at first, I thought I would have to daisy-chain these devices, but it seems like that would be harder to deal with in code. However, it seems like I would be able to use a GPIO pin as a second chip select allowing for two independent slave selects. Is this true? And how would I go about assigning this functionality to a GPIO pin? I'd really appreciate any advice. Thanks in advance.

-Larry

Parents
  • Thank you very much for that. That's actually very helpful. Firstly (from what I learned just this week), a DDS is a direct digital synthesis. It's just a function generator. I believe, you just tell it what kind of wave you want, and then let it run. It'll then output an oscillation until you tell it to stop. This way, you free the main processor from the need to constantly be writing to a DAC.

    Now, if I understand what you've said correctly, all the slave select input on each slave is looking for is a high signal? And in my GPIO out, I'm just telling the corresponding pin in software to go high? It's like I'm passing a baton around permitting one slave at a time to talk/listen to the master... That seems fairly straight forward to code. This sounds much easier than trying to daisy chain them. Thanks so much!

Reply
  • Thank you very much for that. That's actually very helpful. Firstly (from what I learned just this week), a DDS is a direct digital synthesis. It's just a function generator. I believe, you just tell it what kind of wave you want, and then let it run. It'll then output an oscillation until you tell it to stop. This way, you free the main processor from the need to constantly be writing to a DAC.

    Now, if I understand what you've said correctly, all the slave select input on each slave is looking for is a high signal? And in my GPIO out, I'm just telling the corresponding pin in software to go high? It's like I'm passing a baton around permitting one slave at a time to talk/listen to the master... That seems fairly straight forward to code. This sounds much easier than trying to daisy chain them. Thanks so much!

Children