toneAC v1.2 - Twice the volume, higher quality, higher frequency, etc.

glynd:
Thanks for your reply Tim.

Pins are PD4 and PD5 (PWM1B and PWM1A).

The example works perfectly:

void loop() {

for (unsigned long freq = 150; freq <= 15000; freq += 10){ 
    toneAC(freq); // Play the frequency (150 Hz to 15 kHz).
    delay(1);    // Wait 1 ms so you can hear it.
  }




Just not the volume, which is really what I'm after.

I'd verify the connection. It's pins 12 & 13 on an Arduino device. If you're not connected to the correct pins, it won't provide any of the benefits of the library and the volume won't work.

Or, it's possible that the 1284P won't work with the volume if the timer doesn't support the duty cycle. Keep in mind that it works for the 328 chip (if connected to the correct pins).

Tim