Latch a zero for a set period of time?
Desired block:
As long as input is nonzero, output should be 1.
When input is 0, even for 1 sample, output changes to 0 and stays at zero for n samples. Even if input becomes nonzero again, the output stays latched.
Any cheap simple way to do this?
Something involving a timer and feedback to keep its input from resetting until it outputs 1? something with a peak hold? (though that adds 19 MIPS)
Hi,
You could try the setup shown below, although it may not be as economical as desired. It creates a half-second pulse each time SW4 is pressed (the GP input goes to zero):
Best regards,
Bob
Uh, I just realized the Timer object already does exactly what I want. It outputs 1 until the input goes to zero, then outputs zero for as long as the input is zero, then when the input goes back to nonzero, the output stays zero for a set time before rising to 1 again.
However when the DSP turns on, the Timer is triggered for the same amount of time as when the input is changed, which I'd like to either prevent or shorten. I tried to shorten it but I got a weird feedback bug: Strange bug with timer and oneshot
Know any way to get rid of the turn-on trigger?
Here's a solution that suppresses the first pulse, but it's still happening, which prevents faults from being handled during the first x minutes:
Is there a way to get the Timer to not do this first pulse on turn-on?
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.





