dmk
Full Member level 3
Yes, this is much clear, except that you cannot make reset=1 from inside the code - reset is input and you can only read it. That is why I included the output signal steady - it goes to 1 when the input value is lower than pick value several times and stops the circuit. Now, if you make reset=1 and 0 the circuit will start again (you can connect reset and steady outside the chip).