Jump to content
  • 0

AD2 SPI by VB


Takemasa Tamanuki

Question

I am trying to make a AD2 SPI control program by VB.

I have referred some comments on this site but I can not solve that.

Could you provide some comment for this issue?

(or If you can provide me any reference SPI VB-project-program, it is very helpful for me. I will try to custom it for my use.)

Thanks,

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Hi, Attila_san,

Thank you very much for your comments.

Finally, the “Digital_Spi.py” works in my setup with AD2 successfully.

One more question, regarding the Clock-Frequency.

My setup does not work more than 10MHz (it works at 10MHz, but not work at 11MHz and more) on the “Digital_Spi.py”.

(My setup also does not work more than 10MHz on the waveform-application.)

Can my setup work at 50Mz with AD2 by optimizing the clock-circuit of my setup?

Link to comment
Share on other sites

Hi @Takemasa Tamanuki

The maximum frequency depends on the IC rating and circuit setup.
The signals also have to pass through the AD2 DIO protection:
https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual#digital_io

For instance the ID of PMod SF2 P2Q PCM Flash is read correctly even at 50MHz.
https://reference.digilentinc.com/reference/pmod/pmodsf2/start

image.png.52efadc1ebdf72b0b068196f3a213081.png

image.thumb.png.9f0cec4a051f837e2b4f47108a7bd609.png

Link to comment
Share on other sites

Thanks for your detail comments.

Also, please let me know the setting parameter on the dwf.FDwfDigitalSpiModeSet(hdwf, c_int(0))

Is it related to the “Polarity” and/or “Phase”?

“Polarity=0, Phase=1” are required specification of my DAC.

(Setting with “0” on the ModeSet looks better than that of “1” for my DAC. Am I right?)

Link to comment
Share on other sites

Hi, Attila_san,

Many thanks for your advice.

> “Polarity=0, Phase=1” are required specification of my DAC.

> (Setting with “0” on the ModeSet looks better than that of “1” for my DAC. Am I right?)

In my DAC (“Polarity=0, Phase=1”) case, I understand the iMode setting should be “1”.

(I will re-check the DAC-datasheet if “Polarity=0, Phase=1” is correct as well.)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...