LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to play a tone in FPGA

I am trying to play a tone(either a 4kHz or 7kHz) in a FPGA vi in Labview 2010.  Below is the logic that I am currently using, however, I hear no tone when running the vi.  Does anyone know why this is not working or have any other ideas to use different logic?

0 Kudos
Message 1 of 3
(2,833 Views)

Hi joes51385, 

 

First of all, what kind of a speaker do you have connected to your analog output. This could be a problem with the speaker. Also, your logic looks correct, but why are you multiplying the sine wave by .3? Are you using the full-scale amplitude for the sine wave amplitude? Your sine wave amplitude may be too small, which could cause you not to hear the sound. A screenshot of the sine wave setup window would be helpful. Also, it may be more convenient to use frequency values of 0.000175 (7 kHz) and 0.0001 (4Hz). 

0 Kudos
Message 2 of 3
(2,802 Views)

what is the data type of the result of the multiply of sine and scale factor?  the conversion to I16 would require at least 16 bits of integer on the fixed point result.  if you are connecting directly to a speaker, the AO curent will now be enough to drive it.  have you looked at the ouptut with a scope?

Stu
0 Kudos
Message 3 of 3
(2,797 Views)