Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
18 years ago

Help with the Audio Codec

Hello

I have made a 16-bit fir tap filter with quatus, and I really need help with getting the audio codec to work on my Cyclone II

I have a 16-bit input, but quatus does not allow me to put a bus on the ADC pin. I am assuming you need a parallel to serial block/code? Im kinda at a loss here, am i right to use the I2C pins too?

If there is anyone here who has worked with the codec, could you help a newbie out?

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    I didn't use audio codec with Altera, thus I can give only general hints.

    You guessed right, that you need a serial-to-parallel conversion of AD data respectively a parallel-to-serial conversion of DA data. Common codecs use I2S standard for data interface (don't know if you have DE2 or Altera DSP board). Additional you have to setup the chip through control interface, which can be either I2C(DE2,Altera DSP) or SPI(only Altera DSP). In your case, you would choose 16 Bit data length and your preferred sample rate.

    I wonder, if Altera has shipped any design examples with DSP board. Terasic has audio "demonstrations" with DE1/DE2, but they are far from being instructive to my opinion. Just a few naked lines of verilog code.

    I could be a good HDL programming exercise to build the codec interface from the scratch, using only the codec datasheet, but probably that isn't your main interest.

    Regards,

    Frank
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there anyone who has a block or verilog of an I2C slave interface for this codec? I have looked online but a lot of the codes are complicated for me

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    wow !

    i got the same problem going on !!

    im using DE2 board and im implementing FIR filter now i need to configure the Audio Codec :S !!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The DE2_i2sound example should help you fighure out the codec programming part. as for the filter implementation, I am lost as well cant get the thing to work. The passthrough from the filter works but nothing when the filter is engaged.