Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
734 Views

Cyclone IV Audio in C/C++

I've got a question about using the Audio codecs. 

 

I've got the board set up to use audio and have the simple C demo running that purely opens the audio device properly. (Found in an 'Audio.pdf' which I got somewhere from the altera website) 

 

I'm wondering how I can make it produce a signal / noise when I hit a switch. Sorry if this poorly written, I'm having trouble figuring out what words to use and in what order, and I don't fully understand what I'm doing. 

 

I'm a beginner at this board, the DE2-115, so I don't really know much about it. I understand that the board has a left and right FIFO which store data to be read by the channels, so my guess is that I have to write some sort of data (frequency to produce a sine wave or something?) to a FIFO, then read it from the FIFO to a channel, then clear the FIFO when I turn the switch off? I'm not concerned about recording as I am only using the Line Out port, I just want to produce a signal at an audible frequency when I turn a switch (say SW[1]) on. I'm not sure how to explain how I set up the clocks, other than that I am using whatever my professor explained to me in class, which is CLOCK_50 for the main CPU, RAM, etc. and CLOCK_27 for the audio and i2c cores. 

 

Any help would be greatly appreciated, links to C tutorials on this topic or example code or something.
0 Kudos
0 Replies
Reply