I am building a circuit which will sample an analog signal in order to apply some digital signal processing through matlab. I have an external ADC for the sampling which communicates with an arduino DUE through SPI and then the arduino sends the samples to matlab through SerialUSB.
The problem is that by using a usb the sampling frequency is not constant as there is a delay each time I send samples where I can't obtain new samples. Is there any way to make the communication between matlab and arduino independent of the communication between ADC and arduino in order to sample at a constant rate? I thought that a DMA may do the job but I don't have used one before.