ΣSigmaStudio Ask AI Русский Log in

Timer with ADAU1701

SigmaDSP & SigmaStudio piero Sep 17, 2017 00:00 2 replies Original on forum ↗
Subscribe
piero Question
Sep 17, 2017 00:00

I need to make a timer with ADAU1701 that can do this:
If an S6 button is pressed and released briefly, nothing has to happen, but if the
same button is held down for 2 seconds, I turn on the red MP11 led.
In this condition, pressing and releasing S6 briefly does not have to happen, but
if I hold down S6 again for 2 seconds, the red MP11 LED goes off.

Audio Signal Processors

timers

sigmastudio

SigmaDSP Audio Processors

adau1701

piero Reply
Sep 17, 2017 00:00

Thanks Bob, you are always very kind.
It's perfect, I do not have to do any Work-Back so there are not
problems.
Thank you again
Piero

KJBob Reply
Sep 17, 2017 00:00

Hello piero.

About the easiest way is to use the Toggle ON-OFF block under GPIO Conditioning / PushButton. It only needs a Timer with External Reset to provide the two-second delay when the button S6 is pressed and its signal at MP9 goes low (set MP9 in Hardware Config / Registers to Invert.

With a working Write-Back trigger in hardware, this implementation would remember its state over power cycles. The ADAU1701MINIZ eval board's Write-Back trigger doesn't work so you won't see this behavior there. As a result -- if you're planning on implementing a working Write-Back trigger in your final hardware, the state memory may become either a fault or a feature. If not desired, we'll need to come up with something different.

Best regards,

Bob

a7d8184c487b82b9afa8576f5beae6d4.png
a7d8184c487b82b9afa8576f5beae6d4.png
a7d8184c487b82b9afa8576f5beae6d4.png-448x184.png
a7d8184c487b82b9afa8576f5beae6d4.png-448x184.png