This example shows how to use the DIP Switch block in an audio reverberation application on your Texas Instruments™ DSP platform.
Available versions of this example:
The following figure shows the example model:
The following figure shows the Reverberation Algorithm which is executed in the context of a DSP/BIOS™ task:
This simulation of audio reverberation shows the use of the DIP Switch block. This block reads the status of user-controlled DIP switches on the DSP board. Each DIP switch controls a delay block and changes the reverberation filter applied to the input audio signal.
TMS320C6xxx series DSK / EVM board with user controlled DIP switches
Connect an audio source to the 'Mic In' or 'Line in' input port of the audio codec as indicated in the appropriate Simulink model for your hardware
Connect a speaker / headphone to the 'Line Out' output port of the audio codec
Open the model.
Open the Model Configuration Parameters dialog and select "Coder Target" under "Code Generation". Click "Target Hardware Resources" and make sure that the specified CPU clock speed matches to that of your target board.
Click "Build Model" button to generate, build, load and run the DSP code.
Observe that the audio reverberation changes with a change in DIP switch positions.