­Hi All,

I'm planning to build a mechanism that takes samples from a decoder, and then 
inject them into a math channel. As far as I can tell, Sigrok assumes a 
constant sample rate. This is a problem, as the decoder doesn't generate a new 
output for each and every sample.  I see two options to solve this:

1) The decoder pushes copies of the last decoded value into the math channel at 
the system sample rate. This means a lot of samples in the math channel will 
have the same value, so this wastes RAM.
2) Implement a way to store both the sample, and the time the sample was taken 
in the math channel. This adds complexities, as that then requires a mechanic 
to fill in the missing samples for displaying or if the math channel is used as 
input for another math channel.

What's the best way forward? Keep the constant samplerate in the entire system, 
or build a system that can deal with different sample rates per channel, that 
are also non-constant? One advantage I see in the latter, is that such a system 
can support capturing from multiple input devices, each with their own, 
potentially also non-constant sample rate.

I would like this to exist, so I could use Sigrok to debug a system like this:
The system has a i2c temperature sensor, and a PWM output to a fan. In software 
there's a simple temperature controller, so the fan has to ramp up from 0-100% 
when the temperature goes from 25-50^C. I would like to calculate / decode the 
temperature, the actual PWM going into the fan, the expected PWM into the fan, 
and the difference between those PWM values using these decoders and math 
channels:

SCL + SDA between microcontroller and the LM75 temperature sensor
|
I2C filter
|
I2c decoder
|
LM75 decoder->temperature ^C
|
Math1 (measured temperature)

PWM output to the fan
|
PWM decoder -> Duty cycles
|
Math2 (measured PWM)

Math1
|
Expression:
If (Math1 > 50) output = 100
If Math1 < 25 output = 0
else output = (math0 - 25) *4
|
Math 3 (expected PWM)

Math 4=(Math3 - Math2) <= difference between expected and measured PWM

Kind regards,
Cedric





 

________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail & Cloud. 
https://www.eclipso.eu




_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to