Forum Discussion

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

Generating tones on the DE2 WM8731

Hi! I'm using an assembly file to send commands to the DE2's WM8731 through I2C, and I want to know if there is any way for me to generate a tone to play through the codec without using the microphone/line in ports. Are there some registers containing the data for the sound output that I can modify? Is there some other method for me to change the audio output? I've searched through the data sheet, but I don't see any mention of what I'm trying to do (although it could just be my lack of understanding).

Thanks for your help!

7 Replies

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

    The best start is to use the design example: "DE2 Music Synthesizer" that is on the CD together with the DE2 board.

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

    Unfortunately, I don't have access to that CD; I'm using the boards in my school's lab. Can I download that somewhere?

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

    I just got a chance to test this out on a DE2, and it's doing just what I want it to do. Thanks, this is very helpful!

    Now, is there any way in which I can create similar functionality within the constraints of a simple computer using an ASM file to talk to the audio codec? Are extra verilog files such as these necessary to allow me access to the actual sound the audio codec is playing? I'm new to the DE2, and I'm still learning what the components can do and how they communicate.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You can either do this in VHDL or Verilog or you can use a Nios processor to control your Audio Codec. But both require that you get familiar with designing hardware and/or designing embedded systems with Qsys or SOPC.

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

    Hello i am just starting to learn VHDL but i have a similar project the problem is i found a good book and i undestand the functions of the code but i have no idea how to create sound can i have a look to your code