I'm working with an 8-bit, R2R-ladder DAC that is connected to the LM386 that is then connected to an 8ohm/3W speaker.
The output of the DAC is connected to pin 3 of the amplifier, which is configured accordingly to page 10 of the link (with the exception being pin 7 is left open and pin 6 is driven by 5v).
I've used this same configuration with a 6-bit DAC and have had success, but adding the extra 2-bits seems to be causing some problems.
The input for the DAC comes from a TM4C123: the digital wave is produced in software by creating an array of size 512 (needs to be double 2^8 to account for Nyquist effect) containing values between 0-256 arranged so that if they were plotted over time, we would get the shape of a sine wave.
A SysTick timer is used to determine the frequency. This is accomplished by incrementally outputting one value from the array with each interrupt.
If I take a voltmeter to the DAC's output, I get a DC reading of about 1~2V (If I connect the speaker directly, you can barely hear the sine wave produced).
If I connect the DAC to the amp, the voltage output from the amp is around 7~8V. If I connect the speaker, no sound is produced. Then, if I disconnect the speaker and do another voltage reading from the amp, it now reads about 0.11V.
The only way to get it back to that 7~8V reading is to reverse the direction of the 250uF capacitor from the schematic on page 10. But again, connecting the speaker produces no sound and rereading the volts from the amp gives around 0.11V.
I'm unsure what the issue could be since I've had success with no issues when using a 6-bit DAC.
The following schematic demonstrates the connections using a 6-bit DAC. The 8-bit utilizes two extra GPIO pins and additional resistors