Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI want to produce a tone output on the speakers
Assembly Example: Echo program - connects mic to speakers, polling
.equ ADDR_AUDIODACFIFO, 0x10003040
main:
movia r2,ADDR_AUDIODACFIFO
ldwio r3,4(r2) /* Read fifospace register */
andi r3,r3,0xff /* Extract# of samples in Input Right Channel FIFO */
beq r3,r0,main /* If no samples in FIFO, go back to start */
ldwio r3,8(r2)
stwio r3,8(r2) /* Echo to left channel */
ldwio r3,12(r2)
stwio r3,12(r2) /* Echo to right channel */
br main
This code was provided by my university website(http://www-ug.eecg.toronto.edu/msl/nios_devices/dev_audio.html), however its broken and the output is scrambled noise nothing is right. How can I output to the speaker a single tone?