epsi1on / RpiPicoOsciloscope

A simple fast osciloscope with WPF and C# for RPI PICO with 500Ksps rate
0 stars 0 forks source link

Edge Detection #2

Open epsi1on opened 1 year ago

epsi1on commented 1 year ago

continue from issue

FilipDominec commented 1 year ago
  1. Edge detection is needed.
  2. Will address this after the next week.
epsi1on commented 1 year ago
  1. Edge detection is needed.

    1. Will address this after the next week.

Hi, Thanks. i did also some dummy edge detection which works more or less, it is buggy. You can download binary of POC version which works on the windows from here: POC Release

The channel mask is 0x01 so probe is connected to GPIO26 i think.

FilipDominec commented 12 months ago

The edge detection was implemented in the firmware, namely by a fast interrupt with low jitter. (commit 5d9e329)

Original free-running waveforms from some low-pass filter: Figure_1

New feature: all wforms synchronously triggered with the input signal: Figure_2

And finally, with code like

rp.adc(channel_mask=sum(2**ch for ch in channels), 
        blocksize=1000*len(channels), 
        blocks_to_send=10, 
        clkdiv=int(48000//kSPS_per_ch), 
        trigger_gpio=1,                              ## <--------------- 
        trigger_on_falling_edge=1,                  ## <--------------- 
        _callback=ADC_callback)

... one can also trigger ADC block on the falling edge as well:

Figure_4

epsi1on commented 11 months ago

wonderful feature, I was thinking of edge detection as different thing which will help me to show harmonic signal, but it seems kind of impact detection, or capturing on trigger... Cool anyways, I think i would add the feature to the osciloscope app. (it would be nice)