I have been playing around with AD5370 through various methods, and I simply cannot get a high-performance throughput from it. What I mean is the time taken to update a voltage on the DAC output pin. Through various experiments via various approaches, I find that the eval board's chip can only update about at a rate of one per millisecond. I have used three methods.
- EVAL boards onboard cypress USB chip with CYUSB (AD) provided driver (1.13 ms)
- EVAL boards onboard cypress USB chip with LIBUSB drivers (open source)(0.95 ms)
- Direct SPI communication using Raspberry Pi 3 - with 50 Mhz SPI clock (~1ms)
From what I understand from the chip description, the chip supports SPI up to 50Mhz, or 50 million bits per second, each word that is sent across is 24 bits long (8bit address + 16-bit data),
SPI max speed = 50 Mhz
SPI max bit rate = 50 million bps
SPI word length = 24 bits
SPI max words per second = 50 million / 24 or 2.083 million words per second
Number of channels on board = 40
Let us assume a parallel update to all 40 channels at a time, or the registers are blocked with others are written to.
=> 2.083 M / 40 per channel, or 52.083 Khz, which means the best timing I should get is 1/52083 or 0.0000192 seconds, or 0.019 ms or 19 microseconds or 19200 nanoseconds
As per the datasheet, the performance of register updates rates is, in three stages, first two takes 600 ns, the third stage takes 300 ns, almost a total of 900ns, let's give it a 4x time benefit. And round generously, we get one update every ~4000 ns, which is far lower than the SPI speed capacity.
So as per the register update rates, we should get ~5000ns per new sample (with generous allowances) and ~20000 nanoseconds per SPI speed limits, which is about 0.02 milliseconds. My results are off by a factor of 50. Either there is something seriously wrong in my math or my approach.
- Can you help me figure out what's wrong in my math, or my method?
- I have tested by using an oscilloscope that can support up to 60 MHz, (Tektronix TBS1064) with a raspberry pi 3 (with reduced SPI speed of 50 Mhz)
- You can see the SCLK is working at about 20-25 ns (LEFT image)
- You can see the Vo Output is at-best at one millisecond (RIGHT IMAGE)
- Output pulse width is about 2x 500 microsecond or ~1ms
- I am cycling two voltage values here.
- What are my options here...
Any help guidance and thoughts would be deeply appreciated.