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

GPIO switch

SigmaDSP & SigmaStudio KTTF Mar 12, 2014 00:00 3 replies Original on forum ↗
Subscribe
KTTF Question
Mar 12, 2014 00:00

Hi,

i'm new in Sigma Studio and i have a question. I'm using the ADAU 1701 and my problem is.

I want to press a button/switch on my board, and when the button is pressed

the DSP has to generate a special signal which i want at the output.

Does anyone could help me or has a similar problem?

Thanks an best regards

Audio Signal Processors

SigmaDSP Audio Processors

gpio

switch

adau1701

KJBob Reply
Mar 12, 2014 00:00

Hello KTTF,

Welcome aboard! The more you use SigmaStudio, the more you'll come to like it. You can perform your desired function with an arrangement like that shown below:

This runs on a ADAU1701MINIZ eval board, whose three push-buttons are each wired to a multipurpose pin on its -1701. The buttons ground these inputs when pressed, producing a "0" -- otherwise a "1" In turn, these pins are by default configured as GPIO digital inputs, so they're ready to use here.

Understanding the number formats in SigmaDSP helps immensely with projects such as yours -- please look up Brett's FAQ here: https://ez.analog.com/docs/DOC-3168

In the above schematic, the GPIO input controls a Mux, which selects between the 440 Hz tone oscillator and a "0" (silence). A Mux expects an integer or "28.0" format at its control input -- involving the least-significant bits in the DSP. On the other hand, the GPIO sends out a number "1" in "5.23" format -- the 1 appears at the 23rd bit toward the left (while zero is the same in any format). The easiest way to convert formats between a GPIO and a Mux is to use a Buffer Gate as shown above. For help with most algorithm blocks, select it and press F1.

The way the above project is set up, pressing the button nearest the eval board's output jack will enable the tone. Once you get this working, variations are limited only by your imagination -- siren and warble tones, etc. You can even play back a very short (a few mS) wave file, see https://ez.analog.com/docs/DOC-10801

Best regards,

Bob

7673.1d21aa630692f07b8351a09927fdf627.jpg
7673.1d21aa630692f07b8351a09927fdf627.jpg
7673.1d21aa630692f07b8351a09927fdf627.jpg-450x201.jpg
7673.1d21aa630692f07b8351a09927fdf627.jpg-450x201.jpg
KTTF Reply
Mar 14, 2014 00:00

Hello Robert,

thank you for your very fast answer. This is exactly what i was searching for:)

Best Regards

rhenry74 Reply
Dec 4, 2021 00:00

thank you, thank you, thank you
i've been trying to figure this out for 2 hours