User`s guide
MPLAB Starter Kit for dsPIC
®
DSCs User’s Guide
DS51700A-page 24 © 2008 Microchip Technology Inc.
The amplifier has a variable gain from 3 db to 23 db, which can be adjusted to control
microphone sensitivity or boost a low line-input signal. The output of the amplifier is
biased at 1.65V.
4.1.2 Speech Playback
The mainstream speech playback interface processes the PWM digital signal from the
Output Compare module of the dsPIC33F device. A low-pass filter demodulates the
PWM signal as shown in Figure 4-2. The low-pass filter behaves like an integrator
whose output signal amplitude depends on the duty cycle of the input PWM waveform.
The PWM frequency should be an integral multiple of the audio sampling rate.
FIGURE 4-2: PWM DEMODULATION
The output of the low-pass filter feeds the headphone amplifier The headphone
amplifier drives an audio headphone. This amplifier can drive up to 75 mW into a 32
ohm headphone. The amplifier uses a digital volume control that is controlled by I/O
lines from the dsPIC33F device.
4.1.3 Codec
The audio codec can be used for a higher-end audio application. The input to the audio
codec is the output of the line/microphone pre-amplifier. The output feeds the
headphone amplifier. The codec must interact with the application program running on
the dsPIC33F device. Commands from the application program control the codec
operating parameters (such as communication protocol, sampling rate, volume control,
level control, filter settings, etc.). Command information is exchanged over the
Inter-Integrated Circuit™ (I
2
C™) module on the device.
The codec converts the incoming audio signal to a digital signal for the Digital
Converter Interface (DCI) module of the dsPIC33F device. Audio output from the
application program is sent to the codec via the DCI module. The codec converts this
digital signal to audio for the headphone amplifiers.
4.1.4 4 Mb Serial Flash Memory
The starter kit includes 4 Mb serial Flash memory that can be used for storing data. The
memory interfaces with the SPI bus on dsPIC33F device and might typically be used
by applications that require storage of speech samples for playback purposes.
C
R
PWM SIGNAL FROM OCPWM LOW-PASS FILTER DEMODULATED AUDIO SIGNAL