fossasia / pslab-desktop

PSLab Desktop Application https://pslab.io
GNU General Public License v3.0
1.77k stars 364 forks source link

Increase frequency limit for square waveform generator #640

Closed bessman closed 3 years ago

bessman commented 4 years ago

The PSLab is capable of outputting PWM signals at frequencies up to 8 MHz. However, the GUI currently does not go above 5 kHz. The frequency slider in the waveform generator view should go to 8 MHz for square waves. It should still be limited to 5 kHz for analog waves.

partha2000 commented 4 years ago

@bessman Could you assign this issue to me? I can solve this issue. Thanks in advance.

cynthi8 commented 3 years ago

@bessman could you point to some documentation where 8MHz is the limit for the square wave generator?

From the code it looks like 10 MHz is the limit.

https://github.com/fossasia/pslab-python/blob/bbd18d18911e7bb6fa8430cfe0b287cd9517fa88/pslab/instrument/waveform_generator.py#L342

bessman commented 3 years ago

It's not really a hard limit at a specific frequency. The timing accuracy of the pulses starts to degrade above 1 MHz. So either 8 MHz or 10 MHz is fine as the software limit.