EspoTek / Labrador

EspoTek Labrador is a USB device that transforms your PC or smartphone into a fully-featured electronics lab. This repo holds all of the source code!
http://espotek.com
1.1k stars 116 forks source link

Zooming in too far causes scope to freeze, zooming out causes spikes #218

Closed JohnBaumb closed 2 years ago

JohnBaumb commented 2 years ago

Video demonstrating issue attached.

Zooming in with oscilloscope causes flatline and freeze, zooming out can cause spikes.

https://drive.google.com/file/d/1j9rQzuxbUxLQqH0x8CNRU2TLJT98TEYT/view?usp=sharing

EspoTek commented 2 years ago

Hi mate. This is a known quirk.

Long story short, there is a PGA on-chip that helps ensure you get the max dynamic gain. By default, the settings for this are linked to the visible range of the scope. If you zoom in or out enough to the point where there is a hardware dynamic range change, the software will try its best to scale the old data in the buffers to keep it valid, but this is not guaranteed.

If you hold the zoom at any one setting, you'll notice that all the new data coming in is valid. I'd recommend doing this when taking any real measurements - don't change the zoom like a madman! :P