Jump to content
  • 0

Protocol SPI 3-wire Read0


Ola

Question

Hi, I have an AD3 and want to read a 3-wire SPI. There is a fault in the SPI "Read0" when you use the "Command (DQ0) first. The "DQ0" stay's driven High instead of "High ohmic". I have tried without "Command (DQ0)" and just read at "DQ0" and then it is "High ohmic". Could somebody at Digilent fix this error so I can send a "Command (DQ0)" first and then do Read0?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I have one more question. When doing Custom script, Is there a command that does the "Command (DQ0)+Read0" or "Command (DQ0) + Write" in one command. It is to slow to do this with:

Start();

Write(8, 0x10 ); // Write Reg1 10 :enable DAC

Read0(16, 1);

Stop();

I would like to have one command for this, or set it in a buffer to send many command's. I need to do a quick "chip select" in between each command? The communication with USB latency is to slow.

Regards, Ola

Link to comment
Share on other sites

  • 0

Hi @Ola

The Write/CmdWrite only writes to D0, like:
CmdWrite(8, 0x10, 0, 16, [0x0001]); // write 0x0001 to register 0x10
and for Read0
CmdRead0(8, 0x10, 0, 16, 1); // read one 16bit word from register 0x10

The read/write functions activate CS during the transfer with hardware timing.
You can also use the Start/Stop functions for software CS control but this will take more time (like +1 millisecond) and this is also reflected in CS edge to bit transfer timing.

image.png

Link to comment
Share on other sites

  • 0

Thanks for the answer, I think I was looking for your "CmdRead0" explanation. This will speed up the transfer:) I will look into the "Sensor" tab a little bit more. I think I could have a huge speed up here.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...