I have an 8 ohm, 0.5 watt speaker that I want to drive directly from an IO pin of an FPGA. I just want to generate simple square wave beeps, so I think I can connect like this:
FPGA IO pin -> resistor -> speaker -> ground
The IO pin is set to 3.3V LVTTL, and I can choose between 4mA and 8mA.
My question is what resistor values would I need for 4mA and 8mA to get the loudest volume without drawing too much current?
Thanks!