I asked a very bad question related to this yesterday, sorry - this is more comprehensive and makes more sense.

this is the manual for the nexys 4 FPGA i'm using https://reference.digilentinc.com/reference/programmable-logic/nexys-4-ddr/reference-manual - the relevant section is 16 - mono audio output

based on this manual, I have set the audio output to a pulse-width modulated square wave in order to try to produce a tone (the idea is that I will eventually play a short tune in the background of an arcade game I'm building for a university project). Although there are no errors or anything, I'm not hearing anything when I plug headphones into the audio output.

I'm wondering if I'm going about this the right way and whether anyone has any tips on how to produce a sound output - any sound, really, and I can build from there.

I really appreciate any help

  • 4
    \$\begingroup\$ You should have edited your original question, not deleted and reposted! \$\endgroup\$ – Chris Stratton Dec 3 '18 at 17:41
  • 2
    \$\begingroup\$ Take it into your university's student lab where you will find a scope and use that to see if you are getting anything there. As it stands it's impossible to know if your design is running all, if that signal is toggling or not (and if so at an audible, ultrasonic, or radio frequency), if you have a constrains file mistake putting it on the wrong pin, or if there's something you misunderstand about the output circuit and the possibility (or not) of connecting headphones. Also, questions need to stand on their own without depending on external links for critical portions. \$\endgroup\$ – Chris Stratton Dec 3 '18 at 17:43
  • \$\begingroup\$ Almost certainly you need a 16KHz Low Pass Filter; the mechanical inertia of the headphones may provide some of this. A 1Kohm resistor and 0.01uF (10 nanoFarad) capacitor, before the headphones is a start. The 1kOhm is high, and will attenuate; you should hear something. Nothing magic about the 16KHz either. \$\endgroup\$ – analogsystemsrf Dec 3 '18 at 17:47
  • 1
    \$\begingroup\$ Along with filtering, how is audio information from these video games even being hooked up to the PWM audio output? Shouldn't the video game come with audio information burned into some type of memory? How are you hooking up that information? \$\endgroup\$ – KingDuken Dec 3 '18 at 18:00
  • 1
    \$\begingroup\$ What are switching parameters of your PWM signal, and how do you generate it in your Verilog code? It is not enough to "set the audio output to a pulse-width modulated square wave", you have to actually generate variable modulation to get any sound after on-board the filters. \$\endgroup\$ – Ale..chenski Dec 3 '18 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.