Electronic – the best USB transfer type (bulk, interrupt, Isochronous Transfers) to be used for implementing a USB oscilloscope

oscilloscopeusb

I want to build a USB oscilloscope. I was reading about different USB transfer types. Which transfer type is best to transfer the collected ADC samples from a USB oscilloscope to a PC?

Below are a few of my findings. Please correct me and also it would be good if anyone could suggest a good transfer type.

  1. Isochronous transfer – Possible loss of data. Not good for an oscilloscope since each data item is valuable. How much data could be lost?
  2. Interrupt mode – I have no idea if it would flood the USB connection
  3. Bulk mode – Seems the best to me since no loss of data
  4. Control transfer – not suitable since it is not meant for transfering data

Best Answer

Bulk transfers do not lose data, but they have no guaranteed minimum bandwidth. (On the other hand, they can reach higher speeds, because they are able to use all the bandwidth not actually used by any other transfers.)

What happens when your oscilloscope's data transfers are delayed (either because of errors, or because of other devices), and new data is piling up? Do you stop the device until the old data is transmitted, or do you throw away the old data to be able to transmit the current data?

Isochronous transfers are designed for 'real-time' data. You get no choice about the error handling, but your bandwidth is reserved on the bus.

  • If you want to display the recorded data in real time, you should use isochronous transfers.
  • If you want to transfer the recorded data to the PC after the measurements have finished, you should use bulk transfers.