Jump to content

DYLee

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by DYLee

  1. On 6/9/2023 at 8:49 PM, attila said:

    Yes, the device has one digital-out instrument which can be controlled by one software interface at a time, the others show busy status.

     So, is this mean if I assign custom buffers for different pattern interfaces and set them to be triggered by the same pin, only one interface in not-busy state will be triggered?

     

    On 6/9/2023 at 8:49 PM, attila said:

    Can't you reduce the SPI frequency, so the bit delays will be longer and consume less custom buffer ?

     I tried this but still, the buffer size is not enough for a x30 times pattern 1 then x30 times pattern 2.

     

    On 6/9/2023 at 8:49 PM, attila said:

    The wait function argument unit is second, 0.001 = 1ms

     With the additional delays per script line and, in my case, even more delay for Pattern2 to be ready?

  2. 12 hours ago, attila said:

    Hi @DYLee

    You should be able to send 15kbit of SPI data in one transfer when using device configuration with 16Ki Pattern buffer and the Delays are zero.
    With any delay, half of the buffer of bits, including the delay bit count.

    image.png

     

     Thanks for the reply but maybe my question was not clear.

     

     As @attila said, SPI protocol can send 16k bits length of data. However, what I have to do is send lots of SPI commands each consisting of 32-bit and precisely configure the interval between them. To do so, I'm using a pattern generator of AD2 as the figures below.

     

    2023-06-09091509.thumb.png.2c5f32f12f0c40326a4777121039b4a8.png

    2023-06-09092454.thumb.png.b10eb0d0b791e034cf492248cc3d8999.png

     

     As the interval between CS low edge (except between the first and second) should be an integer multiple of 40.96 microseconds in my application, I adjusted the clock frequency and inserted several bits between them and this is okay. And I want the first pattern comes 30 times repeatedly and then the second pattern comes. Repetition is done simply by setting the pattern generator's repeat count to 30. But it was not able to hardcode all the patterns in a 16k bits buffer, so I separated them.

     

    Quote

    Patterns1.single();

    wait('0.4096')

    Patterns2.single();

     

     The problem is that when I tried to run the application by the script above, the interval between pattern 1 and pattern 2 is not an integer multiple of 40.96 microseconds.

     Also, it seems that when I run a pattern generator, another one becomes a busy state. Is it okay?

  3.  Hi, I'm using AD2 to generate precise SPI commands for my application using Intan's RHS2216 IC.

     

     The IC is a sort of constant current source which on/off and polarity is controllable via SPI. And I use it to make two different patterns, one is a maximum-length sequence and another is a simple biphasic pulse.

     

     The problem is that the AD2 supports up to 16k bits pattern and my MLS pattern requires about 15k bits so I have to divide two patterns.

     

     It was able to store both patterns using two separate pattern generators in WaveForms 3.19.5, but it seems that a single run using the script gives me an unintended amount of delay between two patterns.


     I want the patterns to appear with a specific amount which is an integer multiple of my recording device's sampling period but how can I achieve this?

     

     I think the first possibility is manually adjust the delay between patterns with the wait() function but it jitters according to the PC's OS. Then, maybe the trigger can be used but is it work well even if the two pattern generators are sharing the same pin?

  4.  Hello,

     I'm trying the Waveforms program to implement my SPI application which will be used to control RHS2116 device. The requirements are 20~25MHz SPI clock, 32-bit length per word, modifiable microsecond resolution delays between words.

     Previously, I tried NI's USB-8452 and found they natively support 8-bit length SPI. It resulted in unintended delays during the transmission.

     I've heard that the AD2 or DD supports 32-bit length SPI, but it seems like the Waveforms program does not support the delay function with microsecond resolution.

     I tried something like wait(1e-6) but it was not able to validate whether it works as I intended with the simulated device.

     Is it able to control the delays between SPI transmissions (between SPI.Stop() and the next SPI.Start()) with a microsecond scale?

×
×
  • Create New...