PWM voltage on Mega 2560 analog pins 8-15 using arduino-softpwm library

adamaero:
I re-downloaded the PalatisSoftPWM library. It worked yesterday for a time, but now now only A8 works (A9-A15 do not). Same error message which is odd because it worked yesterday after the bug fix!

I'm sorry to hear that. I just compiled your sketch with all the channels defined and I get no errors:

#include <PalatisSoftPWM.h>

SOFTPWM_DEFINE_PINA8_CHANNEL(0);  //Configure Arduino pin A8 as PWM channel 0
SOFTPWM_DEFINE_PINA9_CHANNEL(1);
SOFTPWM_DEFINE_PINA10_CHANNEL(2);
SOFTPWM_DEFINE_PINA11_CHANNEL(3);
SOFTPWM_DEFINE_PINA12_CHANNEL(4);
SOFTPWM_DEFINE_PINA13_CHANNEL(5);
SOFTPWM_DEFINE_PINA14_CHANNEL(6);
SOFTPWM_DEFINE_PINA15_CHANNEL(7);

SOFTPWM_DEFINE_OBJECT(8);

void setup() {
  PalatisSoftPWM.begin(60);  // begin with 60 Hz PWM frequency
}

void loop() {
  //PalatisSoftPWM.set(0, 255);
  PalatisSoftPWM.set(0, 255);
  //PalatisSoftPWM.set(2, 255);
  //PalatisSoftPWM.set(3, 255);
  //PalatisSoftPWM.set(4, 255);
  //PalatisSoftPWM.set(5, 255);
  //PalatisSoftPWM.set(6, 255);
  //PalatisSoftPWM.set(7, 255);
}

adamaero:
So I went back to the other arduino-softpwm library. I changed pin A9 to 88, I think that's right, from the 2560 pin map. But that didn't work either. I'm also getting about 30mV on inactive pins which is confusing. Here is the program with this second library:

#include <SoftPWM.h>

SOFTPWM_DEFINE_CHANNEL(88, DDRD, PORTD, PORTD0);  //Arduino pin 0

This is incorrect. You define channels by the pin's port and bit. If you look at the 2560 pin map, you'll notice it says "PK1" next to the A9 pin. That means it's port K, bit 1. The "88" is just the physical pin number, which is not used for anything. What your code above does is to define PWM channel 88 (first parameter is channel number) as PD0. PD0 is actually Arduino pin 21. If you wanted to define PWM channel 0 as Arduino pin A9, the code would look like this:

SOFTPWM_DEFINE_CHANNEL(0, DDRK, PORTK, PORTK1);  //Arduino pin A9

Since most Arduino users have never been exposed to this low level port/bit pin notation system, the arduino-softpwm library is not very beginner friendly. That is the reason why I created my fork. I have had discussion with the author of the original library about merging my work into their library but I never managed to make this happen.