Analoge samples (by Gurt)
Hi all,
I want to take an analoge sample for a "x"periode of time and store this value, take another sample for a "y" periode of time and compare this with the previous value,
Can anyone help me with this?
Thanks in advance
Gurt
(no subject) (by Jonathan Westhues)
What do you mean by an "analog sample for a period of time"? Do you mean the average value over that time? If yes, then you could just take many A/D samples over that time, and sum them up in software.
(no subject) (by Gurt)
Hi, I want to take every ten seconds a analog sample for 3 minutes, store the lowest value (VALUA A), take every ten seconds another sample for 3 minutes, store the lowest value (VALUE B) and compare this with the previous value
Thanks again
(no subject) (by Jonathan Westhues)
The attached program might do what you want. The internal relay Rosc_10s toggles every ten seconds, and we sample the A/D (and update our minimum, if the sampled value is less than the minimum) on each rising edge.
That relay also clocks a counter, with period of 36 counts; so the counter period is 360 s, or six minutes. At the three minute mark, and at the six minute mark, we record the values of that minimum, as val_A and val_B.