Forum Discussion

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

Ask about the DE2 Audio Codec.

I set-up everything as in the manual, and use the reference design to play music(48KHZ,wav). But why there is much noise along with the music from the headset?

Thanks for help!

9 Replies

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

    I came across the same extact problem...When playing in 44.1KHz or 44.8 there was an extremely annoying noise .....I really cannot understand why..........???????

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

    I had the same problem with the sd audio player

    # define LCD_DISPLAY

    # define SEG7_DISPLAY

    # define DISPLAY_WAVE_POWER

    # define SUPPORT_PLAY_MODE

    i commented out these ddefines and the sound was a lot better
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hey! Is there a way to make the ADC output of the Audio Codec (of DE2 Cyclone II board) be written onto the Flash Memory on the board??????

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

    yes there is...first u got to add a flash memory controller to the SOPC system of yours, and then from the Nios IDE to choose where to download your program.(From the properties menu of your project) ;)

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

    YA thanks.. but theres a bigger problem. My program is supposed to take in the ADC output into it and then work upon it to give out another set of bits, both input and output being serial. The output then goes into the DAC which gives us the analog signal.. Now, the Audio Codec has an ADC data output, a DAC data input, an ADC sample clock output, a DAC samlpe clock input as well as the master clock. Now we want to synchronize all this with the program but have no idea which clock to use! Please guide!

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

    Some confusion may come from the audio codec capabilities to support different modes. I suggest to look at the slave mode configuration shown in Fig. 6 + 7 in the datasheet. It's best suited for FPGA operation and rather straightforward. The codec has to be setup to the respective mode through control interface before operation.

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

    And where do I find this 'control interface' from? The datasheet has given all the controls and settings and the configuration information but it has not mentioned WHERE I can input all this setup parameters like Master or Slave mode, which sampling frequency etc. I am so lost and I am on a frickin' deadline! Thanks for helping out!!

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

    Altough the Terasic software examples aren't very instructive, they should be sufficient to see how e. g. the audio codec control interface can be operated. You can consult the DE2_i2sound example. It has a sequence of commands in module clock_500.v that is transmitted through module i2c.v, the I2C-controller that drives the control interface.

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

    Hello, i am having the same problem with the SD card, there is considerable noise level on the output, so is there any workaround for this?

    Thanks!