CS4223 Audio Codec/PCB Design

Anjana Rajan & Patrick Berry

Inventors of QRAP

 

 

Introduction

 

This document contains information on the operation of the CS4223 audio codec, as well as details on interfacing the codec with the FLEX10K device on the Altera UP1 board.  It is useful for projects involving digital audio signal processing and/or printed circuit board design. 

 

NOTE:  ANY USE OF THE CS4223 PCB OR THE VHDL CODE INCLUDED IN THIS APPLICATION NOTE MUST BE REPORTED TO THE INVENTORS OF QRAP.

 

 

Overview of CS4223 Audio Codec

 

The CS4223 Audio Codec from Crystal Semiconductor is what we chose to use in our project.  It is a 24-bit codec that contains stereo A/D and D/A converters, and accommodates sampling rates anywhere between 4 and 50 Hz.  Its applications are specifically geared towards audio signal processing, such as digital effects processors, DAT, and multitrack recorders.  If you decide to use this fantastic codec in your project, it is STRONGLY recommended that you read the CS4223 Data Sheet from Crystal Semiconductor.  Understanding how the codec works, whether you decide to use the CS4223 or another, is essential if you want your project to succeed.

 

 

CS4223 Printed Circuit Board

 

To ensure proper functionality of the audio codec, we designed a printed circuit board that connects the CS4223 audio codec according to specification.  The datasheet for the PCB can be seen here.  In it, we included schematics of all layers of the PCB, pin and signal descriptions, as well as recommended pinouts for interfacing the CS4223 PCB with the FLEX10K device on the UP1 board.  GIF images of each of the layers can be viewed by clicking on the links below.

            Top Layer

Bottom Layer

            Top & Bottom Layer

            Top & Bottom Layer (silkscreen layer superimposed)

 

Each component number is labeled in copper directly on the PCB.  If you do decide to use our board for your project, you may be required to solder these components onto the board yourself (but maybe not if you’re lucky).  Click here for a list of the components and their values.

 

EXTRA SPECIAL NOTE:  DO NOT INHALE THE SOLDER.

 

 

Problems with Noise

 

When audio was first output from the CS4223 PCB, it was very noisy.  The oscilloscope showed that there was about 3Vpp of noise at 6 MHz, which sounds just terrible.  After some investigation, we discovered that de-coupling the op-amp circuit from the audio codec, and taking single-ended output directly from the audio codec yielded much better results (more details on how to do this are included in the CS4223 PCB Datasheet).  It is possible that the op-amp had gone into oscillation and was creating the noise, but we are not exactly sure.  Try using the output filter circuit; it may work for you.  If not, single-ended output directly from the codec is always an option.

 

 

VHDL Code

 

The VHDL code to interface the codec with the UP1 board is relatively simple.  For basic operation, these three pieces of code are needed.  We have even provided this code for you to use (click on the links to view the code)!

 

 

For our project, we only required monaural sound.  The existing code can easily be modified to accommodate stereo sound.  Feel free to modify the code as you wish, but certainly let the INVENTORS OF QRAP know if you do so. 

 

 

Tips on designing a Printed Circuit Board

 

Even if you don’t plan on designing a PCB for your project, this information may be useful for you for future projects.  This PCB was our first design attempt and it turned out fairly well.  If you do plan on designing a PCB, here are a few things you should consider:

 

·        Make sure the design software you choose is not manufacturer specific – We ran into this difficulty because we used the software provided by ExpressPCB.  It was a really nice tool, but in using this software, we had no choice but to buy our PCB from ExpressPCB.  It ended up costing us a lot more money.  There are lots of different software packages that you can use.  Two very popular programs are Protel and Eagle.  The internet contains several tutorials on both. 

 

·        Obtain your components early so that there are no problems with sizing – Another difficulty we ran into was with the op-amp on our PCB.  We thought we ordered a smaller op-amp than we actually did.  Avoid this hassle and order ALL your components before you begin your design. 

 

·        Component Packages – There are a number of things to consider here: surface mount (or not), pin spacing, and package dimensions.  Do some research and find out all the different packages are available for your chip of choice.  Keeping the design small is always the best thing, especially when money is involved.  Using surface-mount chips cuts down size a lot.  Be sure to read the specs provided by the company whom you want to manufacture your PCB.  They may have some constraints on the trace width and hole/via sizes that you are allowed to use.

 

You will discover many more techniques to designing a PCB as you go along.  It’s really quite easy.

 

 

Resources

 

CS4223 Data Sheet

Altera UP1 Board Documentation

 


Prepared By:

 Anjana Rajan & Patrick Berry
Team QRAP
Document Created: 2001/03/26
Last Updated: 2001/03/26