Author Topic: Any protocol for sending data from USB oscilloscope to PC ?  (Read 2508 times)

0 Members and 1 Guest are viewing this topic.

Offline jayfreeTopic starter

  • Newbie
  • Posts: 4
Any protocol for sending data from USB oscilloscope to PC ?
« on: March 22, 2014, 07:07:41 am »
I am designing an USB oscilloscope using my TI TIVA Launchpad. I want to send the ADC samples via USB to my PC. I have some doubts regarding sending data from micrccontroller to my PC.

1) Is there a protocol available for sending data from micrccontroller to PC ? For a logic analysers, I have seen a protocol(which uses UART) http://www.sump.org/projects/analyzer/protocol/
2) Is it enough to just send the samples from microcontroller to PC ? Or do I have to send the time stamps of each samples received along with the ADC value to the PC to accurately display on my PC ?
3) How is the timing accuracy achieved while displaying on the computer screen i.e how can we measure a signal timing parameters accurately ? I would like to get a good accuracy when I view on my PC.

How is the timing displayed in micro seconds time scale as shown in below image?

« Last Edit: March 22, 2014, 07:10:09 am by jayfree »
 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: es
Re: Any protocol for sending data from USB oscilloscope to PC ?
« Reply #1 on: March 22, 2014, 08:40:23 am »
That depends on your mode of operation. If you just sample at some not so high preselected rate then you can have very simple protocol like this:
Code: [Select]
send "start sampling" message
receive sample data continuously
send "stop sampling" message when you have "enough" data
flush the receiver to drop the tail data that had arrived while you were "cooking" your "stop sampling" message
You don't need any time stamps in this case - your timing is fixed, any Nth sample's time position is just N*sample_period - that's the case with LA you've posted: it samples at 24MHz continuously, so there is fixed 41.7ns step between samples.

You'll need some time stamps only if your sampling is not 100% periodic, i.e. "segmented" capture with long dead time elimination on scope's side.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf