Jump to content
  • 0

Digital Discovery reconfigure multiple SPI by script?


Etienne

Question

Hello,

I'm a new user of the digital discovery, which already helped my a lot, but now I'm stuck. In my application I first have to configure a DDS by sending few words by SPI to it, and then I have to read an ADC by SPI. These two devices have separate SPI bus.

The DDS is connected like this: nCS = DIO34, SCLK = DIO33, MOSI = DIO35
The ADC is connected like this: nCS = DIO31, SCLK = DIO30, MISO = DIO29

Is there a way by script to first write to the DDS, then reconfigure the SPI protocol pins to connect to the ADC and then read it?

Thanks in advance.
Best regards
Etienne

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

For my application, I also have to change the SPI mode. Referring to the help, I add the line <<"Protocol.SPI.Active.text = "Low">>, but it gives me an error: "Result of expression 'Protocol.SPI.Active' [undefined] is not an object." I didn't find any reference for the spi clock setting in the help.

How can I change the chip select active state and the polarity, phase and frequency of the spi clock through script?

Thanks in advance,
Kind regards
Etienne

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...