Chapter 7. Real-Time Signal Processing

In this chapter, we will cover the following topics:

  • Configuring the audio codec
  • How to play prerecorded audio
  • Designing a low-pass digital filter
  • How to make an audio tone control

Introduction

In the last chapter, we used the audio codec's beep generator to play a tune, but if you looked at the codec manufacturer's data sheet, you must have noticed that the device can do much more. Audio signals can be recorded by connecting a microphone to the evaluation board's stereo analog audio input, and the signal can be sampled using the audio codec's on-chip ADC. Digital audio can be played by sending digital samples to the codec, and the left and right speakers can be driven by the output of an on-chip DAC. A dedicated digital serial audio interface using a protocol called I2S (I2S, or IIS) conveys digital samples between the microcontroller and audio codec. Inter-IC-Sound (I2S) or Integrated Interchip Sound (IIS) is a serial bus interface standard developed by Phillips Semiconductors in 1986 (revised 1996) that is used to connect digital audio devices together. This specification is widely available online (for example, www.cypress.com). Unfortunately, the STM32F400 evaluation board only supports a half-duplex channel, so audio cannot be recorded and played simultaneously.

Connecting a powerful microcontroller (that is, the computer) and codec together brings the prospect of Digital Signal Processing (DSP). DSP applications manipulate digital audio samples to create digital filters and other amazing audio effects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.32.1