I have a digital, single-ended, signal that randomly varies between +400mV (logical ‘1’) and 0V (logical ‘0’). I am looking for a circuit to calculate the DC value that corresponds to the average between the maximum value of the signal (400mV) and the minimum value of the signal (0V). So in this case, 200mV. Please note that this does not necessarily correspond to the mean of the signal, because if there is a sequence of consecutive ‘1’s, the mean will be higher than 200mV and if there is a sequence of consecutive ‘0’s, the mean will be lower than 200mV. I am looking for a simple circuit that will output 200mV all the time.
Is this possible ?
My circuit needs to consume as little as possible, so I’d prefer it be implemented using only passive components ...
I don’t know whether this is possible. Do you have any ideas ?