Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- 1) how can i configure the code to sample the audio data at 8000 Hz with 16 bit data? --- Quote End --- The WM8731 control registers have to be set accordingly. --- Quote Start --- 2) how can i store them to FPGA internal ram? Is it something like below? --- Quote End --- You would want to store 16-Bit samples to the ram, so the first step is deserializing the data stream, as I already mentioned. Internal RAM can be most easily set up by the MegaWizard Plug-In Manager, category Memory Compiler, 1- or 2-port RAM. In case of a 1-port RAM, you have the option to create an interface for the In-System Memory Content Editor, which allows you to transfer data from and to the RAM through JTAG interface. It's connecting the second RAM port to a virtual JTAG instance. --- Quote Start --- 3) How can i work out FFT on the audio that i have retrieved? --- Quote End --- Altera has a FFT core, but it's not free. If you don't have a Quartus subscription license, you are restricted to an evaluation mode of the core. Unfortunately, there's no ready-to-use demonstration code for sound acquisition, as far as I'm aware of. The control register handling through I2C interface can be copied from other codec demonstrations, but they are far from being instructive in my opinion.