Surround Sound Decoder
• Block Diagram of Project
• Initial Circuit Design Overview
• Board Layout
• Board Testing
• Development Platform
Block Diagram of Components for Surround Sound Decoder
Communicates with the DSP
and sends control signals to
the other components.
Input: DSP: 3 Digital
from source Line receiver that Processes the serial Channels Digital to Analog Converters:
changes the incoming data and outputs to Changes the digital output from
digital signal into the appropriate the DSP to analog.
readable serial data. channel for output.
Amplifies the analog output from the DAC for output
to the receiver.
Output to 5.1
• Power is supplied by a 12V wall transformer.
• Linear voltage regulators used to convert voltage
to +5V and +2.5V.
– Chosen for ease of use and smaller number of external
– For more efficient regulation, it would be best to use a
DC-DC converter or switching power supply.
• Ferrite Bead inductors are used for filtering analog
signals in the power supply.
• Streaming digital audio signal is taken from a
source, such as a DVD player.
• The serial signal is sent at +/- 0.5V.
• The Crystal® CS8414 Line Receiver is used to
change the incoming signal to +5V for input to the
DSP and DACs.
• The mode of operation is set for the L/R and S
clock to be inputs to the line receiver (generated by
the DSP) and the data to be sent in 24-bit I S
• Microchip’s PIC16F877 microcontroller is used to
control the various chips.
• Communicates with the DSP over an I C bus.
• We used capacitors on the I C lines to filter noise.
• Issues reset commands to all of the other
• Crystal® CS49326 DSP
• 12.288MHz crystal oscillator is used to generate
internal PLL clock.
• DSP can decode standard PCM (CD audio) as well
as Dolby Digital® and DTS® audio (used on most
• The code is loaded from the microcontroller.
Digital to Analog Converters
Digital to Analog Converters
• Crystal® CS4340 DACs
• Input mode is set to 16 to 24-bit I S
• DAC converters signal to 48-96KHz audio
for input to an external amplifier.
• The analog audio is filtered for output to the
• The DAC issues a mute signal during power
up and if the clocks are out of sync.
– When mute is high, the transistor network
clamps the output to ground.
– This part of the circuit reduces pops and clicks
heard on the speakers.
• Layout of the board was done in OrCAD
• Took special consideration of noise on
• The board has four layers and all have a
copper ground area to help dissipate noise.
• Parts were ordered before the layout process
to ensure proper footprints.
• The board was systematically tested in
stages so as to rule out problems as we
• The power, control, and input stages where
populated and tested first.
• Once this was complete, the board was
turned over for the software development
• Microchip PIC 16F877
• 20 MHz
• 8K x 14 bit words FLASH Memory
• I2C or SPI support
• Debugging tools
• Availability of professional C compilers
• CCS Inc. PIC C Compiler
• In-Circuit Debugger
• Logic Analyzers
• Basics • Extras
– Reset hardware – Automatically switch
– Initialize DSP streams
– Configure hardware – Bass management
– Configure software – Addition Dolby play
• Boot DSP
• Transfer appropriate application code
– Dolby Digital®, DTS®, PCM, MP3
• Ensure hardware is initialize correctly
• Monitor DSP playback modes
– Watch for changes in stream
– Out-of-Sync messages
• Recognize changes in streams and load
• Bass management
• Additional Dolby play mode
• Audio effects
• I2C methods
• Hardware modes
– Input settings
– Output settings
• Handling unsolicited messages
– Interrupt handler issues
• In-Circuit Debugging
• Logic analyzer
• Helper functions
Successes and Challenges
• Re-wrote I2C functions
• Implemented automatic stream processing
for changing audio streams mid-track
• Wrote functions to verify and test DSP
Hardware Post Mortem
– 4 Layer board
– Power system
– Parts layout and planning
– Licensing issues
– Voltage conversion between line receiver and DSP
– DAC issues
– Hardwiring mode bits
Software Post Mortem
– I2C rewrite
– Taking the time to write helper functions
– Development done in C instead of ASM
– In-Circuit Debugger only debug method
– Compiler stability
– Interrupt handler