Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20782 Discussions

how to generate tone in DE1

Altera_Forum
Honored Contributor II
2,016 Views

hi, i come across this project in this site http://www.fpga4fun.com/musicbox.html

which creates a music box. I wan to implement them in DE1 board but i dun know how to use the audio parameters. is there any tutorial on this, or links? any help will be appreciated.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
798 Views

Attached is a Quartus project for the DE1. 

 

Connect your speaker to the GPIO_1 pins 0 and 1. 

 

Hope you like it.
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

@kwuaker, 

 

hi. thank u for the file. nice tone, rudolf. 1 question though, what if i want to use the line out to the speaker instead of the GPIO pins? what needs to be adjusted? Also, if dun wan to use an mif files, is it still possible to run a tone?  

i know i ask a lot, just interested to know this things. thnx again
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

I believe the line out is connected to the wolfson audio codec chip. You would have to communicate with that chip to initialize it, and then generate the tones. This is a little more complicated though - if you're interested take a look at the DE1 synthesizer demo for tone generated music, or at the DE1 audio demo for playing PCM. 

 

Using a mif file is not required, it's just to have some kind of ROM behavior. You can use even a big case switch to specify the tones to play, like in the MusicBox tutorial.
0 Kudos
Altera_Forum
Honored Contributor II
798 Views

@ kwuaker 

 

hi. thanx again, learning a lot from ur project. i wan to learn more on how the rom, mif function and how it is created. trying to analyze ur mif file but struggling. really zero on this topic. i am still googling rom and mif tutorial, if u have anything, i am eager to learn this. thnx in advance. more power.
0 Kudos
Reply