Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Sine wave freq Lookup Table

Status
Not open for further replies.

ckelly4

Newbie level 4
Joined
May 3, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,321
Okay so I created Block RAM using Xilinx's Block Memory Generator, creating an 8-bit sine wave coded as a .coe file with 256 samples. I need a look up table to assign 44 different frequencies spread out among 4 octaves (Middle C up). How should I go about doing this?


-Much appreciation in advance
 

yadog

Member level 1
Joined
Mar 12, 2006
Messages
33
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,427
donot quite follow what u want to do ?
 

mrflibble

Advanced Member level 5
Joined
Apr 19, 2010
Messages
2,724
Helped
679
Reputation
1,360
Reaction score
651
Trophy points
1,393
Activity points
19,551
Take a look at the DDS Compiler in the core generator in xilinx ise. That might be what you are looking for....
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,633
Helped
2,698
Reputation
5,392
Reaction score
2,617
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
101,819
It sounds as though you're using a method that will have lookup tables consisting of partial sine waves. First and last values may be far apart.

This will result in sudden transitions at the speaker. You'll get harsh sounding sine waves.

You only need one lookup table. You stated your memory has room for 44 x 256 steps. It must contain one entire sine wave.

Then you will generate different frequencies by skipping so many steps down the lookup table. Skip many steps to make a high frequency. Skip few steps to make low freq.

Read the value, send voltage to output. Again skip same number of steps, read the value, send to output, etc.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top