- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone,
I'm just learning how to use the Audio CODEC on NIOS II with the DE2 board. I wrote the following assembly code to generate a square wave and use it to produce an output tone: .equ ADDR_AUDIODACFIFO, 0x10003040 .global main main: movia r2, ADDR_AUDIODACFIFO # Set up the square wave's positive pulse preloop1: movi r3, 10000 movi r4, 22 # Send 22 outputs to the FIFO loop1: stwio r3, 8(r2) stwio r3, 12(r2) subi r4, r4, 1 beq r4, r0, preloop2 br loop1 # Set up the square wave's negative pulse preloop2: movi r3, -10000 movi r4, 22 # Send 22 outputs to the FIFO loop2: stwio r3, 8(r2) stwio r3, 12(r2) subi r4, r4, 1 beq r4, r0, preloop1 br loop2 It doesn't seem to be working - nothing is being written to the audio codec's FIFOs. Does anyone know what I need to do to produce a tone? Thanks.Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Have you configured the codec over I2C in slave mode ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi , Have you configured the codec over I2C in slave mode ? --- Quote End --- How do you do that? Can you do that in NIOS II?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page