CMM2 Oscilloscope fun


Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6546
Posted: 03:55am 25 Jul 2020      

  Quote  How much time does it take to sample the input ?

That's up to you.
Assuming you want to fill a 800x600 screen, take 800 samples at a time.
The ADC will take the 800 samples in the background then swap to the second array.
While the ADC is sampling one array, your program displays the other array of data.

If you sample at 100kHz, the 800 samples takes 800*1/100000 = 8mS
That's how far behind your display will be.
Every 8mS, you swap arrays so that the 'other one' gets displayed.

If you want to display mains frequency, sampling at 10kHz will give 80 mS or 4 and a bit of your cycles.
You would probably want to use the trigger so the waveform is steady.

Jim